Skip to content

serializePriorityQueueJson(queue): SerializedDenseIntegerPriorityQueue

Defined in: packages/heap/src/serialization/families/priority-queue.ts:133

Capture a priority queue as a SerializedPriorityQueue. O(n) time and space — the internal entries copied to fresh [key, value] tuples plus the discriminants. Same faithful-not-canonical and defensive-copy contract as serializeBinaryHeap/serializeKHeap; the key order is never captured.

DenseIntegerPriorityQueue

SerializedDenseIntegerPriorityQueue

With code FOREIGN_STRUCTURE when queue was not produced by this package’s priority-queue factories — including a heap passed by mistake.

serializePriorityQueueJson<K, V>(queue): SerializedPriorityQueue<K, V>

Defined in: packages/heap/src/serialization/families/priority-queue.ts:134

Capture a priority queue as a SerializedPriorityQueue. O(n) time and space — the internal entries copied to fresh [key, value] tuples plus the discriminants. Same faithful-not-canonical and defensive-copy contract as serializeBinaryHeap/serializeKHeap; the key order is never captured.

K

V

PriorityQueue<K, V>

SerializedPriorityQueue<K, V>

With code FOREIGN_STRUCTURE when queue was not produced by this package’s priority-queue factories — including a heap passed by mistake.