data-structure-typed 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/cjs/binary-tree.cjs +2927 -23688
  3. package/dist/cjs/graph.cjs +845 -2634
  4. package/dist/cjs/hash.cjs +185 -616
  5. package/dist/cjs/heap.cjs +266 -818
  6. package/dist/cjs/index.cjs +5116 -31358
  7. package/dist/cjs/linked-list.cjs +644 -2615
  8. package/dist/cjs/matrix.cjs +220 -535
  9. package/dist/cjs/priority-queue.cjs +266 -818
  10. package/dist/cjs/queue.cjs +637 -2343
  11. package/dist/cjs/stack.cjs +124 -530
  12. package/dist/cjs/trie.cjs +145 -592
  13. package/dist/cjs-legacy/binary-tree.cjs +4352 -25113
  14. package/dist/cjs-legacy/graph.cjs +847 -2636
  15. package/dist/cjs-legacy/hash.cjs +181 -612
  16. package/dist/cjs-legacy/heap.cjs +266 -818
  17. package/dist/cjs-legacy/index.cjs +6657 -32899
  18. package/dist/cjs-legacy/linked-list.cjs +640 -2611
  19. package/dist/cjs-legacy/matrix.cjs +220 -535
  20. package/dist/cjs-legacy/priority-queue.cjs +266 -818
  21. package/dist/cjs-legacy/queue.cjs +634 -2340
  22. package/dist/cjs-legacy/stack.cjs +124 -530
  23. package/dist/cjs-legacy/trie.cjs +145 -592
  24. package/dist/esm/binary-tree.mjs +2927 -23688
  25. package/dist/esm/graph.mjs +845 -2634
  26. package/dist/esm/hash.mjs +185 -616
  27. package/dist/esm/heap.mjs +266 -818
  28. package/dist/esm/index.mjs +5116 -31358
  29. package/dist/esm/linked-list.mjs +644 -2615
  30. package/dist/esm/matrix.mjs +220 -535
  31. package/dist/esm/priority-queue.mjs +266 -818
  32. package/dist/esm/queue.mjs +637 -2343
  33. package/dist/esm/stack.mjs +124 -530
  34. package/dist/esm/trie.mjs +145 -592
  35. package/dist/esm-legacy/binary-tree.mjs +4352 -25113
  36. package/dist/esm-legacy/graph.mjs +847 -2636
  37. package/dist/esm-legacy/hash.mjs +181 -612
  38. package/dist/esm-legacy/heap.mjs +266 -818
  39. package/dist/esm-legacy/index.mjs +6657 -32899
  40. package/dist/esm-legacy/linked-list.mjs +640 -2611
  41. package/dist/esm-legacy/matrix.mjs +220 -535
  42. package/dist/esm-legacy/priority-queue.mjs +266 -818
  43. package/dist/esm-legacy/queue.mjs +634 -2340
  44. package/dist/esm-legacy/stack.mjs +124 -530
  45. package/dist/esm-legacy/trie.mjs +145 -592
  46. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +29 -500
  47. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +38 -563
  48. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +230 -1212
  49. package/dist/types/data-structures/binary-tree/bst.d.ts +124 -1063
  50. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +99 -854
  51. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +62 -314
  52. package/dist/types/data-structures/binary-tree/tree-map.d.ts +366 -5057
  53. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +277 -4885
  54. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +253 -3929
  55. package/dist/types/data-structures/binary-tree/tree-set.d.ts +261 -4782
  56. package/dist/types/data-structures/graph/abstract-graph.d.ts +44 -44
  57. package/dist/types/data-structures/graph/directed-graph.d.ts +130 -527
  58. package/dist/types/data-structures/graph/undirected-graph.d.ts +125 -482
  59. package/dist/types/data-structures/hash/hash-map.d.ts +132 -562
  60. package/dist/types/data-structures/heap/heap.d.ts +194 -746
  61. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +120 -809
  62. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +121 -733
  63. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +193 -863
  64. package/dist/types/data-structures/matrix/matrix.d.ts +159 -474
  65. package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +1 -6
  66. package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +6 -11
  67. package/dist/types/data-structures/priority-queue/priority-queue.d.ts +1 -1
  68. package/dist/types/data-structures/queue/deque.d.ts +196 -804
  69. package/dist/types/data-structures/queue/queue.d.ts +99 -585
  70. package/dist/types/data-structures/stack/stack.d.ts +75 -481
  71. package/dist/types/data-structures/trie/trie.d.ts +98 -584
  72. package/dist/umd/data-structure-typed.js +6580 -32822
  73. package/dist/umd/data-structure-typed.min.js +3 -3
  74. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +162 -215
  75. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +9 -9
  76. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +47 -47
  77. package/docs-site-docusaurus/docs/api/classes/BST.md +155 -208
  78. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +7 -7
  79. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +13 -29
  80. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +104 -158
  81. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  82. package/docs-site-docusaurus/docs/api/classes/Deque.md +72 -104
  83. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +60 -80
  84. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +67 -101
  85. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +6 -6
  86. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +9 -9
  87. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  88. package/docs-site-docusaurus/docs/api/classes/HashMap.md +52 -48
  89. package/docs-site-docusaurus/docs/api/classes/Heap.md +40 -68
  90. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +17 -17
  91. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +38 -38
  92. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +45 -45
  93. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +23 -23
  94. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +68 -96
  95. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +60 -80
  96. package/docs-site-docusaurus/docs/api/classes/Matrix.md +57 -52
  97. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +38 -66
  98. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +41 -74
  99. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +38 -66
  100. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +46 -79
  101. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +40 -68
  102. package/docs-site-docusaurus/docs/api/classes/Queue.md +54 -78
  103. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +171 -225
  104. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -22
  105. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +68 -98
  106. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +4 -4
  107. package/docs-site-docusaurus/docs/api/classes/SkipList.md +98 -75
  108. package/docs-site-docusaurus/docs/api/classes/Stack.md +33 -53
  109. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +104 -129
  110. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +57 -124
  111. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +45 -116
  112. package/docs-site-docusaurus/docs/api/classes/Trie.md +37 -61
  113. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  114. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +59 -77
  115. package/package.json +1 -1
  116. package/src/data-structures/binary-tree/tree-multi-set.ts +15 -11
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: AVLTreeNode\<K, V\>
8
8
 
