data-structure-typed 2.5.2 → 2.5.3

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 (156) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/MIGRATION.md +169 -0
  3. package/README.md +60 -6
  4. package/README_CN.md +551 -143
  5. package/SPECIFICATION.md +20 -14
  6. package/SPECIFICATION.zh-CN.md +20 -14
  7. package/dist/cjs/binary-tree.cjs +2417 -132
  8. package/dist/cjs/graph.cjs +248 -14
  9. package/dist/cjs/hash.cjs +62 -7
  10. package/dist/cjs/heap.cjs +103 -16
  11. package/dist/cjs/index.cjs +3046 -124
  12. package/dist/cjs/linked-list.cjs +219 -0
  13. package/dist/cjs/matrix.cjs +32 -0
  14. package/dist/cjs/priority-queue.cjs +101 -14
  15. package/dist/cjs/queue.cjs +215 -0
  16. package/dist/cjs/stack.cjs +44 -4
  17. package/dist/cjs/trie.cjs +44 -0
  18. package/dist/cjs-legacy/binary-tree.cjs +2406 -123
  19. package/dist/cjs-legacy/graph.cjs +248 -14
  20. package/dist/cjs-legacy/hash.cjs +62 -7
  21. package/dist/cjs-legacy/heap.cjs +103 -16
  22. package/dist/cjs-legacy/index.cjs +3105 -185
  23. package/dist/cjs-legacy/linked-list.cjs +219 -0
  24. package/dist/cjs-legacy/matrix.cjs +32 -0
  25. package/dist/cjs-legacy/priority-queue.cjs +101 -14
  26. package/dist/cjs-legacy/queue.cjs +215 -0
  27. package/dist/cjs-legacy/stack.cjs +44 -4
  28. package/dist/cjs-legacy/trie.cjs +44 -0
  29. package/dist/esm/binary-tree.mjs +2417 -132
  30. package/dist/esm/graph.mjs +248 -14
  31. package/dist/esm/hash.mjs +62 -7
  32. package/dist/esm/heap.mjs +103 -16
  33. package/dist/esm/index.mjs +3046 -124
  34. package/dist/esm/linked-list.mjs +219 -0
  35. package/dist/esm/matrix.mjs +32 -0
  36. package/dist/esm/priority-queue.mjs +101 -14
  37. package/dist/esm/queue.mjs +215 -0
  38. package/dist/esm/stack.mjs +44 -4
  39. package/dist/esm/trie.mjs +44 -0
  40. package/dist/esm-legacy/binary-tree.mjs +2406 -123
  41. package/dist/esm-legacy/graph.mjs +248 -14
  42. package/dist/esm-legacy/hash.mjs +62 -7
  43. package/dist/esm-legacy/heap.mjs +103 -16
  44. package/dist/esm-legacy/index.mjs +3105 -185
  45. package/dist/esm-legacy/linked-list.mjs +219 -0
  46. package/dist/esm-legacy/matrix.mjs +32 -0
  47. package/dist/esm-legacy/priority-queue.mjs +101 -14
  48. package/dist/esm-legacy/queue.mjs +215 -0
  49. package/dist/esm-legacy/stack.mjs +44 -4
  50. package/dist/esm-legacy/trie.mjs +44 -0
  51. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +50 -2
  52. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +56 -0
  53. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +116 -15
  54. package/dist/types/data-structures/binary-tree/bst.d.ts +99 -3
  55. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +79 -8
  56. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +24 -0
  57. package/dist/types/data-structures/binary-tree/tree-map.d.ts +520 -1
  58. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +489 -1
  59. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +393 -1
  60. package/dist/types/data-structures/binary-tree/tree-set.d.ts +500 -1
  61. package/dist/types/data-structures/graph/directed-graph.d.ts +40 -0
  62. package/dist/types/data-structures/graph/undirected-graph.d.ts +36 -0
  63. package/dist/types/data-structures/hash/hash-map.d.ts +51 -6
  64. package/dist/types/data-structures/heap/heap.d.ts +98 -12
  65. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +75 -0
  66. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +61 -1
  67. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +72 -0
  68. package/dist/types/data-structures/matrix/matrix.d.ts +32 -0
  69. package/dist/types/data-structures/queue/deque.d.ts +82 -0
  70. package/dist/types/data-structures/queue/queue.d.ts +61 -0
  71. package/dist/types/data-structures/stack/stack.d.ts +42 -2
  72. package/dist/types/data-structures/trie/trie.d.ts +48 -0
  73. package/dist/types/interfaces/binary-tree.d.ts +2 -3
  74. package/dist/umd/data-structure-typed.js +3105 -185
  75. package/dist/umd/data-structure-typed.min.js +4 -4
  76. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +188 -200
  77. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +11 -11
  78. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +62 -62
  79. package/docs-site-docusaurus/docs/api/classes/BST.md +183 -195
  80. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +13 -13
  81. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +15 -15
  82. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +143 -155
  83. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  84. package/docs-site-docusaurus/docs/api/classes/Deque.md +99 -85
  85. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +73 -73
  86. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +100 -70
  87. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +8 -8
  88. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +12 -12
  89. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  90. package/docs-site-docusaurus/docs/api/classes/HashMap.md +38 -38
  91. package/docs-site-docusaurus/docs/api/classes/Heap.md +96 -85
  92. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +25 -25
  93. package/docs-site-docusaurus/docs/api/classes/IterableEntryBase.md +23 -23
  94. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +48 -48
  95. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +52 -52
  96. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +42 -42
  97. package/docs-site-docusaurus/docs/api/classes/LinkedListNode.md +6 -6
  98. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +74 -74
  99. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +73 -73
  100. package/docs-site-docusaurus/docs/api/classes/Matrix.md +31 -31
  101. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +104 -89
  102. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +104 -89
  103. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +104 -89
  104. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +104 -89
  105. package/docs-site-docusaurus/docs/api/classes/Navigator.md +5 -5
  106. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +103 -88
  107. package/docs-site-docusaurus/docs/api/classes/Queue.md +111 -59
  108. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +200 -212
  109. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -10
  110. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +75 -75
  111. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +6 -6
  112. package/docs-site-docusaurus/docs/api/classes/SkipList.md +37 -37
  113. package/docs-site-docusaurus/docs/api/classes/Stack.md +42 -42
  114. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +107 -36
  115. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +43 -43
  116. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +106 -35
  117. package/docs-site-docusaurus/docs/api/classes/Trie.md +43 -43
  118. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  119. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +72 -72
  120. package/docs-site-docusaurus/docs/guide/architecture.md +75 -7
  121. package/docs-site-docusaurus/docs/guide/concepts.md +53 -34
  122. package/docs-site-docusaurus/docs/guide/faq.md +53 -0
  123. package/docs-site-docusaurus/docs/guide/guides.md +8 -9
  124. package/docs-site-docusaurus/docs/guide/integrations.md +74 -177
  125. package/docs-site-docusaurus/docs/guide/overview.md +131 -17
  126. package/docs-site-docusaurus/src/pages/index.tsx +4 -0
  127. package/docs-site-docusaurus/typedoc.json +1 -0
  128. package/package.json +7 -6
  129. package/src/data-structures/binary-tree/avl-tree.ts +52 -5
  130. package/src/data-structures/binary-tree/binary-indexed-tree.ts +56 -0
  131. package/src/data-structures/binary-tree/binary-tree.ts +167 -81
  132. package/src/data-structures/binary-tree/bst.ts +101 -7
  133. package/src/data-structures/binary-tree/red-black-tree.ts +82 -15
  134. package/src/data-structures/binary-tree/segment-tree.ts +24 -0
  135. package/src/data-structures/binary-tree/tree-map.ts +540 -3
  136. package/src/data-structures/binary-tree/tree-multi-map.ts +490 -2
  137. package/src/data-structures/binary-tree/tree-multi-set.ts +393 -1
  138. package/src/data-structures/binary-tree/tree-set.ts +520 -3
  139. package/src/data-structures/graph/directed-graph.ts +41 -1
  140. package/src/data-structures/graph/undirected-graph.ts +37 -1
  141. package/src/data-structures/hash/hash-map.ts +67 -12
  142. package/src/data-structures/heap/heap.ts +107 -19
  143. package/src/data-structures/linked-list/doubly-linked-list.ts +88 -0
  144. package/src/data-structures/linked-list/singly-linked-list.ts +61 -1
  145. package/src/data-structures/linked-list/skip-linked-list.ts +72 -0
  146. package/src/data-structures/matrix/matrix.ts +32 -0
  147. package/src/data-structures/queue/deque.ts +85 -0
  148. package/src/data-structures/queue/queue.ts +73 -0
  149. package/src/data-structures/stack/stack.ts +45 -5
  150. package/src/data-structures/trie/trie.ts +48 -0
  151. package/src/interfaces/binary-tree.ts +1 -9
  152. package/.vitepress/cache/deps_temp_51f5f1b0/chunk-7OIKW5WK.js +0 -12984
  153. package/.vitepress/cache/deps_temp_51f5f1b0/package.json +0 -3
  154. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vue_devtools-api.js +0 -4505
  155. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vueuse_core.js +0 -9731
  156. package/.vitepress/cache/deps_temp_51f5f1b0/vue.js +0 -347
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: DoublyLinkedListNode\<E\>
8
8
 
