data-structure-typed 2.5.1 → 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 (184) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/MIGRATION.md +169 -0
  3. package/README.md +135 -23
  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 +6460 -1591
  8. package/dist/cjs/graph.cjs +440 -20
  9. package/dist/cjs/hash.cjs +125 -22
  10. package/dist/cjs/heap.cjs +196 -47
  11. package/dist/cjs/index.cjs +8486 -2429
  12. package/dist/cjs/linked-list.cjs +456 -31
  13. package/dist/cjs/matrix.cjs +79 -9
  14. package/dist/cjs/priority-queue.cjs +193 -44
  15. package/dist/cjs/queue.cjs +391 -2
  16. package/dist/cjs/stack.cjs +92 -6
  17. package/dist/cjs/trie.cjs +122 -28
  18. package/dist/cjs-legacy/binary-tree.cjs +6484 -1612
  19. package/dist/cjs-legacy/graph.cjs +440 -20
  20. package/dist/cjs-legacy/hash.cjs +125 -22
  21. package/dist/cjs-legacy/heap.cjs +196 -47
  22. package/dist/cjs-legacy/index.cjs +8654 -2594
  23. package/dist/cjs-legacy/linked-list.cjs +456 -31
  24. package/dist/cjs-legacy/matrix.cjs +79 -9
  25. package/dist/cjs-legacy/priority-queue.cjs +193 -44
  26. package/dist/cjs-legacy/queue.cjs +391 -2
  27. package/dist/cjs-legacy/stack.cjs +92 -6
  28. package/dist/cjs-legacy/trie.cjs +122 -28
  29. package/dist/esm/binary-tree.mjs +6460 -1591
  30. package/dist/esm/graph.mjs +440 -20
  31. package/dist/esm/hash.mjs +125 -22
  32. package/dist/esm/heap.mjs +196 -47
  33. package/dist/esm/index.mjs +8486 -2430
  34. package/dist/esm/linked-list.mjs +456 -31
  35. package/dist/esm/matrix.mjs +79 -9
  36. package/dist/esm/priority-queue.mjs +193 -44
  37. package/dist/esm/queue.mjs +391 -2
  38. package/dist/esm/stack.mjs +92 -6
  39. package/dist/esm/trie.mjs +122 -28
  40. package/dist/esm-legacy/binary-tree.mjs +6484 -1612
  41. package/dist/esm-legacy/graph.mjs +440 -20
  42. package/dist/esm-legacy/hash.mjs +125 -22
  43. package/dist/esm-legacy/heap.mjs +196 -47
  44. package/dist/esm-legacy/index.mjs +8654 -2595
  45. package/dist/esm-legacy/linked-list.mjs +456 -31
  46. package/dist/esm-legacy/matrix.mjs +79 -9
  47. package/dist/esm-legacy/priority-queue.mjs +193 -44
  48. package/dist/esm-legacy/queue.mjs +391 -2
  49. package/dist/esm-legacy/stack.mjs +92 -6
  50. package/dist/esm-legacy/trie.mjs +122 -28
  51. package/dist/types/common/error.d.ts +9 -0
  52. package/dist/types/common/index.d.ts +1 -1
  53. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +98 -2
  54. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +112 -0
  55. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +214 -13
  56. package/dist/types/data-structures/binary-tree/bst.d.ts +294 -3
  57. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +155 -8
  58. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +48 -0
  59. package/dist/types/data-structures/binary-tree/tree-map.d.ts +1370 -323
  60. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +1329 -316
  61. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +1116 -295
  62. package/dist/types/data-structures/binary-tree/tree-set.d.ts +1330 -326
  63. package/dist/types/data-structures/graph/directed-graph.d.ts +80 -0
  64. package/dist/types/data-structures/graph/undirected-graph.d.ts +72 -0
  65. package/dist/types/data-structures/hash/hash-map.d.ts +95 -6
  66. package/dist/types/data-structures/heap/heap.d.ts +154 -12
  67. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +143 -0
  68. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +121 -1
  69. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +144 -0
  70. package/dist/types/data-structures/matrix/matrix.d.ts +64 -0
  71. package/dist/types/data-structures/queue/deque.d.ts +142 -0
  72. package/dist/types/data-structures/queue/queue.d.ts +109 -0
  73. package/dist/types/data-structures/stack/stack.d.ts +82 -2
  74. package/dist/types/data-structures/trie/trie.d.ts +96 -0
  75. package/dist/types/interfaces/binary-tree.d.ts +2 -3
  76. package/dist/types/types/data-structures/binary-tree/bst.d.ts +1 -0
  77. package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +5 -0
  78. package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +4 -0
  79. package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +4 -0
  80. package/dist/umd/data-structure-typed.js +8623 -2564
  81. package/dist/umd/data-structure-typed.min.js +5 -5
  82. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +696 -194
  83. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +11 -11
  84. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +71 -71
  85. package/docs-site-docusaurus/docs/api/classes/BST.md +639 -189
  86. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +13 -13
  87. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +15 -15
  88. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +148 -160
  89. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  90. package/docs-site-docusaurus/docs/api/classes/Deque.md +105 -91
  91. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +82 -82
  92. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +104 -74
  93. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +8 -8
  94. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +12 -12
  95. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  96. package/docs-site-docusaurus/docs/api/classes/HashMap.md +51 -51
  97. package/docs-site-docusaurus/docs/api/classes/Heap.md +96 -85
  98. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +25 -25
  99. package/docs-site-docusaurus/docs/api/classes/IterableEntryBase.md +33 -33
  100. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +50 -50
  101. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +55 -55
  102. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +55 -55
  103. package/docs-site-docusaurus/docs/api/classes/LinkedListNode.md +6 -6
  104. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +78 -78
  105. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +82 -82
  106. package/docs-site-docusaurus/docs/api/classes/Matrix.md +31 -31
  107. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +104 -89
  108. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +104 -89
  109. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +104 -89
  110. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +104 -89
  111. package/docs-site-docusaurus/docs/api/classes/Navigator.md +5 -5
  112. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +103 -88
  113. package/docs-site-docusaurus/docs/api/classes/Queue.md +112 -60
  114. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +708 -206
  115. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -10
  116. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +79 -79
  117. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +6 -6
  118. package/docs-site-docusaurus/docs/api/classes/SkipList.md +44 -44
  119. package/docs-site-docusaurus/docs/api/classes/Stack.md +42 -42
  120. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +236 -33
  121. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +162 -46
  122. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +232 -32
  123. package/docs-site-docusaurus/docs/api/classes/Trie.md +47 -47
  124. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  125. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +81 -81
  126. package/docs-site-docusaurus/docs/guide/architecture.md +75 -5
  127. package/docs-site-docusaurus/docs/guide/concepts.md +53 -3
  128. package/docs-site-docusaurus/docs/guide/faq.md +233 -0
  129. package/docs-site-docusaurus/docs/guide/guides.md +43 -58
  130. package/docs-site-docusaurus/docs/guide/installation.md +2 -0
  131. package/docs-site-docusaurus/docs/guide/integrations.md +75 -176
  132. package/docs-site-docusaurus/docs/guide/overview.md +132 -11
  133. package/docs-site-docusaurus/docs/guide/performance.md +2 -0
  134. package/docs-site-docusaurus/docs/guide/quick-start.md +31 -0
  135. package/docs-site-docusaurus/docs/guide/use-cases/_category_.json +6 -0
  136. package/docs-site-docusaurus/docs/guide/use-cases/array-sort-alternative.md +158 -0
  137. package/docs-site-docusaurus/docs/guide/use-cases/heap-vs-sorting.md +92 -0
  138. package/docs-site-docusaurus/docs/guide/use-cases/map-vs-treemap.md +151 -0
  139. package/docs-site-docusaurus/docs/guide/use-cases/priority-queue-typescript.md +113 -0
  140. package/docs-site-docusaurus/docs/guide/use-cases/treemap-javascript.md +151 -0
  141. package/docs-site-docusaurus/docusaurus.config.ts +1 -1
  142. package/docs-site-docusaurus/src/pages/index.tsx +55 -2
  143. package/docs-site-docusaurus/static/llms.txt +37 -0
  144. package/docs-site-docusaurus/typedoc.json +1 -0
  145. package/llms.txt +37 -0
  146. package/package.json +65 -56
  147. package/src/common/error.ts +19 -1
  148. package/src/common/index.ts +1 -1
  149. package/src/data-structures/base/iterable-element-base.ts +3 -2
  150. package/src/data-structures/binary-tree/avl-tree.ts +99 -5
  151. package/src/data-structures/binary-tree/binary-indexed-tree.ts +102 -4
  152. package/src/data-structures/binary-tree/binary-tree.ts +239 -78
  153. package/src/data-structures/binary-tree/bst.ts +542 -13
  154. package/src/data-structures/binary-tree/red-black-tree.ts +155 -15
  155. package/src/data-structures/binary-tree/segment-tree.ts +42 -0
  156. package/src/data-structures/binary-tree/tree-map.ts +1223 -261
  157. package/src/data-structures/binary-tree/tree-multi-map.ts +939 -30
  158. package/src/data-structures/binary-tree/tree-multi-set.ts +746 -10
  159. package/src/data-structures/binary-tree/tree-set.ts +1018 -99
  160. package/src/data-structures/graph/abstract-graph.ts +2 -2
  161. package/src/data-structures/graph/directed-graph.ts +71 -1
  162. package/src/data-structures/graph/undirected-graph.ts +64 -1
  163. package/src/data-structures/hash/hash-map.ts +102 -16
  164. package/src/data-structures/heap/heap.ts +153 -23
  165. package/src/data-structures/heap/max-heap.ts +2 -2
  166. package/src/data-structures/linked-list/doubly-linked-list.ts +139 -0
  167. package/src/data-structures/linked-list/singly-linked-list.ts +106 -1
  168. package/src/data-structures/linked-list/skip-linked-list.ts +131 -5
  169. package/src/data-structures/matrix/matrix.ts +65 -9
  170. package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
  171. package/src/data-structures/queue/deque.ts +130 -0
  172. package/src/data-structures/queue/queue.ts +109 -0
  173. package/src/data-structures/stack/stack.ts +75 -5
  174. package/src/data-structures/trie/trie.ts +86 -2
  175. package/src/interfaces/binary-tree.ts +1 -9
  176. package/src/types/data-structures/binary-tree/bst.ts +1 -0
  177. package/src/types/data-structures/binary-tree/tree-map.ts +6 -0
  178. package/src/types/data-structures/binary-tree/tree-multi-set.ts +5 -0
  179. package/src/types/data-structures/binary-tree/tree-set.ts +5 -0
  180. package/.vitepress/cache/deps_temp_51f5f1b0/chunk-7OIKW5WK.js +0 -12984
  181. package/.vitepress/cache/deps_temp_51f5f1b0/package.json +0 -3
  182. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vue_devtools-api.js +0 -4505
  183. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vueuse_core.js +0 -9731
  184. 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