data-structure-typed 2.5.2 → 2.6.0

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 (162) hide show
  1. package/.husky/pre-commit +3 -0
  2. package/CHANGELOG.md +3 -1
  3. package/MIGRATION.md +217 -0
  4. package/README.md +80 -8
  5. package/README_CN.md +569 -143
  6. package/SPECIFICATION.md +44 -14
  7. package/SPECIFICATION.zh-CN.md +44 -14
  8. package/dist/cjs/binary-tree.cjs +5841 -1678
  9. package/dist/cjs/graph.cjs +422 -14
  10. package/dist/cjs/hash.cjs +95 -7
  11. package/dist/cjs/heap.cjs +174 -16
  12. package/dist/cjs/index.cjs +7751 -2449
  13. package/dist/cjs/linked-list.cjs +443 -2
  14. package/dist/cjs/matrix.cjs +56 -0
  15. package/dist/cjs/priority-queue.cjs +172 -14
  16. package/dist/cjs/queue.cjs +435 -0
  17. package/dist/cjs/stack.cjs +103 -4
  18. package/dist/cjs/trie.cjs +106 -0
  19. package/dist/cjs-legacy/binary-tree.cjs +5933 -1772
  20. package/dist/cjs-legacy/graph.cjs +422 -14
  21. package/dist/cjs-legacy/hash.cjs +95 -7
  22. package/dist/cjs-legacy/heap.cjs +174 -16
  23. package/dist/cjs-legacy/index.cjs +8154 -2854
  24. package/dist/cjs-legacy/linked-list.cjs +443 -2
  25. package/dist/cjs-legacy/matrix.cjs +56 -0
  26. package/dist/cjs-legacy/priority-queue.cjs +172 -14
  27. package/dist/cjs-legacy/queue.cjs +435 -0
  28. package/dist/cjs-legacy/stack.cjs +103 -4
  29. package/dist/cjs-legacy/trie.cjs +106 -0
  30. package/dist/esm/binary-tree.mjs +5841 -1678
  31. package/dist/esm/graph.mjs +422 -14
  32. package/dist/esm/hash.mjs +95 -7
  33. package/dist/esm/heap.mjs +174 -16
  34. package/dist/esm/index.mjs +7751 -2449
  35. package/dist/esm/linked-list.mjs +443 -2
  36. package/dist/esm/matrix.mjs +56 -0
  37. package/dist/esm/priority-queue.mjs +172 -14
  38. package/dist/esm/queue.mjs +435 -0
  39. package/dist/esm/stack.mjs +103 -4
  40. package/dist/esm/trie.mjs +106 -0
  41. package/dist/esm-legacy/binary-tree.mjs +5933 -1772
  42. package/dist/esm-legacy/graph.mjs +422 -14
  43. package/dist/esm-legacy/hash.mjs +95 -7
  44. package/dist/esm-legacy/heap.mjs +174 -16
  45. package/dist/esm-legacy/index.mjs +8154 -2854
  46. package/dist/esm-legacy/linked-list.mjs +443 -2
  47. package/dist/esm-legacy/matrix.mjs +56 -0
  48. package/dist/esm-legacy/priority-queue.mjs +172 -14
  49. package/dist/esm-legacy/queue.mjs +435 -0
  50. package/dist/esm-legacy/stack.mjs +103 -4
  51. package/dist/esm-legacy/trie.mjs +106 -0
  52. package/dist/types/data-structures/base/iterable-element-base.d.ts +17 -0
  53. package/dist/types/data-structures/base/linear-base.d.ts +6 -0
  54. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +86 -2
  55. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +98 -0
  56. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +191 -15
  57. package/dist/types/data-structures/binary-tree/bst.d.ts +171 -3
  58. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +136 -8
  59. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +42 -0
  60. package/dist/types/data-structures/binary-tree/tree-map.d.ts +1061 -167
  61. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +1232 -355
  62. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +916 -194
  63. package/dist/types/data-structures/binary-tree/tree-set.d.ts +1078 -141
  64. package/dist/types/data-structures/graph/directed-graph.d.ts +70 -0
  65. package/dist/types/data-structures/graph/undirected-graph.d.ts +63 -0
  66. package/dist/types/data-structures/hash/hash-map.d.ts +84 -6
  67. package/dist/types/data-structures/heap/heap.d.ts +140 -12
  68. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +150 -2
  69. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +106 -1
  70. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +126 -0
  71. package/dist/types/data-structures/matrix/matrix.d.ts +56 -0
  72. package/dist/types/data-structures/queue/deque.d.ts +171 -0
  73. package/dist/types/data-structures/queue/queue.d.ts +97 -0
  74. package/dist/types/data-structures/stack/stack.d.ts +72 -2
  75. package/dist/types/data-structures/trie/trie.d.ts +84 -0
  76. package/dist/types/interfaces/binary-tree.d.ts +2 -3
  77. package/dist/umd/data-structure-typed.js +7784 -2484
  78. package/dist/umd/data-structure-typed.min.js +4 -4
  79. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +188 -200
  80. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +11 -11
  81. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +62 -62
  82. package/docs-site-docusaurus/docs/api/classes/BST.md +183 -195
  83. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +13 -13
  84. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +15 -15
  85. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +143 -155
  86. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  87. package/docs-site-docusaurus/docs/api/classes/Deque.md +99 -85
  88. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +73 -73
  89. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +100 -70
  90. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +8 -8
  91. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +12 -12
  92. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  93. package/docs-site-docusaurus/docs/api/classes/HashMap.md +38 -38
  94. package/docs-site-docusaurus/docs/api/classes/Heap.md +96 -85
  95. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +25 -25
  96. package/docs-site-docusaurus/docs/api/classes/IterableEntryBase.md +23 -23
  97. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +48 -48
  98. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +52 -52
  99. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +46 -42
  100. package/docs-site-docusaurus/docs/api/classes/LinkedListNode.md +6 -6
  101. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +74 -74
  102. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +73 -73
  103. package/docs-site-docusaurus/docs/api/classes/Matrix.md +31 -31
  104. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +104 -89
  105. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +104 -89
  106. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +104 -89
  107. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +104 -89
  108. package/docs-site-docusaurus/docs/api/classes/Navigator.md +5 -5
  109. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +103 -88
  110. package/docs-site-docusaurus/docs/api/classes/Queue.md +111 -59
  111. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +200 -212
  112. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -10
  113. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +75 -75
  114. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +6 -6
  115. package/docs-site-docusaurus/docs/api/classes/SkipList.md +37 -37
  116. package/docs-site-docusaurus/docs/api/classes/Stack.md +42 -42
  117. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +107 -36
  118. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +43 -43
  119. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +106 -35
  120. package/docs-site-docusaurus/docs/api/classes/Trie.md +43 -43
  121. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  122. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +72 -72
  123. package/docs-site-docusaurus/docs/guide/architecture.md +75 -7
  124. package/docs-site-docusaurus/docs/guide/concepts.md +53 -34
  125. package/docs-site-docusaurus/docs/guide/faq.md +53 -0
  126. package/docs-site-docusaurus/docs/guide/guides.md +8 -9
  127. package/docs-site-docusaurus/docs/guide/integrations.md +74 -177
  128. package/docs-site-docusaurus/docs/guide/overview.md +131 -17
  129. package/docs-site-docusaurus/src/pages/index.tsx +4 -0
  130. package/docs-site-docusaurus/typedoc.json +1 -0
  131. package/jest.integration.config.js +1 -2
  132. package/package.json +10 -7
  133. package/src/data-structures/base/iterable-element-base.ts +32 -0
  134. package/src/data-structures/base/linear-base.ts +11 -0
  135. package/src/data-structures/binary-tree/avl-tree.ts +88 -5
  136. package/src/data-structures/binary-tree/binary-indexed-tree.ts +98 -0
  137. package/src/data-structures/binary-tree/binary-tree.ts +242 -81
  138. package/src/data-structures/binary-tree/bst.ts +173 -7
  139. package/src/data-structures/binary-tree/red-black-tree.ts +139 -15
  140. package/src/data-structures/binary-tree/segment-tree.ts +42 -0
  141. package/src/data-structures/binary-tree/tree-map.ts +948 -36
  142. package/src/data-structures/binary-tree/tree-multi-map.ts +893 -13
  143. package/src/data-structures/binary-tree/tree-multi-set.ts +761 -33
  144. package/src/data-structures/binary-tree/tree-set.ts +1260 -251
  145. package/src/data-structures/graph/directed-graph.ts +71 -1
  146. package/src/data-structures/graph/undirected-graph.ts +64 -1
  147. package/src/data-structures/hash/hash-map.ts +100 -12
  148. package/src/data-structures/heap/heap.ts +149 -19
  149. package/src/data-structures/linked-list/doubly-linked-list.ts +178 -2
  150. package/src/data-structures/linked-list/singly-linked-list.ts +106 -1
  151. package/src/data-structures/linked-list/skip-linked-list.ts +126 -0
  152. package/src/data-structures/matrix/matrix.ts +56 -0
  153. package/src/data-structures/queue/deque.ts +187 -0
  154. package/src/data-structures/queue/queue.ts +109 -0
  155. package/src/data-structures/stack/stack.ts +75 -5
  156. package/src/data-structures/trie/trie.ts +84 -0
  157. package/src/interfaces/binary-tree.ts +1 -9
  158. package/.vitepress/cache/deps_temp_51f5f1b0/chunk-7OIKW5WK.js +0 -12984
  159. package/.vitepress/cache/deps_temp_51f5f1b0/package.json +0 -3
  160. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vue_devtools-api.js +0 -4505
  161. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vueuse_core.js +0 -9731
  162. package/.vitepress/cache/deps_temp_51f5f1b0/vue.js +0 -347