9
- Defined in: [data-structures/linked-list/doubly-linked-list.ts:17](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/doubly-linked-list.ts#L17)
9
+ Defined in: [data-structures/linked-list/doubly-linked-list.ts:17](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/doubly-linked-list.ts#L17)
10
10
 
11
11
  Node of a doubly linked list; stores value and prev/next links.
12
12
 
@@ -32,7 +32,7 @@ Time O(1), Space O(1)
32
32
  new DoublyLinkedListNode<E>(value): DoublyLinkedListNode<E>;
33
33
  ```
34
34
 
35
- Defined in: [data-structures/linked-list/doubly-linked-list.ts:25](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/doubly-linked-list.ts#L25)
35
+ Defined in: [data-structures/linked-list/doubly-linked-list.ts:25](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/doubly-linked-list.ts#L25)
36
36
 
37
37
  Create a node.
38
38
 
@@ -68,7 +68,7 @@ Time O(1), Space O(1)
68
68
  get next(): DoublyLinkedListNode<E> | undefined;
69
69
  ```
70
70
 
71
- Defined in: [data-structures/linked-list/doubly-linked-list.ts:40](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/doubly-linked-list.ts#L40)
71
+ Defined in: [data-structures/linked-list/doubly-linked-list.ts:40](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/doubly-linked-list.ts#L40)
72
72
 
73
73
  Get the next node link.
74
74
 
@@ -88,7 +88,7 @@ Next node or undefined.
88
88
  set next(value): void;
89
89
  ```
90
90
 
91
- Defined in: [data-structures/linked-list/doubly-linked-list.ts:51](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/doubly-linked-list.ts#L51)
91
+ Defined in: [data-structures/linked-list/doubly-linked-list.ts:51](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/doubly-linked-list.ts#L51)
92
92
 
93
93
  Set the next node link.
94
94
 
@@ -124,7 +124,7 @@ void
124
124
  get prev(): DoublyLinkedListNode<E> | undefined;
125
125
  ```
126
126
 
127
- Defined in: [data-structures/linked-list/doubly-linked-list.ts:63](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/doubly-linked-list.ts#L63)
127
+ Defined in: [data-structures/linked-list/doubly-linked-list.ts:63](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/doubly-linked-list.ts#L63)
128
128
 
129
129
  Get the previous node link.
130
130
 
@@ -144,7 +144,7 @@ Previous node or undefined.
144
144
  set prev(value): void;
145
145
  ```
146
146
 
147
- Defined in: [data-structures/linked-list/doubly-linked-list.ts:74](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/doubly-linked-list.ts#L74)
147
+ Defined in: [data-structures/linked-list/doubly-linked-list.ts:74](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/doubly-linked-list.ts#L74)
148
148
 
149
149
  Set the previous node link.
150
150
 
@@ -176,7 +176,7 @@ void
176
176
  get value(): E;
177
177
  ```
178
178
 
179
- Defined in: [data-structures/base/linear-base.ts:27](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/linear-base.ts#L27)
179
+ Defined in: [data-structures/base/linear-base.ts:27](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L27)
180
180
 
181
181
  Element payload getter.
182
182
 
@@ -196,7 +196,7 @@ Element value.
196
196
  set value(value): void;
197
197
  ```
198
198
 
199
- Defined in: [data-structures/base/linear-base.ts:36](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/linear-base.ts#L36)
199
+ Defined in: [data-structures/base/linear-base.ts:36](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L36)
200
200
 
201
201
  Element payload setter.
202
202
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: FibonacciHeap\<E\>
8
8
 
9
- Defined in: [data-structures/heap/heap.ts:1300](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1300)
9
+ Defined in: [data-structures/heap/heap.ts:1388](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1388)
10
10
 
11
11
  Fibonacci heap (min-heap) optimized for fast merges and amortized operations.
12
12
 
@@ -34,7 +34,7 @@ examples will be generated by unit test
34
34
  new FibonacciHeap<E>(comparator?): FibonacciHeap<E>;
35
35
  ```
36
36
 
37
- Defined in: [data-structures/heap/heap.ts:1308](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1308)
37
+ Defined in: [data-structures/heap/heap.ts:1396](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1396)
38
38
 
39
39
  Create a FibonacciHeap.
40
40
 
@@ -66,7 +66,7 @@ Time O(1), Space O(1)
66
66
  get min(): FibonacciHeapNode<E> | undefined;
67
67
  ```
68
68
 
69
- Defined in: [data-structures/heap/heap.ts:1339](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1339)
69
+ Defined in: [data-structures/heap/heap.ts:1427](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1427)
70
70
 
71
71
  Get the current minimum node.
72
72
 
@@ -90,7 +90,7 @@ Min node or undefined.
90
90
  get root(): FibonacciHeapNode<E> | undefined;
91
91
  ```
92
92
 
93
- Defined in: [data-structures/heap/heap.ts:1322](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1322)
93
+ Defined in: [data-structures/heap/heap.ts:1410](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1410)
94
94
 
95
95
  Get the circular root list head.
96
96
 
@@ -112,7 +112,7 @@ Root node or undefined.
112
112
  consumeLinkedList(head?): FibonacciHeapNode<E>[];
113
113
  ```
114
114
 
115
- Defined in: [data-structures/heap/heap.ts:1388](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1388)
115
+ Defined in: [data-structures/heap/heap.ts:1476](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1476)
116
116
 
117
117
  Collect nodes from a circular doubly linked list starting at head.
118
118
 
@@ -142,7 +142,7 @@ Time O(K), Space O(K)
142
142
  merge(heapToMerge): void;
143
143
  ```
144
144
 
145
- Defined in: [data-structures/heap/heap.ts:1459](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1459)
145
+ Defined in: [data-structures/heap/heap.ts:1547](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1547)
146
146
 
147
147
  Meld another heap into this heap.
148
148
 
@@ -172,7 +172,7 @@ Time O(1), Space O(1)
172
172
  mergeWithChild(parent, node): void;
173
173
  ```
174
174
 
175
- Defined in: [data-structures/heap/heap.ts:1410](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1410)
175
+ Defined in: [data-structures/heap/heap.ts:1498](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1498)
176
176
 
177
177
  Insert a node into a parent's child list (circular).
178
178
 
@@ -208,7 +208,7 @@ Time O(1), Space O(1)
208
208
  pop(): E | undefined;
209
209
  ```
210
210
 
211
- Defined in: [data-structures/heap/heap.ts:1430](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1430)
211
+ Defined in: [data-structures/heap/heap.ts:1518](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1518)
212
212
 
213
213
  Remove and return the minimum element, consolidating the root list.
214
214
 
@@ -227,10 +227,10 @@ Time O(log N) amortized, Space O(1)
227
227
  ### push()
228
228
 
229
229
  ```ts
230
- push(element): this;
230
+ push(element): boolean;
231
231
  ```
232
232
 
233
- Defined in: [data-structures/heap/heap.ts:1367](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1367)
233
+ Defined in: [data-structures/heap/heap.ts:1455](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1455)
234
234
 
235
235
  Push an element into the root list.
236
236
 
@@ -244,9 +244,9 @@ Element to insert.
244
244
 
245
245
  #### Returns
246
246
 
247
- `this`
247
+ `boolean`
248
248
 
249
- This heap.
249
+ True when the element is added.
250
250
 
251
251
  #### Remarks
252
252
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: FibonacciHeapNode\<E\>
8
8
 
9
- Defined in: [data-structures/heap/heap.ts:1278](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/heap/heap.ts#L1278)
9
+ Defined in: [data-structures/heap/heap.ts:1366](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/heap/heap.ts#L1366)
10
10
 
11
11
  Node container used by FibonacciHeap.
12
12
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: HashMap\<K, V, R\>
8
8
 
9
- Defined in: [data-structures/hash/hash-map.ts:97](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L97)
9
+ Defined in: [data-structures/hash/hash-map.ts:97](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L97)
10
10
 
11
11
  Hash-based map. Supports object keys and custom hashing; offers O(1) average set/get/has.
12
12
 
@@ -119,7 +119,7 @@ If you try to insert another entry with the same key, the new one will replace t
119
119
  new HashMap<K, V, R>(entryOrRawElements?, options?): HashMap<K, V, R>;
120
120
  ```
121
121
 
122
- Defined in: [data-structures/hash/hash-map.ts:105](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L105)
122
+ Defined in: [data-structures/hash/hash-map.ts:105](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L105)
123
123
 
124
124
  Create a HashMap and optionally bulk-insert entries.
125
125
 
@@ -163,7 +163,7 @@ IterableEntryBase<K, V>.constructor
163
163
  get hashFn(): (key) => string;
164
164
  ```
165
165
 
166
- Defined in: [data-structures/hash/hash-map.ts:166](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L166)
166
+ Defined in: [data-structures/hash/hash-map.ts:166](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L166)
167
167
 
168
168
  Get the current hash function for non-object keys.
169
169
 
@@ -187,7 +187,7 @@ Hash function.
187
187
  get objMap(): Map<object, V>;
188
188
  ```
189
189
 
190
- Defined in: [data-structures/hash/hash-map.ts:133](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L133)
190
+ Defined in: [data-structures/hash/hash-map.ts:133](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L133)
191
191
 
192
192
  Get the internal Map used for object/function keys.
193
193
 
@@ -211,7 +211,7 @@ Map of object→value.
211
211
  get size(): number;
212
212
  ```
213
213
 
214
- Defined in: [data-structures/hash/hash-map.ts:155](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L155)
214
+ Defined in: [data-structures/hash/hash-map.ts:155](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L155)
215
215
 
216
216
  Get the number of distinct keys stored.
217
217
 
@@ -239,7 +239,7 @@ Current size.
239
239
  get store(): object;
240
240
  ```
241
241
 
242
- Defined in: [data-structures/hash/hash-map.ts:122](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L122)
242
+ Defined in: [data-structures/hash/hash-map.ts:122](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L122)
243
243
 
244
244
  Get the internal store for non-object keys.
245
245
 
@@ -263,7 +263,7 @@ Internal record of string→{key,value}.
263
263
  get toEntryFn(): ((rawElement) => [K, V]) | undefined;
264
264
  ```
265
265
 
266
- Defined in: [data-structures/hash/hash-map.ts:144](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L144)
266
+ Defined in: [data-structures/hash/hash-map.ts:144](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L144)
267
267
 
268
268
  Get the raw→entry converter function if present.
269
269
 
@@ -285,7 +285,7 @@ Converter function or undefined.
285
285
  iterator: IterableIterator<[K, V]>;
286
286
  ```
287
287
 
288
- Defined in: [data-structures/base/iterable-entry-base.ts:22](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L22)
288
+ Defined in: [data-structures/base/iterable-entry-base.ts:22](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L22)
289
289
 
290
290
  Default iterator yielding `[key, value]` entries.
291
291
 
@@ -317,7 +317,7 @@ Time O(n) to iterate, Space O(1)
317
317
  clear(): void;
318
318
  ```
319
319
 
320
- Defined in: [data-structures/hash/hash-map.ts:259](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L259)
320
+ Defined in: [data-structures/hash/hash-map.ts:267](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L267)
321
321
 
322
322
  Remove all entries and reset counters.
323
323
 
@@ -354,7 +354,7 @@ Time O(N), Space O(1)
354
354
  clone(): this;
355
355
  ```
356
356
 
357
- Defined in: [data-structures/hash/hash-map.ts:676](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L676)
357
+ Defined in: [data-structures/hash/hash-map.ts:716](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L716)
358
358
 
359
359
  Deep clone this map, preserving hashing behavior.
360
360
 
@@ -392,7 +392,7 @@ Time O(N), Space O(N)
392
392
  delete(key): boolean;
393
393
  ```
394
394
 
395
- Defined in: [data-structures/hash/hash-map.ts:605](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L605)
395
+ Defined in: [data-structures/hash/hash-map.ts:641](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L641)
396
396
 
397
397
  Delete an entry by key.
398
398
 
@@ -435,7 +435,7 @@ Time O(1), Space O(1)
435
435
  entries(): IterableIterator<[K, V | undefined]>;
436
436
  ```
437
437
 
438
- Defined in: [data-structures/base/iterable-entry-base.ts:31](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L31)
438
+ Defined in: [data-structures/base/iterable-entry-base.ts:31](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L31)
439
439
 
440
440
  Iterate over `[key, value]` pairs (may yield `undefined` values).
441
441
 
@@ -461,7 +461,7 @@ Time O(n), Space O(1)
461
461
  every(predicate, thisArg?): boolean;
462
462
  ```
463
463
 
464
- Defined in: [data-structures/base/iterable-entry-base.ts:66](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L66)
464
+ Defined in: [data-structures/base/iterable-entry-base.ts:66](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L66)
465
465
 
466
466
  Test whether all entries satisfy the predicate.
467
467
 
@@ -498,10 +498,10 @@ Time O(n), Space O(1)
498
498
  ### filter()
499
499
 
500
500
  ```ts
501
- filter(predicate, thisArg?): any;
501
+ filter(predicate, thisArg?): this;
502
502
  ```
503
503
 
504
- Defined in: [data-structures/hash/hash-map.ts:806](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L806)
504
+ Defined in: [data-structures/hash/hash-map.ts:854](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L854)
505
505
 
506
506
  Filter entries into a new map.
507
507
 
@@ -521,7 +521,7 @@ Value for `this` inside the predicate.
521
521
 
522
522
  #### Returns
523
523
 
524
- `any`
524
+ `this`
525
525
 
526
526
  A new map containing entries that satisfied the predicate.
527
527
 
@@ -572,7 +572,7 @@ Time O(N), Space O(N)
572
572
  find(callbackfn, thisArg?): [K, V] | undefined;
573
573
  ```
574
574
 
575
- Defined in: [data-structures/base/iterable-entry-base.ts:114](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L114)
575
+ Defined in: [data-structures/base/iterable-entry-base.ts:114](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L114)
576
576
 
577
577
  Find the first entry that matches a predicate.
578
578
 
@@ -612,7 +612,7 @@ Time O(n), Space O(1)
612
612
  forEach(callbackfn, thisArg?): void;
613
613
  ```
614
614
 
615
- Defined in: [data-structures/base/iterable-entry-base.ts:99](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L99)
615
+ Defined in: [data-structures/base/iterable-entry-base.ts:99](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L99)
616
616
 
617
617
  Visit each entry, left-to-right.
618
618
 
@@ -650,7 +650,7 @@ Time O(n), Space O(1)
650
650
  get(key): V | undefined;
651
651
  ```
652
652
 
653
- Defined in: [data-structures/hash/hash-map.ts:498](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L498)
653
+ Defined in: [data-structures/hash/hash-map.ts:526](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L526)
654
654
 
655
655
  Get the value for a key.
656
656
 
@@ -711,7 +711,7 @@ Time O(1), Space O(1)
711
711
  has(key): boolean;
712
712
  ```
713
713
 
714
- Defined in: [data-structures/hash/hash-map.ts:551](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L551)
714
+ Defined in: [data-structures/hash/hash-map.ts:583](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L583)
715
715
 
716
716
  Check if a key exists.
717
717
 
@@ -757,7 +757,7 @@ Time O(1), Space O(1)
757
757
  hasValue(value): boolean;
758
758
  ```
759
759
 
760
- Defined in: [data-structures/base/iterable-entry-base.ts:143](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L143)
760
+ Defined in: [data-structures/base/iterable-entry-base.ts:143](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L143)
761
761
 
762
762
  Whether there exists an entry with the given value.
763
763
 
@@ -791,7 +791,7 @@ Time O(n), Space O(1)
791
791
  isEmpty(): boolean;
792
792
  ```
793
793
 
794
- Defined in: [data-structures/hash/hash-map.ts:212](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L212)
794
+ Defined in: [data-structures/hash/hash-map.ts:216](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L216)
795
795
 
796
796
  Check whether the map is empty.
797
797
 
@@ -827,7 +827,7 @@ Time O(1), Space O(1)
827
827
  isEntry(rawElement): rawElement is [K, V];
828
828
  ```
829
829
 
830
- Defined in: [data-structures/hash/hash-map.ts:270](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L270)
830
+ Defined in: [data-structures/hash/hash-map.ts:278](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L278)
831
831
 
832
832
  Type guard: check if a raw value is a [key, value] entry.
833
833
 
@@ -855,7 +855,7 @@ Time O(1), Space O(1)
855
855
  keys(): IterableIterator<K>;
856
856
  ```
857
857
 
858
- Defined in: [data-structures/base/iterable-entry-base.ts:42](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L42)
858
+ Defined in: [data-structures/base/iterable-entry-base.ts:42](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L42)
859
859
 
860
860
  Iterate over keys only.
861
861
 
@@ -881,7 +881,7 @@ Time O(n), Space O(1)
881
881
  map<VM>(callbackfn, thisArg?): HashMap<K, VM>;
882
882
  ```
883
883
 
884
- Defined in: [data-structures/hash/hash-map.ts:731](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L731)
884
+ Defined in: [data-structures/hash/hash-map.ts:775](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L775)
885
885
 
886
886
  Map values to a new map with the same keys.
887
887
 
@@ -940,7 +940,7 @@ Time O(N), Space O(N)
940
940
  print(): void;
941
941
  ```
942
942
 
943
- Defined in: [data-structures/base/iterable-entry-base.ts:203](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L203)
943
+ Defined in: [data-structures/base/iterable-entry-base.ts:203](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L203)
944
944
 
945
945
  Print a human-friendly representation to the console.
946
946
 
@@ -964,7 +964,7 @@ Time O(n), Space O(n)
964
964
  reduce<U>(callbackfn, initialValue): U;
965
965
  ```
966
966
 
967
- Defined in: [data-structures/base/iterable-entry-base.ts:171](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L171)
967
+ Defined in: [data-structures/base/iterable-entry-base.ts:171](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L171)
968
968
 
969
969
  Reduce entries into a single accumulator.
970
970
 
@@ -1007,10 +1007,10 @@ Time O(n), Space O(1)
1007
1007
  ### set()
1008
1008
 
1009
1009
  ```ts
1010
- set(key, value): boolean;
1010
+ set(key, value): this;
1011
1011
  ```
1012
1012
 
1013
- Defined in: [data-structures/hash/hash-map.ts:369](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L369)
1013
+ Defined in: [data-structures/hash/hash-map.ts:385](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L385)
1014
1014
 
1015
1015
  Insert or replace a single entry.
1016
1016
 
@@ -1030,7 +1030,7 @@ Value.
1030
1030
 
1031
1031
  #### Returns
1032
1032
 
1033
- `boolean`
1033
+ `this`
1034
1034
 
1035
1035
  True when the operation succeeds.
1036
1036
 
@@ -1070,7 +1070,7 @@ Time O(1), Space O(1)
1070
1070
  setHashFn(fn): this;
1071
1071
  ```
1072
1072
 
1073
- Defined in: [data-structures/hash/hash-map.ts:625](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L625)
1073
+ Defined in: [data-structures/hash/hash-map.ts:661](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L661)
1074
1074
 
1075
1075
  Replace the hash function and rehash the non-object store.
1076
1076
 
@@ -1100,7 +1100,7 @@ Time O(N), Space O(N)
1100
1100
  setMany(entryOrRawElements): boolean[];
1101
1101
  ```
1102
1102
 
1103
- Defined in: [data-structures/hash/hash-map.ts:425](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L425)
1103
+ Defined in: [data-structures/hash/hash-map.ts:445](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L445)
1104
1104
 
1105
1105
  Insert many entries from an iterable.
1106
1106
 
@@ -1141,7 +1141,7 @@ Time O(N), Space O(N)
1141
1141
  some(predicate, thisArg?): boolean;
1142
1142
  ```
1143
1143
 
1144
- Defined in: [data-structures/base/iterable-entry-base.ts:83](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L83)
1144
+ Defined in: [data-structures/base/iterable-entry-base.ts:83](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L83)
1145
1145
 
1146
1146
  Test whether any entry satisfies the predicate.
1147
1147
 
@@ -1181,7 +1181,7 @@ Time O(n), Space O(1)
1181
1181
  toArray(): [K, V][];
1182
1182
  ```
1183
1183
 
1184
- Defined in: [data-structures/base/iterable-entry-base.ts:186](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L186)
1184
+ Defined in: [data-structures/base/iterable-entry-base.ts:186](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L186)
1185
1185
 
1186
1186
  Converts data structure to `[key, value]` pairs.
1187
1187
 
@@ -1207,7 +1207,7 @@ Time O(n), Space O(n)
1207
1207
  toVisual(): string | [K, V][];
1208
1208
  ```
1209
1209
 
1210
- Defined in: [data-structures/base/iterable-entry-base.ts:195](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L195)
1210
+ Defined in: [data-structures/base/iterable-entry-base.ts:195](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L195)
1211
1211
 
1212
1212
  Visualize the iterable as an array of `[key, value]` pairs (or a custom string).
1213
1213
 
@@ -1233,7 +1233,7 @@ Time O(n), Space O(n)
1233
1233
  values(): IterableIterator<V>;
1234
1234
  ```
1235
1235
 
1236
- Defined in: [data-structures/base/iterable-entry-base.ts:53](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L53)
1236
+ Defined in: [data-structures/base/iterable-entry-base.ts:53](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L53)
1237
1237
 
1238
1238
  Iterate over values only.
1239
1239
 
@@ -1262,7 +1262,7 @@ Time O(n), Space O(1)
1262
1262
  protected _createLike<TK, TV, TR>(entries?, options?): this;
1263
1263
  ```
1264
1264
 
1265
- Defined in: [data-structures/hash/hash-map.ts:823](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L823)
1265
+ Defined in: [data-structures/hash/hash-map.ts:871](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L871)
1266
1266
 
1267
1267
  (Protected) Create a like-kind instance and seed it from an iterable.
1268
1268
 
@@ -1312,7 +1312,7 @@ Time O(N), Space O(N)
1312
1312
  protected _getIterator(): IterableIterator<[K, V]>;
1313
1313
  ```
1314
1314
 
1315
- Defined in: [data-structures/hash/hash-map.ts:837](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/hash/hash-map.ts#L837)
1315
+ Defined in: [data-structures/hash/hash-map.ts:885](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L885)
1316
1316
 
1317
1317
  Underlying iterator for the default iteration protocol.
1318
1318