9
- Defined in: [data-structures/binary-tree/avl-tree.ts:28](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L28)
9
+ Defined in: [data-structures/binary-tree/avl-tree.ts:27](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L27)
10
10
 
11
11
  Represents a Node in an AVL (Adelson-Velsky and Landis) Tree.
12
12
  It extends a BSTNode and ensures the 'height' property is maintained.
@@ -33,7 +33,7 @@ The type of the value.
33
33
  new AVLTreeNode<K, V>(key, value?): AVLTreeNode<K, V>;
34
34
  ```
35
35
 
36
- Defined in: [data-structures/binary-tree/avl-tree.ts:40](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L40)
36
+ Defined in: [data-structures/binary-tree/avl-tree.ts:39](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L39)
37
37
 
38
38
  Creates an instance of AVLTreeNode.
39
39
 
@@ -69,7 +69,7 @@ Time O(1), Space O(1)
69
69
  get color(): RBTNColor;
70
70
  ```
71
71
 
72
- Defined in: [data-structures/binary-tree/avl-tree.ts:126](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L126)
72
+ Defined in: [data-structures/binary-tree/avl-tree.ts:125](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L125)
73
73
 
74
74
  Gets the color of the node (used in Red-Black trees).
75
75
 
@@ -141,7 +141,7 @@ The family position (e.g., 'ROOT', 'LEFT', 'RIGHT').
141
141
  get height(): number;
