Skip to content

serializeDisjointSetJson(set): SerializedIndexedDisjointSet

Defined in: packages/disjoint-set/src/serialization/json.ts:69

Capture the implementation kind and partition of a disjoint set. O(n * alpha(n)) time and O(n) space.

Only the partition is captured. Labels are assigned from 0 upwards in order of first appearance, so structures with the same partition and element order serialize identically.

IndexedDisjointSet

SerializedIndexedDisjointSet

serializeDisjointSetJson<T>(set): SerializedGrowableDisjointSet<T>

Defined in: packages/disjoint-set/src/serialization/json.ts:70

Capture the implementation kind and partition of a disjoint set. O(n * alpha(n)) time and O(n) space.

Only the partition is captured. Labels are assigned from 0 upwards in order of first appearance, so structures with the same partition and element order serialize identically.

T

GrowableDisjointSet<T>

SerializedGrowableDisjointSet<T>