@@ -1,347 +0,0 @@
1
- import {
2
- BaseTransition,
3
- BaseTransitionPropsValidators,
4
- Comment,
5
- DeprecationTypes,
6
- EffectScope,
7
- ErrorCodes,
8
- ErrorTypeStrings,
9
- Fragment,
10
- KeepAlive,
11
- ReactiveEffect,
12
- Static,
13
- Suspense,
14
- Teleport,
15
- Text,
16
- TrackOpTypes,
17
- Transition,
18
- TransitionGroup,
19
- TriggerOpTypes,
20
- VueElement,
21
- assertNumber,
22
- callWithAsyncErrorHandling,
23
- callWithErrorHandling,
24
- camelize,
25
- capitalize,
26
- cloneVNode,
27
- compatUtils,
28
- compile,
29
- computed,
30
- createApp,
31
- createBaseVNode,
32
- createBlock,
33
- createCommentVNode,
34
- createElementBlock,
35
- createHydrationRenderer,
36
- createPropsRestProxy,
37
- createRenderer,
38
- createSSRApp,
39
- createSlots,
40
- createStaticVNode,
41
- createTextVNode,
42
- createVNode,
43
- customRef,
44
- defineAsyncComponent,
45
- defineComponent,
46
- defineCustomElement,
47
- defineEmits,
48
- defineExpose,
49
- defineModel,
50
- defineOptions,
51
- defineProps,
52
- defineSSRCustomElement,
53
- defineSlots,
54
- devtools,
55
- effect,
56
- effectScope,
57
- getCurrentInstance,
58
- getCurrentScope,
59
- getCurrentWatcher,
60
- getTransitionRawChildren,
61
- guardReactiveProps,
62
- h,
63
- handleError,
64
- hasInjectionContext,
65
- hydrate,
66
- hydrateOnIdle,
67
- hydrateOnInteraction,
68
- hydrateOnMediaQuery,
69
- hydrateOnVisible,
70
- initCustomFormatter,
71
- initDirectivesForSSR,
72
- inject,
73
- isMemoSame,
74
- isProxy,
75
- isReactive,
76
- isReadonly,
77
- isRef,
78
- isRuntimeOnly,
79
- isShallow,
80
- isVNode,
81
- markRaw,
82
- mergeDefaults,
83
- mergeModels,
84
- mergeProps,
85
- nextTick,
86
- nodeOps,
87
- normalizeClass,
88
- normalizeProps,
89
- normalizeStyle,
90
- onActivated,
91
- onBeforeMount,
92
- onBeforeUnmount,
93
- onBeforeUpdate,
94
- onDeactivated,
95
- onErrorCaptured,
96
- onMounted,
97
- onRenderTracked,
98
- onRenderTriggered,
99
- onScopeDispose,
100
- onServerPrefetch,
101
- onUnmounted,
102
- onUpdated,
103
- onWatcherCleanup,
104
- openBlock,
105
- patchProp,
106
- popScopeId,
107
- provide,
108
- proxyRefs,
109
- pushScopeId,
110
- queuePostFlushCb,
111
- reactive,
112
- readonly,
113
- ref,
114
- registerRuntimeCompiler,
115
- render,
116
- renderList,
117
- renderSlot,
118
- resolveComponent,
119
- resolveDirective,
120
- resolveDynamicComponent,
121
- resolveFilter,
122
- resolveTransitionHooks,
123
- setBlockTracking,
124
- setDevtoolsHook,
125
- setTransitionHooks,
126
- shallowReactive,
127
- shallowReadonly,
128
- shallowRef,
129
- ssrContextKey,
130
- ssrUtils,
131
- stop,
132
- toDisplayString,
133
- toHandlerKey,
134
- toHandlers,
135
- toRaw,
136
- toRef,
137
- toRefs,
138
- toValue,
139
- transformVNodeArgs,
140
- triggerRef,
141
- unref,
142
- useAttrs,
143
- useCssModule,
144
- useCssVars,
145
- useHost,
146
- useId,
147
- useModel,
148
- useSSRContext,
149
- useShadowRoot,
150
- useSlots,
151
- useTemplateRef,
152
- useTransitionState,
153
- vModelCheckbox,
154
- vModelDynamic,
155
- vModelRadio,
156
- vModelSelect,
157
- vModelText,
158
- vShow,
159
- version,
160
- warn,
161
- watch,
162
- watchEffect,
163
- watchPostEffect,
164
- watchSyncEffect,
165
- withAsyncContext,
166
- withCtx,
167
- withDefaults,
168
- withDirectives,
169
- withKeys,
170
- withMemo,
171
- withModifiers,
172
- withScopeId
173
- } from "./chunk-7OIKW5WK.js";
174
- export {
175
- BaseTransition,
176
- BaseTransitionPropsValidators,
177
- Comment,
178
- DeprecationTypes,
179
- EffectScope,
180
- ErrorCodes,
181
- ErrorTypeStrings,
182
- Fragment,
183
- KeepAlive,
184
- ReactiveEffect,
185
- Static,
186
- Suspense,
187
- Teleport,
188
- Text,
189
- TrackOpTypes,
190
- Transition,
191
- TransitionGroup,
192
- TriggerOpTypes,
193
- VueElement,
194
- assertNumber,
195
- callWithAsyncErrorHandling,
196
- callWithErrorHandling,
197
- camelize,
198
- capitalize,
199
- cloneVNode,
200
- compatUtils,
201
- compile,
202
- computed,
203
- createApp,
204
- createBlock,
205
- createCommentVNode,
206
- createElementBlock,
207
- createBaseVNode as createElementVNode,
208
- createHydrationRenderer,
209
- createPropsRestProxy,
210
- createRenderer,
211
- createSSRApp,
212
- createSlots,
213
- createStaticVNode,
214
- createTextVNode,
215
- createVNode,
216
- customRef,
217
- defineAsyncComponent,
218
- defineComponent,
219
- defineCustomElement,
220
- defineEmits,
221
- defineExpose,
222
- defineModel,
223
- defineOptions,
224
- defineProps,
225
- defineSSRCustomElement,
226
- defineSlots,
227
- devtools,
228
- effect,
229
- effectScope,
230
- getCurrentInstance,
231
- getCurrentScope,
232
- getCurrentWatcher,
233
- getTransitionRawChildren,
234
- guardReactiveProps,
235
- h,
236
- handleError,
237
- hasInjectionContext,
238
- hydrate,
239
- hydrateOnIdle,
240
- hydrateOnInteraction,
241
- hydrateOnMediaQuery,
242
- hydrateOnVisible,
243
- initCustomFormatter,
244
- initDirectivesForSSR,
245
- inject,
246
- isMemoSame,
247
- isProxy,
248
- isReactive,
249
- isReadonly,
250
- isRef,
251
- isRuntimeOnly,
252
- isShallow,
253
- isVNode,
254
- markRaw,
255
- mergeDefaults,
256
- mergeModels,
257
- mergeProps,
258
- nextTick,
259
- nodeOps,
260
- normalizeClass,
261
- normalizeProps,
262
- normalizeStyle,
263
- onActivated,
264
- onBeforeMount,
265
- onBeforeUnmount,
266
- onBeforeUpdate,
267
- onDeactivated,
268
- onErrorCaptured,
269
- onMounted,
270
- onRenderTracked,
271
- onRenderTriggered,
272
- onScopeDispose,
273
- onServerPrefetch,
274
- onUnmounted,
275
- onUpdated,
276
- onWatcherCleanup,
277
- openBlock,
278
- patchProp,
279
- popScopeId,
280
- provide,
281
- proxyRefs,
282
- pushScopeId,
283
- queuePostFlushCb,
284
- reactive,
285
- readonly,
286
- ref,
287
- registerRuntimeCompiler,
288
- render,
289
- renderList,
290
- renderSlot,
291
- resolveComponent,
292
- resolveDirective,
293
- resolveDynamicComponent,
294
- resolveFilter,
295
- resolveTransitionHooks,
296
- setBlockTracking,
297
- setDevtoolsHook,
298
- setTransitionHooks,
299
- shallowReactive,
300
- shallowReadonly,
301
- shallowRef,
302
- ssrContextKey,
303
- ssrUtils,
304
- stop,
305
- toDisplayString,
306
- toHandlerKey,
307
- toHandlers,
308
- toRaw,
309
- toRef,
310
- toRefs,
311
- toValue,
312
- transformVNodeArgs,
313
- triggerRef,
314
- unref,
315
- useAttrs,
316
- useCssModule,
317
- useCssVars,
318
- useHost,
319
- useId,
320
- useModel,
321
- useSSRContext,
322
- useShadowRoot,
323
- useSlots,
324
- useTemplateRef,
325
- useTransitionState,
326
- vModelCheckbox,
327
- vModelDynamic,
328
- vModelRadio,
329
- vModelSelect,
330
- vModelText,
331
- vShow,
332
- version,
333
- warn,
334
- watch,
335
- watchEffect,
336
- watchPostEffect,
337
- watchSyncEffect,
338
- withAsyncContext,
339
- withCtx,
340
- withDefaults,
341
- withDirectives,
342
- withKeys,
343
- withMemo,
344
- withModifiers,
345
- withScopeId
346
- };
347
- //# sourceMappingURL=vue.js.map