142
142
  ```
143
143
 
144
- Defined in: [data-structures/binary-tree/avl-tree.ts:103](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L103)
144
+ Defined in: [data-structures/binary-tree/avl-tree.ts:102](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L102)
145
145
 
146
146
  Gets the height of the node (used in self-balancing trees).
147
147
 
@@ -161,7 +161,7 @@ The height.
161
161
  set height(value): void;
162
162
  ```
163
163
 
164
- Defined in: [data-structures/binary-tree/avl-tree.ts:113](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L113)
164
+ Defined in: [data-structures/binary-tree/avl-tree.ts:112](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L112)
165
165
 
166
166
  Sets the height of the node.
167
167
 
@@ -191,7 +191,7 @@ The new height.
191
191
  get left(): AVLTreeNode<K, V> | null | undefined;
192
192
  ```
193
193
 
194
- Defined in: [data-structures/binary-tree/avl-tree.ts:53](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L53)
194
+ Defined in: [data-structures/binary-tree/avl-tree.ts:52](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L52)
195
195
 
196
196
  Gets the left child of the node.
197
197
 
@@ -211,7 +211,7 @@ The left child.
211
211
  set left(v): void;
212
212
  ```
213
213
 
214
- Defined in: [data-structures/binary-tree/avl-tree.ts:63](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L63)
214
+ Defined in: [data-structures/binary-tree/avl-tree.ts:62](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L62)
215
215
 
216
216
  Sets the left child of the node and updates its parent reference.
217
217
 
@@ -241,7 +241,7 @@ The node to set as the left child.
241
241
  get right(): AVLTreeNode<K, V> | null | undefined;
242
242
  ```
243
243
 
244
- Defined in: [data-structures/binary-tree/avl-tree.ts:78](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L78)
244
+ Defined in: [data-structures/binary-tree/avl-tree.ts:77](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L77)
245
245
 
246
246
  Gets the right child of the node.
247
247
 
@@ -261,7 +261,7 @@ The right child.
261
261
  set right(v): void;
262
262
  ```
263
263
 
