Skip to content

deserializeDisjointSetJson<T>(serialized, create): GrowableDisjointSet<T>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

T

SerializedGrowableDisjointSet<T>

The partition to restore, either statically typed or decoded as unknown.

GrowableDisjointSetFactory

GrowableDisjointSet<T>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson<T>(serialized): GrowableDisjointSet<T>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

T

SerializedGrowableDisjointSet<T>

The partition to restore, either statically typed or decoded as unknown.

GrowableDisjointSet<T>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson(serialized, create): GrowableDisjointSet<number>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

SerializedIndexedDisjointSet

The partition to restore, either statically typed or decoded as unknown.

GrowableDisjointSetFactory

GrowableDisjointSet<number>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson(serialized): IndexedDisjointSet

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

SerializedIndexedDisjointSet

The partition to restore, either statically typed or decoded as unknown.

IndexedDisjointSet

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson<T>(serialized, create): GrowableDisjointSet<number | T>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

T

SerializedDisjointSet<T>

The partition to restore, either statically typed or decoded as unknown.

GrowableDisjointSetFactory

GrowableDisjointSet<number | T>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson<T>(serialized): DeserializedDisjointSet<T>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

T

SerializedDisjointSet<T>

The partition to restore, either statically typed or decoded as unknown.

DeserializedDisjointSet<T>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson<T>(serialized, options): GrowableDisjointSet<T>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

T

unknown

The partition to restore, either statically typed or decoded as unknown.

DeserializeDisjointSetJsonOptions<T> & object

GrowableDisjointSet<T>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson<T>(serialized, options): DeserializedDisjointSet<T>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

T

unknown

The partition to restore, either statically typed or decoded as unknown.

DeserializeDisjointSetJsonOptions<T>

DeserializedDisjointSet<T>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.

deserializeDisjointSetJson(serialized): DeserializedDisjointSet<unknown>

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

Rebuild a disjoint set from a SerializedDisjointSet, restoring its recorded implementation unless a factory override is supplied. O(n * alpha(n)) time.

Elements are added in serialized order, then every element is merged with the first element carrying its label. A round trip through serializeDisjointSetJson and deserializeDisjointSetJson preserves size, setCount, element order, and connectivity. It does not preserve which member is the representative.

Untyped input produces a DeserializedDisjointSet of unknown because the runtime kind may select either a generic layout or the numeric indexed layout. Pass an element type guard to validate generic decoded values.

unknown

The partition to restore, either statically typed or decoded as unknown.

DeserializedDisjointSet<unknown>

When the serialized shape or an element is invalid, or the two arrays have different lengths. Distinguish causes with error.code, one of DisjointSetErrorCode.

When an element occurs twice.