264
- Defined in: [data-structures/binary-tree/avl-tree.ts:88](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L88)
264
+ Defined in: [data-structures/binary-tree/avl-tree.ts:87](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/binary-tree/avl-tree.ts#L87)
265
265
 
266
266
  Sets the right child of the node and updates its parent reference.
267
267
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Abstract Class: AbstractGraph\<V, E, VO, EO\>
8
8
 
9
- Defined in: [data-structures/graph/abstract-graph.ts:53](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L53)
9
+ Defined in: [data-structures/graph/abstract-graph.ts:51](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L51)
10
10
 
11
11
  Abstract graph over vertices and edges.
12
12
 
@@ -67,7 +67,7 @@ Concrete edge subclass (extends AbstractEdge<E>).
67
67
  new AbstractGraph<V, E, VO, EO>(options?): AbstractGraph<V, E, VO, EO>;
68
68
  ```
69
69
 
70
- Defined in: [data-structures/graph/abstract-graph.ts:67](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L67)
70
+ Defined in: [data-structures/graph/abstract-graph.ts:65](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L65)
71
71
 
72
72
  Construct a graph with runtime defaults.
73
73
 
@@ -103,7 +103,7 @@ IterableEntryBase<VertexKey, V | undefined>.constructor
103
103
  get size(): number;
104
104
  ```
105
105
 
106
- Defined in: [data-structures/graph/abstract-graph.ts:89](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L89)
106
+ Defined in: [data-structures/graph/abstract-graph.ts:85](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L85)
107
107
 
108
108
  Total number of entries.
109
109
 
@@ -185,7 +185,7 @@ Time O(1) avg, Space O(1)
185
185
  addEdge(edge): boolean;
186
186
  ```
187
187
 
188
- Defined in: [data-structures/graph/abstract-graph.ts:254](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L254)
188
+ Defined in: [data-structures/graph/abstract-graph.ts:258](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L258)
189
189
 
190
190
  ##### Parameters
191
191
 
@@ -207,7 +207,7 @@ addEdge(
207
207
  value?): boolean;
208
208
  ```
209
209
 
210
- Defined in: [data-structures/graph/abstract-graph.ts:256](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L256)
210
+ Defined in: [data-structures/graph/abstract-graph.ts:260](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L260)
211
211
 
212
212
  ##### Parameters
213
213
 
@@ -255,7 +255,7 @@ Time O(1) avg, Space O(1)
255
255
  addVertex(vertex): boolean;
256
256
  ```
257
257
 
258
- Defined in: [data-structures/graph/abstract-graph.ts:189](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L189)
258
+ Defined in: [data-structures/graph/abstract-graph.ts:193](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L193)
259
259
 
260
260
  ##### Parameters
261
261
 
@@ -279,7 +279,7 @@ IGraph.addVertex
279
279
  addVertex(key, value?): boolean;
280
280
  ```
281
281
 
282
- Defined in: [data-structures/graph/abstract-graph.ts:191](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L191)
282
+ Defined in: [data-structures/graph/abstract-graph.ts:195](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L195)
283
283
 
284
284
  ##### Parameters
285
285
 
@@ -313,7 +313,7 @@ bellmanFord(
313
313
  genPath?): object;
314
314
  ```
315
315
 
316
- Defined in: [data-structures/graph/abstract-graph.ts:705](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L705)
316
+ Defined in: [data-structures/graph/abstract-graph.ts:677](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L677)
317
317
 
318
318
  Bellman-Ford single-source shortest paths with option to scan negative cycles.
319
319
 
@@ -427,7 +427,7 @@ IGraph.clear
427
427
  clone(): this;
428
428
  ```
429
429
 
430
- Defined in: [data-structures/graph/abstract-graph.ts:947](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L947)
430
+ Defined in: [data-structures/graph/abstract-graph.ts:899](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L899)
431
431
 
432
432
  Create a deep clone of the graph with the same species.
433
433
 
@@ -463,7 +463,7 @@ abstract createEdge(
463
463
  value?): EO;
464
464
  ```
465
465
 
466
- Defined in: [data-structures/graph/abstract-graph.ts:111](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L111)
466
+ Defined in: [data-structures/graph/abstract-graph.ts:115](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L115)
467
467
 
468
468
  Create a new edge instance (implementation specific).
469
469
 
@@ -517,7 +517,7 @@ IGraph.createEdge
517
517
  abstract createVertex(key, value?): VO;
518
518
  ```
519
519
 
520
- Defined in: [data-structures/graph/abstract-graph.ts:100](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L100)
520
+ Defined in: [data-structures/graph/abstract-graph.ts:104](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L104)
521
521
 
522
522
  Create a new vertex instance (implementation specific).
523
523
 
@@ -559,7 +559,7 @@ IGraph.createVertex
559
559
  abstract degreeOf(vertexOrKey): number;
560
560
  ```
561
561
 
562
- Defined in: [data-structures/graph/abstract-graph.ts:136](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L136)
562
+ Defined in: [data-structures/graph/abstract-graph.ts:140](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L140)
563
563
 
564
564
  Degree of a vertex in this graph model.
565
565
 
@@ -595,7 +595,7 @@ IGraph.degreeOf
595
595
  abstract deleteEdge(edge): EO | undefined;
596
596
  ```
597
597
 
598
- Defined in: [data-structures/graph/abstract-graph.ts:119](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L119)
598
+ Defined in: [data-structures/graph/abstract-graph.ts:123](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L123)
599
599
 
600
600
  Delete an edge by instance.
601
601
 
@@ -631,7 +631,7 @@ IGraph.deleteEdge
631
631
  abstract deleteVertex(vertexOrKey): boolean;
632
632
  ```
633
633
 
634
- Defined in: [data-structures/graph/abstract-graph.ts:226](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L226)
634
+ Defined in: [data-structures/graph/abstract-graph.ts:230](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L230)
635
635
 
636
636
  Delete a vertex and its incident edges.
637
637
 
@@ -671,7 +671,7 @@ dijkstraWithoutHeap(
671
671
  genPaths?): DijkstraResult<VO>;
672
672
  ```
673
673
 
674
- Defined in: [data-structures/graph/abstract-graph.ts:484](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L484)
674
+ Defined in: [data-structures/graph/abstract-graph.ts:478](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L478)
675
675
 
676
676
  Dijkstra without heap (array-based selection).
677
677
 
@@ -719,7 +719,7 @@ Time O(V^2 + E), Space O(V + E)
719
719
  abstract edgeSet(): EO[];
720
720
  ```
721
721
 
722
- Defined in: [data-structures/graph/abstract-graph.ts:143](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L143)
722
+ Defined in: [data-structures/graph/abstract-graph.ts:147](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L147)
723
723
 
724
724
  All edges in the graph (unique, order not guaranteed).
725
725
 
@@ -747,7 +747,7 @@ IGraph.edgeSet
747
747
  abstract edgesOf(vertexOrKey): EO[];
748
748
  ```
749
749
 
750
- Defined in: [data-structures/graph/abstract-graph.ts:151](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L151)
750
+ Defined in: [data-structures/graph/abstract-graph.ts:155](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L155)
751
751
 
752
752
  Incident edges of a vertex.
753
753
 
@@ -849,7 +849,7 @@ Time O(n), Space O(1)
849
849
  filter(predicate, thisArg?): this;
850
850
  ```
851
851
 
852
- Defined in: [data-structures/graph/abstract-graph.ts:897](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L897)
852
+ Defined in: [data-structures/graph/abstract-graph.ts:847](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L847)
853
853
 
854
854
  Induced-subgraph filter: keep vertices where `predicate(key, value)` is true,
855
855
  and only keep edges whose endpoints both survive.
@@ -896,7 +896,7 @@ IGraph.filter
896
896
  filterEntries(predicate, thisArg?): [VertexKey, V | undefined][];
897
897
  ```
898
898
 
899
- Defined in: [data-structures/graph/abstract-graph.ts:913](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L913)
899
+ Defined in: [data-structures/graph/abstract-graph.ts:863](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L863)
900
900
 
901
901
  Preserve the old behavior: return filtered entries as an array.
902
902
 
@@ -966,7 +966,7 @@ Time O(n), Space O(1)
966
966
  floydWarshall(): object;
967
967
  ```
968
968
 
969
- Defined in: [data-structures/graph/abstract-graph.ts:798](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L798)
969
+ Defined in: [data-structures/graph/abstract-graph.ts:760](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L760)
970
970
 
971
971
  Floyd–Warshall all-pairs shortest paths.
972
972
 
@@ -1075,7 +1075,7 @@ getAllPathsBetween(
1075
1075
  limit?): VO[][];
1076
1076
  ```
1077
1077
 
1078
- Defined in: [data-structures/graph/abstract-graph.ts:309](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L309)
1078
+ Defined in: [data-structures/graph/abstract-graph.ts:316](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L316)
1079
1079
 
1080
1080
  Enumerate simple paths up to a limit.
1081
1081
 
@@ -1117,7 +1117,7 @@ Time O(paths) worst-case exponential, Space O(V + paths)
1117
1117
  getCycles(isInclude2Cycle?): VertexKey[][];
1118
1118
  ```
1119
1119
 
1120
- Defined in: [data-structures/graph/abstract-graph.ts:838](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L838)
1120
+ Defined in: [data-structures/graph/abstract-graph.ts:796](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L796)
1121
1121
 
1122
1122
  Enumerate simple cycles (may be expensive).
1123
1123
 
@@ -1147,7 +1147,7 @@ Time exponential in worst-case, Space O(V + E)
1147
1147
  abstract getEdge(srcOrKey, destOrKey): EO | undefined;
1148
1148
  ```
1149
1149
 
1150
- Defined in: [data-structures/graph/abstract-graph.ts:128](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L128)
1150
+ Defined in: [data-structures/graph/abstract-graph.ts:132](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L132)
1151
1151
 
1152
1152
  Get an edge between two vertices if present.
1153
1153
 
@@ -1189,7 +1189,7 @@ IGraph.getEdge
1189
1189
  abstract getEndsOfEdge(edge): [VO, VO] | undefined;
1190
1190
  ```
1191
1191
 
1192
- Defined in: [data-structures/graph/abstract-graph.ts:167](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L167)
1192
+ Defined in: [data-structures/graph/abstract-graph.ts:171](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L171)
1193
1193
 
1194
1194
  Resolve endpoints of an edge to vertex instances.
1195
1195
 
@@ -1228,7 +1228,7 @@ getMinCostBetween(
1228
1228
  isWeight?): number | undefined;
1229
1229
  ```
1230
1230
 
1231
- Defined in: [data-structures/graph/abstract-graph.ts:362](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L362)
1231
+ Defined in: [data-structures/graph/abstract-graph.ts:364](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L364)
1232
1232
 
1233
1233
  Minimum hops/weight between two vertices.
1234
1234
 
@@ -1274,7 +1274,7 @@ getMinPathBetween(
1274
1274
  isDFS?): VO[] | undefined;
1275
1275
  ```
1276
1276
 
1277
- Defined in: [data-structures/graph/abstract-graph.ts:415](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L415)
1277
+ Defined in: [data-structures/graph/abstract-graph.ts:414](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L414)
1278
1278
 
1279
1279
  Minimum path (as vertex sequence) between two vertices.
1280
1280
 
@@ -1322,7 +1322,7 @@ Time O((V + E) log V) weighted / O(V + E) unweighted, Space O(V + E)
1322
1322
  abstract getNeighbors(vertexOrKey): VO[];
1323
1323
  ```
1324
1324
 
1325
- Defined in: [data-structures/graph/abstract-graph.ts:159](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L159)
1325
+ Defined in: [data-structures/graph/abstract-graph.ts:163](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L163)
1326
1326
 
1327
1327
  One-step neighbors of a vertex.
1328
1328
 
@@ -1358,7 +1358,7 @@ IGraph.getNeighbors
1358
1358
  getPathSumWeight(path): number;
1359
1359
  ```
1360
1360
 
1361
- Defined in: [data-structures/graph/abstract-graph.ts:346](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L346)
1361
+ Defined in: [data-structures/graph/abstract-graph.ts:348](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L348)
1362
1362
 
1363
1363
  Sum the weights along a vertex path.
1364
1364
 
@@ -1388,7 +1388,7 @@ Time O(L), Space O(1) where L is path length
1388
1388
  getVertex(vertexKey): VO | undefined;
1389
1389
  ```
1390
1390
 
1391
- Defined in: [data-structures/graph/abstract-graph.ts:175](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L175)
1391
+ Defined in: [data-structures/graph/abstract-graph.ts:179](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L179)
1392
1392
 
1393
1393
  Get vertex instance by key.
1394
1394
 
@@ -1458,7 +1458,7 @@ Time O(n) generic, Space O(1)
1458
1458
  hasEdge(v1, v2): boolean;
1459
1459
  ```
1460
1460
 
1461
- Defined in: [data-structures/graph/abstract-graph.ts:249](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L249)
1461
+ Defined in: [data-structures/graph/abstract-graph.ts:253](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L253)
1462
1462
 
1463
1463
  Whether an edge exists between two vertices.
1464
1464
 
@@ -1528,7 +1528,7 @@ Time O(n), Space O(1)
1528
1528
  hasVertex(vertexOrKey): boolean;
1529
1529
  ```
1530
1530
 
1531
- Defined in: [data-structures/graph/abstract-graph.ts:185](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L185)
1531
+ Defined in: [data-structures/graph/abstract-graph.ts:189](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L189)
1532
1532
 
1533
1533
  Whether a vertex exists.
1534
1534
 
@@ -1596,7 +1596,7 @@ IGraph.isEmpty
1596
1596
  isVertexKey(potentialKey): potentialKey is VertexKey;
1597
1597
  ```
1598
1598
 
1599
- Defined in: [data-structures/graph/abstract-graph.ts:215](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L215)
1599
+ Defined in: [data-structures/graph/abstract-graph.ts:219](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L219)
1600
1600
 
1601
1601
  Type guard: check if a value is a valid vertex key.
1602
1602
 
@@ -1652,7 +1652,7 @@ Time O(n), Space O(1)
1652
1652
  map<T>(callback, thisArg?): T[];
1653
1653
  ```
1654
1654
 
1655
- Defined in: [data-structures/graph/abstract-graph.ts:928](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L928)
1655
+ Defined in: [data-structures/graph/abstract-graph.ts:878](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L878)
1656
1656
 
1657
1657
  Map entries using an implementation-specific strategy.
1658
1658
 
@@ -1692,7 +1692,7 @@ Time O(n), Space O(n)
1692
1692
  print(options?): void;
1693
1693
  ```
1694
1694
 
1695
- Defined in: [data-structures/graph/abstract-graph.ts:1183](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1183)
1695
+ Defined in: [data-structures/graph/abstract-graph.ts:984](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L984)
1696
1696
 
1697
1697
  Print the graph to console.
1698
1698
 
@@ -1768,7 +1768,7 @@ Time O(n), Space O(1)
1768
1768
  removeManyVertices(vertexMap): boolean;
1769
1769
  ```
1770
1770
 
1771
- Defined in: [data-structures/graph/abstract-graph.ts:234](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L234)
1771
+ Defined in: [data-structures/graph/abstract-graph.ts:238](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L238)
1772
1772
 
1773
1773
  Delete multiple vertices.
1774
1774
 
@@ -1801,7 +1801,7 @@ setEdgeWeight(
1801
1801
  weight): boolean;
1802
1802
  ```
1803
1803
 
1804
- Defined in: [data-structures/graph/abstract-graph.ts:291](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L291)
1804
+ Defined in: [data-structures/graph/abstract-graph.ts:298](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L298)
1805
1805
 
1806
1806
  Set the weight of an existing edge.
1807
1807
 
@@ -1909,7 +1909,7 @@ Time O(n), Space O(n)
1909
1909
  toDot(options?): string;
1910
1910
  ```
1911
1911
 
1912
- Defined in: [data-structures/graph/abstract-graph.ts:1143](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1143)
1912
+ Defined in: [data-structures/graph/abstract-graph.ts:952](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L952)
1913
1913
 
1914
1914
  Generate DOT language representation for Graphviz.
1915
1915
 
@@ -1945,7 +1945,7 @@ DOT format string.
1945
1945
  toVisual(options?): string;
1946
1946
  ```
1947
1947
 
1948
- Defined in: [data-structures/graph/abstract-graph.ts:1108](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1108)
1948
+ Defined in: [data-structures/graph/abstract-graph.ts:920](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L920)
1949
1949
 
1950
1950
  Generate a text-based visual representation of the graph.
1951
1951
 
@@ -2020,7 +2020,7 @@ Time O(n), Space O(1)
2020
2020
  get protected _edgeConnector(): string;
2021
2021
  ```
2022
2022
 
2023
- Defined in: [data-structures/graph/abstract-graph.ts:1087](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1087)
2023
+ Defined in: [data-structures/graph/abstract-graph.ts:93](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L93)
2024
2024
 
2025
2025
  The edge connector string used in visual output.
2026
2026
  Override in subclasses (e.g., '--' for undirected, '->' for directed).
@@ -2037,7 +2037,7 @@ Override in subclasses (e.g., '--' for undirected, '->' for directed).
2037
2037
  abstract protected _addEdge(edge): boolean;
2038
2038
  ```
2039
2039
 
2040
- Defined in: [data-structures/graph/abstract-graph.ts:1046](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1046)
2040
+ Defined in: [data-structures/graph/abstract-graph.ts:1081](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1081)
2041
2041
 
2042
2042
  Internal hook to attach an edge into adjacency structures.
2043
2043
 
@@ -2067,7 +2067,7 @@ Time O(1) avg, Space O(1)
2067
2067
  protected _addVertex(newVertex): boolean;
2068
2068
  ```
2069
2069
 
2070
- Defined in: [data-structures/graph/abstract-graph.ts:1054](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1054)
2070
+ Defined in: [data-structures/graph/abstract-graph.ts:1089](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1089)
2071
2071
 
2072
2072
  Insert a pre-built vertex into the graph.
2073
2073
 
@@ -2097,7 +2097,7 @@ Time O(1) avg, Space O(1)
2097
2097
  protected _createInstance(_options?): this;
2098
2098
  ```
2099
2099
 
2100
- Defined in: [data-structures/graph/abstract-graph.ts:987](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L987)
2100
+ Defined in: [data-structures/graph/abstract-graph.ts:1022](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1022)
2101
2101
 
2102
2102
  Create an empty graph instance of the same concrete species.
2103
2103
 
@@ -2127,7 +2127,7 @@ Time O(1), Space O(1)
2127
2127
  protected _createLike(iter?, options?): this;
2128
2128
  ```
2129
2129
 
2130
- Defined in: [data-structures/graph/abstract-graph.ts:1009](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1009)
2130
+ Defined in: [data-structures/graph/abstract-graph.ts:1044](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1044)
2131
2131
 
2132
2132
  Create a same-species graph populated with entries; preserves edges among kept vertices.
2133
2133
 
@@ -2163,7 +2163,7 @@ Time O(V + E), Space O(V + E)
2163
2163
  protected _getIterator(): IterableIterator<[VertexKey, V | undefined]>;
2164
2164
  ```
2165
2165
 
2166
- Defined in: [data-structures/graph/abstract-graph.ts:958](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L958)
2166
+ Defined in: [data-structures/graph/abstract-graph.ts:993](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L993)
2167
2167
 
2168
2168
  Internal iterator over `[key, value]` entries in insertion order.
2169
2169
 
@@ -2189,7 +2189,7 @@ Time O(V), Space O(1)
2189
2189
  protected _getVertex(vertexOrKey): VO | undefined;
2190
2190
  ```
2191
2191
 
2192
- Defined in: [data-structures/graph/abstract-graph.ts:1068](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1068)
2192
+ Defined in: [data-structures/graph/abstract-graph.ts:1103](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1103)
2193
2193
 
2194
2194
  Resolve a vertex key or instance to the concrete vertex instance.
2195
2195
 
@@ -2219,7 +2219,7 @@ Time O(1), Space O(1)
2219
2219
  protected _getVertexKey(vertexOrKey): VertexKey;
2220
2220
  ```
2221
2221
 
2222
- Defined in: [data-structures/graph/abstract-graph.ts:1079](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1079)
2222
+ Defined in: [data-structures/graph/abstract-graph.ts:1114](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1114)
2223
2223
 
2224
2224
  Resolve a vertex key from a key or vertex instance.
2225
2225
 
@@ -2249,7 +2249,7 @@ Time O(1), Space O(1)
2249
2249
  protected _snapshotOptions(): Record<string, unknown>;
2250
2250
  ```
2251
2251
 
2252
- Defined in: [data-structures/graph/abstract-graph.ts:973](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L973)
2252
+ Defined in: [data-structures/graph/abstract-graph.ts:1008](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/graph/abstract-graph.ts#L1008)
2253
2253
 
2254
2254
  Capture configuration needed to reproduce the current graph.
2255
2255