data-structure-typed 2.5.3 → 2.6.1
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.
- package/.github/workflows/ci.yml +7 -2
- package/.github/workflows/release-package.yml +9 -2
- package/.husky/pre-commit +3 -0
- package/CHANGELOG.md +1 -1
- package/MIGRATION.md +48 -0
- package/README.md +20 -2
- package/README_CN.md +20 -2
- package/SPECIFICATION.md +24 -0
- package/SPECIFICATION.zh-CN.md +24 -0
- package/dist/cjs/binary-tree.cjs +1897 -19
- package/dist/cjs/graph.cjs +174 -0
- package/dist/cjs/hash.cjs +33 -0
- package/dist/cjs/heap.cjs +71 -0
- package/dist/cjs/index.cjs +2383 -3
- package/dist/cjs/linked-list.cjs +224 -2
- package/dist/cjs/matrix.cjs +24 -0
- package/dist/cjs/priority-queue.cjs +71 -0
- package/dist/cjs/queue.cjs +221 -1
- package/dist/cjs/stack.cjs +59 -0
- package/dist/cjs/trie.cjs +62 -0
- package/dist/cjs-legacy/binary-tree.cjs +1897 -19
- package/dist/cjs-legacy/graph.cjs +174 -0
- package/dist/cjs-legacy/hash.cjs +33 -0
- package/dist/cjs-legacy/heap.cjs +71 -0
- package/dist/cjs-legacy/index.cjs +2383 -3
- package/dist/cjs-legacy/linked-list.cjs +224 -2
- package/dist/cjs-legacy/matrix.cjs +24 -0
- package/dist/cjs-legacy/priority-queue.cjs +71 -0
- package/dist/cjs-legacy/queue.cjs +221 -1
- package/dist/cjs-legacy/stack.cjs +59 -0
- package/dist/cjs-legacy/trie.cjs +62 -0
- package/dist/esm/binary-tree.mjs +1897 -19
- package/dist/esm/graph.mjs +174 -0
- package/dist/esm/hash.mjs +33 -0
- package/dist/esm/heap.mjs +71 -0
- package/dist/esm/index.mjs +2383 -3
- package/dist/esm/linked-list.mjs +224 -2
- package/dist/esm/matrix.mjs +24 -0
- package/dist/esm/priority-queue.mjs +71 -0
- package/dist/esm/queue.mjs +221 -1
- package/dist/esm/stack.mjs +59 -0
- package/dist/esm/trie.mjs +62 -0
- package/dist/esm-legacy/binary-tree.mjs +1897 -19
- package/dist/esm-legacy/graph.mjs +174 -0
- package/dist/esm-legacy/hash.mjs +33 -0
- package/dist/esm-legacy/heap.mjs +71 -0
- package/dist/esm-legacy/index.mjs +2383 -3
- package/dist/esm-legacy/linked-list.mjs +224 -2
- package/dist/esm-legacy/matrix.mjs +24 -0
- package/dist/esm-legacy/priority-queue.mjs +71 -0
- package/dist/esm-legacy/queue.mjs +221 -1
- package/dist/esm-legacy/stack.mjs +59 -0
- package/dist/esm-legacy/trie.mjs +62 -0
- package/dist/types/data-structures/base/iterable-element-base.d.ts +17 -0
- package/dist/types/data-structures/base/linear-base.d.ts +6 -0
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +36 -0
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +42 -0
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +75 -0
- package/dist/types/data-structures/binary-tree/bst.d.ts +72 -0
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +57 -0
- package/dist/types/data-structures/binary-tree/segment-tree.d.ts +18 -0
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +375 -0
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +389 -0
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +330 -0
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +438 -0
- package/dist/types/data-structures/graph/directed-graph.d.ts +30 -0
- package/dist/types/data-structures/graph/undirected-graph.d.ts +27 -0
- package/dist/types/data-structures/hash/hash-map.d.ts +33 -0
- package/dist/types/data-structures/heap/heap.d.ts +42 -0
- package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +75 -2
- package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +45 -0
- package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +54 -0
- package/dist/types/data-structures/matrix/matrix.d.ts +24 -0
- package/dist/types/data-structures/queue/deque.d.ts +90 -1
- package/dist/types/data-structures/queue/queue.d.ts +36 -0
- package/dist/types/data-structures/stack/stack.d.ts +30 -0
- package/dist/types/data-structures/trie/trie.d.ts +36 -0
- package/dist/umd/data-structure-typed.js +2383 -3
- package/dist/umd/data-structure-typed.min.js +3 -3
- package/docs-site-docusaurus/docs/api/classes/AVLTree.md +108 -108
- package/docs-site-docusaurus/docs/api/classes/BST.md +101 -101
- package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +13 -13
- package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +66 -66
- package/docs-site-docusaurus/docs/api/classes/Deque.md +235 -51
- package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +21 -21
- package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +231 -67
- package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +9 -9
- package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
- package/docs-site-docusaurus/docs/api/classes/HashMap.md +14 -14
- package/docs-site-docusaurus/docs/api/classes/Heap.md +117 -34
- package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +83 -13
- package/docs-site-docusaurus/docs/api/classes/LinearBase.md +124 -20
- package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +140 -32
- package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +30 -26
- package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +159 -51
- package/docs-site-docusaurus/docs/api/classes/MapGraph.md +20 -20
- package/docs-site-docusaurus/docs/api/classes/Matrix.md +23 -23
- package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +117 -34
- package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +117 -34
- package/docs-site-docusaurus/docs/api/classes/MinHeap.md +117 -34
- package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +117 -34
- package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +117 -34
- package/docs-site-docusaurus/docs/api/classes/Queue.md +142 -34
- package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +117 -117
- package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +8 -8
- package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +158 -50
- package/docs-site-docusaurus/docs/api/classes/SkipList.md +21 -21
- package/docs-site-docusaurus/docs/api/classes/Stack.md +108 -26
- package/docs-site-docusaurus/docs/api/classes/TreeMap.md +33 -33
- package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +75 -39
- package/docs-site-docusaurus/docs/api/classes/TreeSet.md +301 -39
- package/docs-site-docusaurus/docs/api/classes/Trie.md +110 -28
- package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +20 -20
- package/jest.integration.config.js +1 -2
- package/package.json +51 -50
- package/src/common/error.ts +15 -32
- package/src/common/index.ts +0 -3
- package/src/data-structures/base/iterable-element-base.ts +32 -3
- package/src/data-structures/base/linear-base.ts +13 -36
- package/src/data-structures/binary-tree/avl-tree.ts +31 -493
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +47 -530
- package/src/data-structures/binary-tree/binary-tree.ts +326 -1236
- package/src/data-structures/binary-tree/bst.ts +158 -1010
- package/src/data-structures/binary-tree/red-black-tree.ts +451 -1233
- package/src/data-structures/binary-tree/segment-tree.ts +73 -333
- package/src/data-structures/binary-tree/tree-map.ts +462 -4749
- package/src/data-structures/binary-tree/tree-multi-map.ts +310 -4530
- package/src/data-structures/binary-tree/tree-multi-set.ts +300 -3652
- package/src/data-structures/binary-tree/tree-set.ts +437 -4443
- package/src/data-structures/graph/abstract-graph.ts +98 -167
- package/src/data-structures/graph/directed-graph.ts +137 -532
- package/src/data-structures/graph/map-graph.ts +0 -3
- package/src/data-structures/graph/undirected-graph.ts +132 -484
- package/src/data-structures/hash/hash-map.ts +154 -549
- package/src/data-structures/heap/heap.ts +200 -753
- package/src/data-structures/linked-list/doubly-linked-list.ts +153 -809
- package/src/data-structures/linked-list/singly-linked-list.ts +122 -749
- package/src/data-structures/linked-list/skip-linked-list.ts +211 -864
- package/src/data-structures/matrix/matrix.ts +179 -494
- package/src/data-structures/matrix/navigator.ts +0 -1
- package/src/data-structures/priority-queue/max-priority-queue.ts +1 -6
- package/src/data-structures/priority-queue/min-priority-queue.ts +6 -11
- package/src/data-structures/priority-queue/priority-queue.ts +1 -2
- package/src/data-structures/queue/deque.ts +241 -807
- package/src/data-structures/queue/queue.ts +102 -589
- package/src/data-structures/stack/stack.ts +76 -475
- package/src/data-structures/trie/trie.ts +98 -592
- package/src/types/common.ts +0 -10
- package/src/types/data-structures/binary-tree/bst.ts +0 -7
- package/src/types/data-structures/binary-tree/red-black-tree.ts +0 -1
- package/src/types/data-structures/graph/abstract-graph.ts +0 -2
- package/src/types/data-structures/hash/hash-map.ts +0 -3
- package/src/types/data-structures/hash/index.ts +0 -1
- package/src/types/data-structures/matrix/navigator.ts +0 -2
- package/src/types/utils/utils.ts +0 -7
- package/src/types/utils/validate-type.ts +0 -7
- package/src/utils/number.ts +0 -2
- package/src/utils/utils.ts +0 -5
package/dist/cjs/binary-tree.cjs
CHANGED
|
@@ -261,6 +261,35 @@ var IterableElementBase = class {
|
|
|
261
261
|
for (const ele of this) if (ele === element) return true;
|
|
262
262
|
return false;
|
|
263
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Check whether a value exists (Array-compatible alias for `has`).
|
|
266
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1).
|
|
267
|
+
* @param element - Element to search for (uses `===`).
|
|
268
|
+
* @returns `true` if found.
|
|
269
|
+
*/
|
|
270
|
+
includes(element) {
|
|
271
|
+
return this.has(element);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Return an iterator of `[index, value]` pairs (Array-compatible).
|
|
275
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1) per step.
|
|
276
|
+
*/
|
|
277
|
+
*entries() {
|
|
278
|
+
let index = 0;
|
|
279
|
+
for (const value of this) {
|
|
280
|
+
yield [index++, value];
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Return an iterator of numeric indices (Array-compatible).
|
|
285
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1) per step.
|
|
286
|
+
*/
|
|
287
|
+
*keys() {
|
|
288
|
+
let index = 0;
|
|
289
|
+
for (const _ of this) {
|
|
290
|
+
yield index++;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
264
293
|
/**
|
|
265
294
|
* Reduces all elements to a single accumulated value.
|
|
266
295
|
*
|
|
@@ -523,6 +552,16 @@ var LinearBase = class _LinearBase extends IterableElementBase {
|
|
|
523
552
|
}
|
|
524
553
|
return this;
|
|
525
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* Return a new instance of the same type with elements in reverse order (non-mutating).
|
|
557
|
+
* @remarks Provided for familiarity when migrating from Array (ES2023 `toReversed`). Time O(n), Space O(n).
|
|
558
|
+
* @returns A new reversed instance.
|
|
559
|
+
*/
|
|
560
|
+
toReversed() {
|
|
561
|
+
const cloned = this.clone();
|
|
562
|
+
cloned.reverse();
|
|
563
|
+
return cloned;
|
|
564
|
+
}
|
|
526
565
|
};
|
|
527
566
|
|
|
528
567
|
// src/data-structures/base/iterable-entry-base.ts
|
|
@@ -802,6 +841,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
802
841
|
|
|
803
842
|
|
|
804
843
|
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
805
847
|
|
|
806
848
|
|
|
807
849
|
|
|
@@ -856,6 +898,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
856
898
|
|
|
857
899
|
|
|
858
900
|
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
859
904
|
|
|
860
905
|
|
|
861
906
|
|
|
@@ -934,6 +979,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
934
979
|
|
|
935
980
|
|
|
936
981
|
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
|
|
937
985
|
|
|
938
986
|
|
|
939
987
|
|
|
@@ -1000,6 +1048,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1000
1048
|
|
|
1001
1049
|
|
|
1002
1050
|
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1003
1054
|
|
|
1004
1055
|
|
|
1005
1056
|
|
|
@@ -1073,6 +1124,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1073
1124
|
|
|
1074
1125
|
|
|
1075
1126
|
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
|
|
1076
1130
|
|
|
1077
1131
|
|
|
1078
1132
|
|
|
@@ -1136,6 +1190,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1136
1190
|
|
|
1137
1191
|
|
|
1138
1192
|
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1139
1196
|
|
|
1140
1197
|
|
|
1141
1198
|
|
|
@@ -1192,6 +1249,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1192
1249
|
|
|
1193
1250
|
|
|
1194
1251
|
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1195
1255
|
|
|
1196
1256
|
|
|
1197
1257
|
|
|
@@ -1304,6 +1364,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1304
1364
|
|
|
1305
1365
|
|
|
1306
1366
|
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1307
1370
|
|
|
1308
1371
|
|
|
1309
1372
|
|
|
@@ -1354,6 +1417,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1354
1417
|
|
|
1355
1418
|
|
|
1356
1419
|
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1357
1423
|
|
|
1358
1424
|
|
|
1359
1425
|
|
|
@@ -1427,6 +1493,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1427
1493
|
|
|
1428
1494
|
|
|
1429
1495
|
|
|
1496
|
+
|
|
1497
|
+
|
|
1498
|
+
|
|
1430
1499
|
|
|
1431
1500
|
|
|
1432
1501
|
|
|
@@ -1484,6 +1553,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1484
1553
|
|
|
1485
1554
|
|
|
1486
1555
|
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1487
1559
|
|
|
1488
1560
|
|
|
1489
1561
|
|
|
@@ -1545,6 +1617,9 @@ var Queue = class _Queue extends LinearBase {
|
|
|
1545
1617
|
|
|
1546
1618
|
|
|
1547
1619
|
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1548
1623
|
|
|
1549
1624
|
|
|
1550
1625
|
|
|
@@ -2049,6 +2124,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2049
2124
|
|
|
2050
2125
|
|
|
2051
2126
|
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
|
|
2052
2130
|
|
|
2053
2131
|
|
|
2054
2132
|
|
|
@@ -2107,6 +2185,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2107
2185
|
|
|
2108
2186
|
|
|
2109
2187
|
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
|
|
2110
2191
|
|
|
2111
2192
|
|
|
2112
2193
|
|
|
@@ -2217,6 +2298,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2217
2298
|
|
|
2218
2299
|
|
|
2219
2300
|
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
|
|
2220
2304
|
|
|
2221
2305
|
|
|
2222
2306
|
|
|
@@ -2263,6 +2347,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2263
2347
|
|
|
2264
2348
|
|
|
2265
2349
|
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
|
|
2266
2353
|
|
|
2267
2354
|
|
|
2268
2355
|
|
|
@@ -2330,6 +2417,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2330
2417
|
|
|
2331
2418
|
|
|
2332
2419
|
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
|
|
2333
2423
|
|
|
2334
2424
|
|
|
2335
2425
|
|
|
@@ -2436,6 +2526,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2436
2526
|
|
|
2437
2527
|
|
|
2438
2528
|
|
|
2529
|
+
|
|
2530
|
+
|
|
2531
|
+
|
|
2439
2532
|
|
|
2440
2533
|
|
|
2441
2534
|
|
|
@@ -2540,6 +2633,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2540
2633
|
|
|
2541
2634
|
|
|
2542
2635
|
|
|
2636
|
+
|
|
2637
|
+
|
|
2638
|
+
|
|
2543
2639
|
|
|
2544
2640
|
|
|
2545
2641
|
|
|
@@ -2602,6 +2698,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2602
2698
|
|
|
2603
2699
|
|
|
2604
2700
|
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
|
|
2605
2704
|
|
|
2606
2705
|
|
|
2607
2706
|
|
|
@@ -2666,6 +2765,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2666
2765
|
|
|
2667
2766
|
|
|
2668
2767
|
|
|
2768
|
+
|
|
2769
|
+
|
|
2770
|
+
|
|
2669
2771
|
|
|
2670
2772
|
|
|
2671
2773
|
|
|
@@ -2718,6 +2820,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2718
2820
|
|
|
2719
2821
|
|
|
2720
2822
|
|
|
2823
|
+
|
|
2824
|
+
|
|
2825
|
+
|
|
2721
2826
|
|
|
2722
2827
|
|
|
2723
2828
|
|
|
@@ -2779,6 +2884,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2779
2884
|
|
|
2780
2885
|
|
|
2781
2886
|
|
|
2887
|
+
|
|
2888
|
+
|
|
2889
|
+
|
|
2782
2890
|
|
|
2783
2891
|
|
|
2784
2892
|
|
|
@@ -2867,6 +2975,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2867
2975
|
|
|
2868
2976
|
|
|
2869
2977
|
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
|
|
2870
2981
|
|
|
2871
2982
|
|
|
2872
2983
|
|
|
@@ -2932,6 +3043,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2932
3043
|
|
|
2933
3044
|
|
|
2934
3045
|
|
|
3046
|
+
|
|
3047
|
+
|
|
3048
|
+
|
|
2935
3049
|
|
|
2936
3050
|
|
|
2937
3051
|
|
|
@@ -3413,6 +3527,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3413
3527
|
|
|
3414
3528
|
|
|
3415
3529
|
|
|
3530
|
+
|
|
3531
|
+
|
|
3532
|
+
|
|
3416
3533
|
|
|
3417
3534
|
|
|
3418
3535
|
|
|
@@ -3469,6 +3586,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3469
3586
|
|
|
3470
3587
|
|
|
3471
3588
|
|
|
3589
|
+
|
|
3590
|
+
|
|
3591
|
+
|
|
3472
3592
|
|
|
3473
3593
|
|
|
3474
3594
|
|
|
@@ -3529,6 +3649,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3529
3649
|
|
|
3530
3650
|
|
|
3531
3651
|
|
|
3652
|
+
|
|
3653
|
+
|
|
3654
|
+
|
|
3532
3655
|
|
|
3533
3656
|
|
|
3534
3657
|
|
|
@@ -3614,6 +3737,9 @@ var BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3614
3737
|
|
|
3615
3738
|
|
|
3616
3739
|
|
|
3740
|
+
|
|
3741
|
+
|
|
3742
|
+
|
|
3617
3743
|
|
|
3618
3744
|
|
|
3619
3745
|
|
|
@@ -4442,6 +4568,12 @@ var BST = class extends BinaryTree {
|
|
|
4442
4568
|
|
|
4443
4569
|
|
|
4444
4570
|
|
|
4571
|
+
|
|
4572
|
+
|
|
4573
|
+
|
|
4574
|
+
|
|
4575
|
+
|
|
4576
|
+
|
|
4445
4577
|
|
|
4446
4578
|
|
|
4447
4579
|
|
|
@@ -4787,6 +4919,15 @@ var BST = class extends BinaryTree {
|
|
|
4787
4919
|
|
|
4788
4920
|
|
|
4789
4921
|
|
|
4922
|
+
|
|
4923
|
+
|
|
4924
|
+
|
|
4925
|
+
|
|
4926
|
+
|
|
4927
|
+
|
|
4928
|
+
|
|
4929
|
+
|
|
4930
|
+
|
|
4790
4931
|
|
|
4791
4932
|
|
|
4792
4933
|
|
|
@@ -4913,6 +5054,12 @@ var BST = class extends BinaryTree {
|
|
|
4913
5054
|
|
|
4914
5055
|
|
|
4915
5056
|
|
|
5057
|
+
|
|
5058
|
+
|
|
5059
|
+
|
|
5060
|
+
|
|
5061
|
+
|
|
5062
|
+
|
|
4916
5063
|
|
|
4917
5064
|
|
|
4918
5065
|
|
|
@@ -5207,6 +5354,9 @@ var BST = class extends BinaryTree {
|
|
|
5207
5354
|
|
|
5208
5355
|
|
|
5209
5356
|
|
|
5357
|
+
|
|
5358
|
+
|
|
5359
|
+
|
|
5210
5360
|
|
|
5211
5361
|
|
|
5212
5362
|
|
|
@@ -5280,6 +5430,9 @@ var BST = class extends BinaryTree {
|
|
|
5280
5430
|
|
|
5281
5431
|
|
|
5282
5432
|
|
|
5433
|
+
|
|
5434
|
+
|
|
5435
|
+
|
|
5283
5436
|
|
|
5284
5437
|
|
|
5285
5438
|
|
|
@@ -5407,6 +5560,12 @@ var BST = class extends BinaryTree {
|
|
|
5407
5560
|
|
|
5408
5561
|
|
|
5409
5562
|
|
|
5563
|
+
|
|
5564
|
+
|
|
5565
|
+
|
|
5566
|
+
|
|
5567
|
+
|
|
5568
|
+
|
|
5410
5569
|
|
|
5411
5570
|
|
|
5412
5571
|
|
|
@@ -6107,6 +6266,12 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6107
6266
|
|
|
6108
6267
|
|
|
6109
6268
|
|
|
6269
|
+
|
|
6270
|
+
|
|
6271
|
+
|
|
6272
|
+
|
|
6273
|
+
|
|
6274
|
+
|
|
6110
6275
|
|
|
6111
6276
|
|
|
6112
6277
|
|
|
@@ -6191,6 +6356,12 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6191
6356
|
|
|
6192
6357
|
|
|
6193
6358
|
|
|
6359
|
+
|
|
6360
|
+
|
|
6361
|
+
|
|
6362
|
+
|
|
6363
|
+
|
|
6364
|
+
|
|
6194
6365
|
|
|
6195
6366
|
|
|
6196
6367
|
|
|
@@ -6275,6 +6446,12 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6275
6446
|
|
|
6276
6447
|
|
|
6277
6448
|
|
|
6449
|
+
|
|
6450
|
+
|
|
6451
|
+
|
|
6452
|
+
|
|
6453
|
+
|
|
6454
|
+
|
|
6278
6455
|
|
|
6279
6456
|
|
|
6280
6457
|
|
|
@@ -6359,6 +6536,12 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6359
6536
|
|
|
6360
6537
|
|
|
6361
6538
|
|
|
6539
|
+
|
|
6540
|
+
|
|
6541
|
+
|
|
6542
|
+
|
|
6543
|
+
|
|
6544
|
+
|
|
6362
6545
|
|
|
6363
6546
|
|
|
6364
6547
|
|
|
@@ -6441,6 +6624,12 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6441
6624
|
|
|
6442
6625
|
|
|
6443
6626
|
|
|
6627
|
+
|
|
6628
|
+
|
|
6629
|
+
|
|
6630
|
+
|
|
6631
|
+
|
|
6632
|
+
|
|
6444
6633
|
|
|
6445
6634
|
|
|
6446
6635
|
|
|
@@ -6530,6 +6719,12 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6530
6719
|
|
|
6531
6720
|
|
|
6532
6721
|
|
|
6722
|
+
|
|
6723
|
+
|
|
6724
|
+
|
|
6725
|
+
|
|
6726
|
+
|
|
6727
|
+
|
|
6533
6728
|
|
|
6534
6729
|
|
|
6535
6730
|
|
|
@@ -6587,6 +6782,9 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6587
6782
|
|
|
6588
6783
|
|
|
6589
6784
|
|
|
6785
|
+
|
|
6786
|
+
|
|
6787
|
+
|
|
6590
6788
|
|
|
6591
6789
|
|
|
6592
6790
|
|
|
@@ -6652,6 +6850,9 @@ var BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6652
6850
|
|
|
6653
6851
|
|
|
6654
6852
|
|
|
6853
|
+
|
|
6854
|
+
|
|
6855
|
+
|
|
6655
6856
|
|
|
6656
6857
|
|
|
6657
6858
|
|
|
@@ -6820,6 +7021,9 @@ var SegmentTree = class _SegmentTree {
|
|
|
6820
7021
|
|
|
6821
7022
|
|
|
6822
7023
|
|
|
7024
|
+
|
|
7025
|
+
|
|
7026
|
+
|
|
6823
7027
|
|
|
6824
7028
|
|
|
6825
7029
|
|
|
@@ -6896,6 +7100,9 @@ var SegmentTree = class _SegmentTree {
|
|
|
6896
7100
|
|
|
6897
7101
|
|
|
6898
7102
|
|
|
7103
|
+
|
|
7104
|
+
|
|
7105
|
+
|
|
6899
7106
|
|
|
6900
7107
|
|
|
6901
7108
|
|
|
@@ -6966,6 +7173,9 @@ var SegmentTree = class _SegmentTree {
|
|
|
6966
7173
|
|
|
6967
7174
|
|
|
6968
7175
|
|
|
7176
|
+
|
|
7177
|
+
|
|
7178
|
+
|
|
6969
7179
|
|
|
6970
7180
|
|
|
6971
7181
|
|
|
@@ -7043,6 +7253,9 @@ var SegmentTree = class _SegmentTree {
|
|
|
7043
7253
|
|
|
7044
7254
|
|
|
7045
7255
|
|
|
7256
|
+
|
|
7257
|
+
|
|
7258
|
+
|
|
7046
7259
|
|
|
7047
7260
|
|
|
7048
7261
|
|
|
@@ -7098,6 +7311,9 @@ var SegmentTree = class _SegmentTree {
|
|
|
7098
7311
|
|
|
7099
7312
|
|
|
7100
7313
|
|
|
7314
|
+
|
|
7315
|
+
|
|
7316
|
+
|
|
7101
7317
|
|
|
7102
7318
|
|
|
7103
7319
|
|
|
@@ -7179,6 +7395,9 @@ var SegmentTree = class _SegmentTree {
|
|
|
7179
7395
|
|
|
7180
7396
|
|
|
7181
7397
|
|
|
7398
|
+
|
|
7399
|
+
|
|
7400
|
+
|
|
7182
7401
|
|
|
7183
7402
|
|
|
7184
7403
|
|
|
@@ -7583,6 +7802,18 @@ var AVLTree = class extends BST {
|
|
|
7583
7802
|
|
|
7584
7803
|
|
|
7585
7804
|
|
|
7805
|
+
|
|
7806
|
+
|
|
7807
|
+
|
|
7808
|
+
|
|
7809
|
+
|
|
7810
|
+
|
|
7811
|
+
|
|
7812
|
+
|
|
7813
|
+
|
|
7814
|
+
|
|
7815
|
+
|
|
7816
|
+
|
|
7586
7817
|
|
|
7587
7818
|
|
|
7588
7819
|
|
|
@@ -7722,6 +7953,15 @@ var AVLTree = class extends BST {
|
|
|
7722
7953
|
|
|
7723
7954
|
|
|
7724
7955
|
|
|
7956
|
+
|
|
7957
|
+
|
|
7958
|
+
|
|
7959
|
+
|
|
7960
|
+
|
|
7961
|
+
|
|
7962
|
+
|
|
7963
|
+
|
|
7964
|
+
|
|
7725
7965
|
|
|
7726
7966
|
|
|
7727
7967
|
|
|
@@ -7816,6 +8056,12 @@ var AVLTree = class extends BST {
|
|
|
7816
8056
|
|
|
7817
8057
|
|
|
7818
8058
|
|
|
8059
|
+
|
|
8060
|
+
|
|
8061
|
+
|
|
8062
|
+
|
|
8063
|
+
|
|
8064
|
+
|
|
7819
8065
|
|
|
7820
8066
|
|
|
7821
8067
|
|
|
@@ -7961,6 +8207,15 @@ var AVLTree = class extends BST {
|
|
|
7961
8207
|
|
|
7962
8208
|
|
|
7963
8209
|
|
|
8210
|
+
|
|
8211
|
+
|
|
8212
|
+
|
|
8213
|
+
|
|
8214
|
+
|
|
8215
|
+
|
|
8216
|
+
|
|
8217
|
+
|
|
8218
|
+
|
|
7964
8219
|
|
|
7965
8220
|
|
|
7966
8221
|
|
|
@@ -8596,6 +8851,18 @@ var RedBlackTree = class extends BST {
|
|
|
8596
8851
|
|
|
8597
8852
|
|
|
8598
8853
|
|
|
8854
|
+
|
|
8855
|
+
|
|
8856
|
+
|
|
8857
|
+
|
|
8858
|
+
|
|
8859
|
+
|
|
8860
|
+
|
|
8861
|
+
|
|
8862
|
+
|
|
8863
|
+
|
|
8864
|
+
|
|
8865
|
+
|
|
8599
8866
|
|
|
8600
8867
|
|
|
8601
8868
|
|
|
@@ -9100,16 +9367,28 @@ var RedBlackTree = class extends BST {
|
|
|
9100
9367
|
|
|
9101
9368
|
|
|
9102
9369
|
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9370
|
+
|
|
9371
|
+
|
|
9372
|
+
|
|
9373
|
+
|
|
9374
|
+
|
|
9375
|
+
|
|
9376
|
+
|
|
9377
|
+
|
|
9378
|
+
|
|
9379
|
+
|
|
9380
|
+
|
|
9381
|
+
|
|
9382
|
+
* @example
|
|
9383
|
+
* // basic Red-Black Tree with simple number keys
|
|
9384
|
+
* // Create a simple Red-Black Tree with numeric keys
|
|
9385
|
+
* const tree = new RedBlackTree([5, 2, 8, 1, 9]);
|
|
9386
|
+
*
|
|
9387
|
+
* tree.print();
|
|
9388
|
+
* // _2___
|
|
9389
|
+
* // / \
|
|
9390
|
+
* // 1 _8_
|
|
9391
|
+
* // / \
|
|
9113
9392
|
* // 5 9
|
|
9114
9393
|
*
|
|
9115
9394
|
* // Verify the tree maintains sorted order
|
|
@@ -9302,6 +9581,18 @@ var RedBlackTree = class extends BST {
|
|
|
9302
9581
|
|
|
9303
9582
|
|
|
9304
9583
|
|
|
9584
|
+
|
|
9585
|
+
|
|
9586
|
+
|
|
9587
|
+
|
|
9588
|
+
|
|
9589
|
+
|
|
9590
|
+
|
|
9591
|
+
|
|
9592
|
+
|
|
9593
|
+
|
|
9594
|
+
|
|
9595
|
+
|
|
9305
9596
|
|
|
9306
9597
|
|
|
9307
9598
|
|
|
@@ -9500,6 +9791,15 @@ var RedBlackTree = class extends BST {
|
|
|
9500
9791
|
|
|
9501
9792
|
|
|
9502
9793
|
|
|
9794
|
+
|
|
9795
|
+
|
|
9796
|
+
|
|
9797
|
+
|
|
9798
|
+
|
|
9799
|
+
|
|
9800
|
+
|
|
9801
|
+
|
|
9802
|
+
|
|
9503
9803
|
|
|
9504
9804
|
|
|
9505
9805
|
|
|
@@ -9665,6 +9965,18 @@ var RedBlackTree = class extends BST {
|
|
|
9665
9965
|
|
|
9666
9966
|
|
|
9667
9967
|
|
|
9968
|
+
|
|
9969
|
+
|
|
9970
|
+
|
|
9971
|
+
|
|
9972
|
+
|
|
9973
|
+
|
|
9974
|
+
|
|
9975
|
+
|
|
9976
|
+
|
|
9977
|
+
|
|
9978
|
+
|
|
9979
|
+
|
|
9668
9980
|
|
|
9669
9981
|
|
|
9670
9982
|
|
|
@@ -10199,6 +10511,21 @@ var TreeSet = class _TreeSet {
|
|
|
10199
10511
|
|
|
10200
10512
|
|
|
10201
10513
|
|
|
10514
|
+
|
|
10515
|
+
|
|
10516
|
+
|
|
10517
|
+
|
|
10518
|
+
|
|
10519
|
+
|
|
10520
|
+
|
|
10521
|
+
|
|
10522
|
+
|
|
10523
|
+
|
|
10524
|
+
|
|
10525
|
+
|
|
10526
|
+
|
|
10527
|
+
|
|
10528
|
+
|
|
10202
10529
|
|
|
10203
10530
|
|
|
10204
10531
|
|
|
@@ -10403,6 +10730,21 @@ var TreeSet = class _TreeSet {
|
|
|
10403
10730
|
|
|
10404
10731
|
|
|
10405
10732
|
|
|
10733
|
+
|
|
10734
|
+
|
|
10735
|
+
|
|
10736
|
+
|
|
10737
|
+
|
|
10738
|
+
|
|
10739
|
+
|
|
10740
|
+
|
|
10741
|
+
|
|
10742
|
+
|
|
10743
|
+
|
|
10744
|
+
|
|
10745
|
+
|
|
10746
|
+
|
|
10747
|
+
|
|
10406
10748
|
|
|
10407
10749
|
|
|
10408
10750
|
|
|
@@ -10448,6 +10790,18 @@ var TreeSet = class _TreeSet {
|
|
|
10448
10790
|
|
|
10449
10791
|
|
|
10450
10792
|
|
|
10793
|
+
|
|
10794
|
+
|
|
10795
|
+
|
|
10796
|
+
|
|
10797
|
+
|
|
10798
|
+
|
|
10799
|
+
|
|
10800
|
+
|
|
10801
|
+
|
|
10802
|
+
|
|
10803
|
+
|
|
10804
|
+
|
|
10451
10805
|
|
|
10452
10806
|
|
|
10453
10807
|
|
|
@@ -10647,6 +11001,21 @@ var TreeSet = class _TreeSet {
|
|
|
10647
11001
|
|
|
10648
11002
|
|
|
10649
11003
|
|
|
11004
|
+
|
|
11005
|
+
|
|
11006
|
+
|
|
11007
|
+
|
|
11008
|
+
|
|
11009
|
+
|
|
11010
|
+
|
|
11011
|
+
|
|
11012
|
+
|
|
11013
|
+
|
|
11014
|
+
|
|
11015
|
+
|
|
11016
|
+
|
|
11017
|
+
|
|
11018
|
+
|
|
10650
11019
|
|
|
10651
11020
|
|
|
10652
11021
|
|
|
@@ -10851,6 +11220,21 @@ var TreeSet = class _TreeSet {
|
|
|
10851
11220
|
|
|
10852
11221
|
|
|
10853
11222
|
|
|
11223
|
+
|
|
11224
|
+
|
|
11225
|
+
|
|
11226
|
+
|
|
11227
|
+
|
|
11228
|
+
|
|
11229
|
+
|
|
11230
|
+
|
|
11231
|
+
|
|
11232
|
+
|
|
11233
|
+
|
|
11234
|
+
|
|
11235
|
+
|
|
11236
|
+
|
|
11237
|
+
|
|
10854
11238
|
|
|
10855
11239
|
|
|
10856
11240
|
|
|
@@ -11060,6 +11444,21 @@ var TreeSet = class _TreeSet {
|
|
|
11060
11444
|
|
|
11061
11445
|
|
|
11062
11446
|
|
|
11447
|
+
|
|
11448
|
+
|
|
11449
|
+
|
|
11450
|
+
|
|
11451
|
+
|
|
11452
|
+
|
|
11453
|
+
|
|
11454
|
+
|
|
11455
|
+
|
|
11456
|
+
|
|
11457
|
+
|
|
11458
|
+
|
|
11459
|
+
|
|
11460
|
+
|
|
11461
|
+
|
|
11063
11462
|
|
|
11064
11463
|
|
|
11065
11464
|
|
|
@@ -11249,6 +11648,21 @@ var TreeSet = class _TreeSet {
|
|
|
11249
11648
|
|
|
11250
11649
|
|
|
11251
11650
|
|
|
11651
|
+
|
|
11652
|
+
|
|
11653
|
+
|
|
11654
|
+
|
|
11655
|
+
|
|
11656
|
+
|
|
11657
|
+
|
|
11658
|
+
|
|
11659
|
+
|
|
11660
|
+
|
|
11661
|
+
|
|
11662
|
+
|
|
11663
|
+
|
|
11664
|
+
|
|
11665
|
+
|
|
11252
11666
|
|
|
11253
11667
|
|
|
11254
11668
|
|
|
@@ -11439,6 +11853,21 @@ var TreeSet = class _TreeSet {
|
|
|
11439
11853
|
|
|
11440
11854
|
|
|
11441
11855
|
|
|
11856
|
+
|
|
11857
|
+
|
|
11858
|
+
|
|
11859
|
+
|
|
11860
|
+
|
|
11861
|
+
|
|
11862
|
+
|
|
11863
|
+
|
|
11864
|
+
|
|
11865
|
+
|
|
11866
|
+
|
|
11867
|
+
|
|
11868
|
+
|
|
11869
|
+
|
|
11870
|
+
|
|
11442
11871
|
|
|
11443
11872
|
|
|
11444
11873
|
|
|
@@ -11629,6 +12058,21 @@ var TreeSet = class _TreeSet {
|
|
|
11629
12058
|
|
|
11630
12059
|
|
|
11631
12060
|
|
|
12061
|
+
|
|
12062
|
+
|
|
12063
|
+
|
|
12064
|
+
|
|
12065
|
+
|
|
12066
|
+
|
|
12067
|
+
|
|
12068
|
+
|
|
12069
|
+
|
|
12070
|
+
|
|
12071
|
+
|
|
12072
|
+
|
|
12073
|
+
|
|
12074
|
+
|
|
12075
|
+
|
|
11632
12076
|
|
|
11633
12077
|
|
|
11634
12078
|
|
|
@@ -11822,6 +12266,21 @@ var TreeSet = class _TreeSet {
|
|
|
11822
12266
|
|
|
11823
12267
|
|
|
11824
12268
|
|
|
12269
|
+
|
|
12270
|
+
|
|
12271
|
+
|
|
12272
|
+
|
|
12273
|
+
|
|
12274
|
+
|
|
12275
|
+
|
|
12276
|
+
|
|
12277
|
+
|
|
12278
|
+
|
|
12279
|
+
|
|
12280
|
+
|
|
12281
|
+
|
|
12282
|
+
|
|
12283
|
+
|
|
11825
12284
|
|
|
11826
12285
|
|
|
11827
12286
|
|
|
@@ -12015,6 +12474,21 @@ var TreeSet = class _TreeSet {
|
|
|
12015
12474
|
|
|
12016
12475
|
|
|
12017
12476
|
|
|
12477
|
+
|
|
12478
|
+
|
|
12479
|
+
|
|
12480
|
+
|
|
12481
|
+
|
|
12482
|
+
|
|
12483
|
+
|
|
12484
|
+
|
|
12485
|
+
|
|
12486
|
+
|
|
12487
|
+
|
|
12488
|
+
|
|
12489
|
+
|
|
12490
|
+
|
|
12491
|
+
|
|
12018
12492
|
|
|
12019
12493
|
|
|
12020
12494
|
|
|
@@ -12211,6 +12685,21 @@ var TreeSet = class _TreeSet {
|
|
|
12211
12685
|
|
|
12212
12686
|
|
|
12213
12687
|
|
|
12688
|
+
|
|
12689
|
+
|
|
12690
|
+
|
|
12691
|
+
|
|
12692
|
+
|
|
12693
|
+
|
|
12694
|
+
|
|
12695
|
+
|
|
12696
|
+
|
|
12697
|
+
|
|
12698
|
+
|
|
12699
|
+
|
|
12700
|
+
|
|
12701
|
+
|
|
12702
|
+
|
|
12214
12703
|
|
|
12215
12704
|
|
|
12216
12705
|
|
|
@@ -12407,6 +12896,21 @@ var TreeSet = class _TreeSet {
|
|
|
12407
12896
|
|
|
12408
12897
|
|
|
12409
12898
|
|
|
12899
|
+
|
|
12900
|
+
|
|
12901
|
+
|
|
12902
|
+
|
|
12903
|
+
|
|
12904
|
+
|
|
12905
|
+
|
|
12906
|
+
|
|
12907
|
+
|
|
12908
|
+
|
|
12909
|
+
|
|
12910
|
+
|
|
12911
|
+
|
|
12912
|
+
|
|
12913
|
+
|
|
12410
12914
|
|
|
12411
12915
|
|
|
12412
12916
|
|
|
@@ -12614,15 +13118,30 @@ var TreeSet = class _TreeSet {
|
|
|
12614
13118
|
|
|
12615
13119
|
|
|
12616
13120
|
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
13121
|
+
|
|
13122
|
+
|
|
13123
|
+
|
|
13124
|
+
|
|
13125
|
+
|
|
13126
|
+
|
|
13127
|
+
|
|
13128
|
+
|
|
13129
|
+
|
|
13130
|
+
|
|
13131
|
+
|
|
13132
|
+
|
|
13133
|
+
|
|
13134
|
+
|
|
13135
|
+
|
|
13136
|
+
* @example
|
|
13137
|
+
* // Test all
|
|
13138
|
+
* const ts = new TreeSet<number>([2, 4, 6]);
|
|
13139
|
+
* console.log(ts.every(k => k > 0)); // true;
|
|
13140
|
+
*/
|
|
13141
|
+
every(callbackfn, thisArg) {
|
|
13142
|
+
let index = 0;
|
|
13143
|
+
for (const v of this) {
|
|
13144
|
+
const ok = thisArg === void 0 ? callbackfn(v, index++, this) : callbackfn.call(thisArg, v, index++, this);
|
|
12626
13145
|
if (!ok) return false;
|
|
12627
13146
|
}
|
|
12628
13147
|
return true;
|
|
@@ -12790,6 +13309,21 @@ var TreeSet = class _TreeSet {
|
|
|
12790
13309
|
|
|
12791
13310
|
|
|
12792
13311
|
|
|
13312
|
+
|
|
13313
|
+
|
|
13314
|
+
|
|
13315
|
+
|
|
13316
|
+
|
|
13317
|
+
|
|
13318
|
+
|
|
13319
|
+
|
|
13320
|
+
|
|
13321
|
+
|
|
13322
|
+
|
|
13323
|
+
|
|
13324
|
+
|
|
13325
|
+
|
|
13326
|
+
|
|
12793
13327
|
|
|
12794
13328
|
|
|
12795
13329
|
|
|
@@ -12982,6 +13516,21 @@ var TreeSet = class _TreeSet {
|
|
|
12982
13516
|
|
|
12983
13517
|
|
|
12984
13518
|
|
|
13519
|
+
|
|
13520
|
+
|
|
13521
|
+
|
|
13522
|
+
|
|
13523
|
+
|
|
13524
|
+
|
|
13525
|
+
|
|
13526
|
+
|
|
13527
|
+
|
|
13528
|
+
|
|
13529
|
+
|
|
13530
|
+
|
|
13531
|
+
|
|
13532
|
+
|
|
13533
|
+
|
|
12985
13534
|
|
|
12986
13535
|
|
|
12987
13536
|
|
|
@@ -13177,6 +13726,21 @@ var TreeSet = class _TreeSet {
|
|
|
13177
13726
|
|
|
13178
13727
|
|
|
13179
13728
|
|
|
13729
|
+
|
|
13730
|
+
|
|
13731
|
+
|
|
13732
|
+
|
|
13733
|
+
|
|
13734
|
+
|
|
13735
|
+
|
|
13736
|
+
|
|
13737
|
+
|
|
13738
|
+
|
|
13739
|
+
|
|
13740
|
+
|
|
13741
|
+
|
|
13742
|
+
|
|
13743
|
+
|
|
13180
13744
|
|
|
13181
13745
|
|
|
13182
13746
|
|
|
@@ -13366,6 +13930,21 @@ var TreeSet = class _TreeSet {
|
|
|
13366
13930
|
|
|
13367
13931
|
|
|
13368
13932
|
|
|
13933
|
+
|
|
13934
|
+
|
|
13935
|
+
|
|
13936
|
+
|
|
13937
|
+
|
|
13938
|
+
|
|
13939
|
+
|
|
13940
|
+
|
|
13941
|
+
|
|
13942
|
+
|
|
13943
|
+
|
|
13944
|
+
|
|
13945
|
+
|
|
13946
|
+
|
|
13947
|
+
|
|
13369
13948
|
|
|
13370
13949
|
|
|
13371
13950
|
|
|
@@ -13428,6 +14007,9 @@ var TreeSet = class _TreeSet {
|
|
|
13428
14007
|
|
|
13429
14008
|
|
|
13430
14009
|
|
|
14010
|
+
|
|
14011
|
+
|
|
14012
|
+
|
|
13431
14013
|
|
|
13432
14014
|
|
|
13433
14015
|
|
|
@@ -13500,6 +14082,9 @@ var TreeSet = class _TreeSet {
|
|
|
13500
14082
|
|
|
13501
14083
|
|
|
13502
14084
|
|
|
14085
|
+
|
|
14086
|
+
|
|
14087
|
+
|
|
13503
14088
|
|
|
13504
14089
|
|
|
13505
14090
|
|
|
@@ -13550,6 +14135,9 @@ var TreeSet = class _TreeSet {
|
|
|
13550
14135
|
|
|
13551
14136
|
|
|
13552
14137
|
|
|
14138
|
+
|
|
14139
|
+
|
|
14140
|
+
|
|
13553
14141
|
|
|
13554
14142
|
|
|
13555
14143
|
|
|
@@ -13605,6 +14193,9 @@ var TreeSet = class _TreeSet {
|
|
|
13605
14193
|
|
|
13606
14194
|
|
|
13607
14195
|
|
|
14196
|
+
|
|
14197
|
+
|
|
14198
|
+
|
|
13608
14199
|
|
|
13609
14200
|
|
|
13610
14201
|
|
|
@@ -13761,6 +14352,18 @@ var TreeSet = class _TreeSet {
|
|
|
13761
14352
|
|
|
13762
14353
|
|
|
13763
14354
|
|
|
14355
|
+
|
|
14356
|
+
|
|
14357
|
+
|
|
14358
|
+
|
|
14359
|
+
|
|
14360
|
+
|
|
14361
|
+
|
|
14362
|
+
|
|
14363
|
+
|
|
14364
|
+
|
|
14365
|
+
|
|
14366
|
+
|
|
13764
14367
|
|
|
13765
14368
|
|
|
13766
14369
|
|
|
@@ -13934,6 +14537,18 @@ var TreeSet = class _TreeSet {
|
|
|
13934
14537
|
|
|
13935
14538
|
|
|
13936
14539
|
|
|
14540
|
+
|
|
14541
|
+
|
|
14542
|
+
|
|
14543
|
+
|
|
14544
|
+
|
|
14545
|
+
|
|
14546
|
+
|
|
14547
|
+
|
|
14548
|
+
|
|
14549
|
+
|
|
14550
|
+
|
|
14551
|
+
|
|
13937
14552
|
|
|
13938
14553
|
|
|
13939
14554
|
|
|
@@ -14099,6 +14714,18 @@ var TreeSet = class _TreeSet {
|
|
|
14099
14714
|
|
|
14100
14715
|
|
|
14101
14716
|
|
|
14717
|
+
|
|
14718
|
+
|
|
14719
|
+
|
|
14720
|
+
|
|
14721
|
+
|
|
14722
|
+
|
|
14723
|
+
|
|
14724
|
+
|
|
14725
|
+
|
|
14726
|
+
|
|
14727
|
+
|
|
14728
|
+
|
|
14102
14729
|
|
|
14103
14730
|
|
|
14104
14731
|
|
|
@@ -14262,6 +14889,18 @@ var TreeSet = class _TreeSet {
|
|
|
14262
14889
|
|
|
14263
14890
|
|
|
14264
14891
|
|
|
14892
|
+
|
|
14893
|
+
|
|
14894
|
+
|
|
14895
|
+
|
|
14896
|
+
|
|
14897
|
+
|
|
14898
|
+
|
|
14899
|
+
|
|
14900
|
+
|
|
14901
|
+
|
|
14902
|
+
|
|
14903
|
+
|
|
14265
14904
|
|
|
14266
14905
|
|
|
14267
14906
|
|
|
@@ -14428,6 +15067,18 @@ var TreeSet = class _TreeSet {
|
|
|
14428
15067
|
|
|
14429
15068
|
|
|
14430
15069
|
|
|
15070
|
+
|
|
15071
|
+
|
|
15072
|
+
|
|
15073
|
+
|
|
15074
|
+
|
|
15075
|
+
|
|
15076
|
+
|
|
15077
|
+
|
|
15078
|
+
|
|
15079
|
+
|
|
15080
|
+
|
|
15081
|
+
|
|
14431
15082
|
|
|
14432
15083
|
|
|
14433
15084
|
|
|
@@ -14521,6 +15172,12 @@ var TreeSet = class _TreeSet {
|
|
|
14521
15172
|
|
|
14522
15173
|
|
|
14523
15174
|
|
|
15175
|
+
|
|
15176
|
+
|
|
15177
|
+
|
|
15178
|
+
|
|
15179
|
+
|
|
15180
|
+
|
|
14524
15181
|
* @example
|
|
14525
15182
|
* // Pagination by position in tree order
|
|
14526
15183
|
* const tree = new TreeSet<number>(
|
|
@@ -14713,6 +15370,145 @@ var TreeSet = class _TreeSet {
|
|
|
14713
15370
|
|
|
14714
15371
|
|
|
14715
15372
|
|
|
15373
|
+
|
|
15374
|
+
|
|
15375
|
+
|
|
15376
|
+
|
|
15377
|
+
|
|
15378
|
+
|
|
15379
|
+
|
|
15380
|
+
|
|
15381
|
+
|
|
15382
|
+
|
|
15383
|
+
|
|
15384
|
+
|
|
15385
|
+
|
|
15386
|
+
* @example
|
|
15387
|
+
* // Deep clone
|
|
15388
|
+
* const ts = new TreeSet<number>([1, 2, 3]);
|
|
15389
|
+
* const copy = ts.clone();
|
|
15390
|
+
* copy.delete(1);
|
|
15391
|
+
* console.log(ts.has(1)); // true;
|
|
15392
|
+
*/
|
|
15393
|
+
// ---- ES2025 Set-like operations ----
|
|
15394
|
+
/**
|
|
15395
|
+
* Return a new TreeSet containing all elements from both sets.
|
|
15396
|
+
* @remarks When both sets share the same comparator, uses O(n+m) merge. Otherwise O(m log n).
|
|
15397
|
+
* @param other - Any iterable of keys.
|
|
15398
|
+
* @returns A new TreeSet.
|
|
15399
|
+
* @example
|
|
15400
|
+
* // Merge two sets
|
|
15401
|
+
* console.log([...a.union(b)]); // [1, 2, 3, 4, 5, 6, 7];
|
|
15402
|
+
*/
|
|
15403
|
+
union(other) {
|
|
15404
|
+
const result = this.clone();
|
|
15405
|
+
for (const key of other) result.add(key);
|
|
15406
|
+
return result;
|
|
15407
|
+
}
|
|
15408
|
+
/**
|
|
15409
|
+
* Return a new TreeSet containing only elements present in both sets.
|
|
15410
|
+
* @remarks Time O(n+m) with ordered merge when possible, otherwise O(n log m).
|
|
15411
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15412
|
+
* @returns A new TreeSet.
|
|
15413
|
+
* @example
|
|
15414
|
+
* // Find common elements
|
|
15415
|
+
* console.log([...a.intersection(b)]); // [3, 4, 5];
|
|
15416
|
+
*/
|
|
15417
|
+
intersection(other) {
|
|
15418
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15419
|
+
const result = new _TreeSet([], { comparator: this.#isDefaultComparator ? void 0 : this.#userComparator });
|
|
15420
|
+
for (const key of this) {
|
|
15421
|
+
if (otherSet.has(key)) result.add(key);
|
|
15422
|
+
}
|
|
15423
|
+
return result;
|
|
15424
|
+
}
|
|
15425
|
+
/**
|
|
15426
|
+
* Return a new TreeSet containing elements in this set but not in the other.
|
|
15427
|
+
* @remarks Time O(n+m) with ordered merge when possible, otherwise O(n log m).
|
|
15428
|
+
* @param other - Any iterable of keys.
|
|
15429
|
+
* @returns A new TreeSet.
|
|
15430
|
+
* @example
|
|
15431
|
+
* // Find exclusive elements
|
|
15432
|
+
* console.log([...a.difference(b)]); // [1, 2];
|
|
15433
|
+
*/
|
|
15434
|
+
difference(other) {
|
|
15435
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15436
|
+
const result = new _TreeSet([], { comparator: this.#isDefaultComparator ? void 0 : this.#userComparator });
|
|
15437
|
+
for (const key of this) {
|
|
15438
|
+
if (!otherSet.has(key)) result.add(key);
|
|
15439
|
+
}
|
|
15440
|
+
return result;
|
|
15441
|
+
}
|
|
15442
|
+
/**
|
|
15443
|
+
* Return a new TreeSet containing elements in either set but not both.
|
|
15444
|
+
* @remarks Time O(n+m).
|
|
15445
|
+
* @param other - Any iterable of keys.
|
|
15446
|
+
* @returns A new TreeSet.
|
|
15447
|
+
* @example
|
|
15448
|
+
* // Find symmetric difference
|
|
15449
|
+
* console.log([...a.symmetricDifference(b)]); // [1, 2, 6, 7];
|
|
15450
|
+
*/
|
|
15451
|
+
symmetricDifference(other) {
|
|
15452
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15453
|
+
const result = new _TreeSet([], { comparator: this.#isDefaultComparator ? void 0 : this.#userComparator });
|
|
15454
|
+
for (const key of this) {
|
|
15455
|
+
if (!otherSet.has(key)) result.add(key);
|
|
15456
|
+
}
|
|
15457
|
+
for (const key of otherSet) {
|
|
15458
|
+
if (!this.has(key)) result.add(key);
|
|
15459
|
+
}
|
|
15460
|
+
return result;
|
|
15461
|
+
}
|
|
15462
|
+
/**
|
|
15463
|
+
* Check whether every element in this set is also in the other.
|
|
15464
|
+
* @remarks Time O(n).
|
|
15465
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15466
|
+
* @returns `true` if this is a subset of other.
|
|
15467
|
+
* @example
|
|
15468
|
+
* // Check subset
|
|
15469
|
+
* console.log(new TreeSet([3, 4]).isSubsetOf(a)); // true;
|
|
15470
|
+
*/
|
|
15471
|
+
isSubsetOf(other) {
|
|
15472
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15473
|
+
for (const key of this) {
|
|
15474
|
+
if (!otherSet.has(key)) return false;
|
|
15475
|
+
}
|
|
15476
|
+
return true;
|
|
15477
|
+
}
|
|
15478
|
+
/**
|
|
15479
|
+
* Check whether every element in the other set is also in this set.
|
|
15480
|
+
* @remarks Time O(m).
|
|
15481
|
+
* @param other - Any iterable of keys.
|
|
15482
|
+
* @returns `true` if this is a superset of other.
|
|
15483
|
+
* @example
|
|
15484
|
+
* // Check superset
|
|
15485
|
+
* console.log(a.isSupersetOf(new TreeSet([2, 3]))); // true;
|
|
15486
|
+
*/
|
|
15487
|
+
isSupersetOf(other) {
|
|
15488
|
+
for (const key of other) {
|
|
15489
|
+
if (!this.has(key)) return false;
|
|
15490
|
+
}
|
|
15491
|
+
return true;
|
|
15492
|
+
}
|
|
15493
|
+
/**
|
|
15494
|
+
* Check whether this set and the other share no common elements.
|
|
15495
|
+
* @remarks Time O(min(n,m)), can short-circuit on first overlap.
|
|
15496
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15497
|
+
* @returns `true` if sets are disjoint.
|
|
15498
|
+
* @example
|
|
15499
|
+
* // Check disjoint
|
|
15500
|
+
* console.log(a.isDisjointFrom(new TreeSet([8, 9]))); // true;
|
|
15501
|
+
*/
|
|
15502
|
+
isDisjointFrom(other) {
|
|
15503
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15504
|
+
for (const key of this) {
|
|
15505
|
+
if (otherSet.has(key)) return false;
|
|
15506
|
+
}
|
|
15507
|
+
return true;
|
|
15508
|
+
}
|
|
15509
|
+
/**
|
|
15510
|
+
* Deep copy
|
|
15511
|
+
|
|
14716
15512
|
|
|
14717
15513
|
|
|
14718
15514
|
|
|
@@ -14975,6 +15771,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
14975
15771
|
|
|
14976
15772
|
|
|
14977
15773
|
|
|
15774
|
+
|
|
15775
|
+
|
|
15776
|
+
|
|
15777
|
+
|
|
15778
|
+
|
|
15779
|
+
|
|
15780
|
+
|
|
15781
|
+
|
|
15782
|
+
|
|
15783
|
+
|
|
15784
|
+
|
|
15785
|
+
|
|
15786
|
+
|
|
15787
|
+
|
|
15788
|
+
|
|
14978
15789
|
|
|
14979
15790
|
|
|
14980
15791
|
|
|
@@ -15163,6 +15974,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
15163
15974
|
|
|
15164
15975
|
|
|
15165
15976
|
|
|
15977
|
+
|
|
15978
|
+
|
|
15979
|
+
|
|
15980
|
+
|
|
15981
|
+
|
|
15982
|
+
|
|
15983
|
+
|
|
15984
|
+
|
|
15985
|
+
|
|
15986
|
+
|
|
15987
|
+
|
|
15988
|
+
|
|
15989
|
+
|
|
15990
|
+
|
|
15991
|
+
|
|
15166
15992
|
|
|
15167
15993
|
|
|
15168
15994
|
|
|
@@ -15218,6 +16044,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
15218
16044
|
|
|
15219
16045
|
|
|
15220
16046
|
|
|
16047
|
+
|
|
16048
|
+
|
|
16049
|
+
|
|
15221
16050
|
|
|
15222
16051
|
|
|
15223
16052
|
|
|
@@ -15262,6 +16091,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
15262
16091
|
|
|
15263
16092
|
|
|
15264
16093
|
|
|
16094
|
+
|
|
16095
|
+
|
|
16096
|
+
|
|
15265
16097
|
|
|
15266
16098
|
|
|
15267
16099
|
|
|
@@ -15483,6 +16315,24 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
15483
16315
|
|
|
15484
16316
|
|
|
15485
16317
|
|
|
16318
|
+
|
|
16319
|
+
|
|
16320
|
+
|
|
16321
|
+
|
|
16322
|
+
|
|
16323
|
+
|
|
16324
|
+
|
|
16325
|
+
|
|
16326
|
+
|
|
16327
|
+
|
|
16328
|
+
|
|
16329
|
+
|
|
16330
|
+
|
|
16331
|
+
|
|
16332
|
+
|
|
16333
|
+
|
|
16334
|
+
|
|
16335
|
+
|
|
15486
16336
|
|
|
15487
16337
|
|
|
15488
16338
|
|
|
@@ -15717,6 +16567,24 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
15717
16567
|
|
|
15718
16568
|
|
|
15719
16569
|
|
|
16570
|
+
|
|
16571
|
+
|
|
16572
|
+
|
|
16573
|
+
|
|
16574
|
+
|
|
16575
|
+
|
|
16576
|
+
|
|
16577
|
+
|
|
16578
|
+
|
|
16579
|
+
|
|
16580
|
+
|
|
16581
|
+
|
|
16582
|
+
|
|
16583
|
+
|
|
16584
|
+
|
|
16585
|
+
|
|
16586
|
+
|
|
16587
|
+
|
|
15720
16588
|
|
|
15721
16589
|
|
|
15722
16590
|
|
|
@@ -15906,6 +16774,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
15906
16774
|
|
|
15907
16775
|
|
|
15908
16776
|
|
|
16777
|
+
|
|
16778
|
+
|
|
16779
|
+
|
|
16780
|
+
|
|
16781
|
+
|
|
16782
|
+
|
|
16783
|
+
|
|
16784
|
+
|
|
16785
|
+
|
|
16786
|
+
|
|
16787
|
+
|
|
16788
|
+
|
|
16789
|
+
|
|
16790
|
+
|
|
16791
|
+
|
|
15909
16792
|
|
|
15910
16793
|
|
|
15911
16794
|
|
|
@@ -16162,6 +17045,24 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16162
17045
|
|
|
16163
17046
|
|
|
16164
17047
|
|
|
17048
|
+
|
|
17049
|
+
|
|
17050
|
+
|
|
17051
|
+
|
|
17052
|
+
|
|
17053
|
+
|
|
17054
|
+
|
|
17055
|
+
|
|
17056
|
+
|
|
17057
|
+
|
|
17058
|
+
|
|
17059
|
+
|
|
17060
|
+
|
|
17061
|
+
|
|
17062
|
+
|
|
17063
|
+
|
|
17064
|
+
|
|
17065
|
+
|
|
16165
17066
|
|
|
16166
17067
|
|
|
16167
17068
|
|
|
@@ -16222,6 +17123,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16222
17123
|
|
|
16223
17124
|
|
|
16224
17125
|
|
|
17126
|
+
|
|
17127
|
+
|
|
17128
|
+
|
|
16225
17129
|
|
|
16226
17130
|
|
|
16227
17131
|
|
|
@@ -16267,6 +17171,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16267
17171
|
|
|
16268
17172
|
|
|
16269
17173
|
|
|
17174
|
+
|
|
17175
|
+
|
|
17176
|
+
|
|
16270
17177
|
|
|
16271
17178
|
|
|
16272
17179
|
|
|
@@ -16317,6 +17224,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16317
17224
|
|
|
16318
17225
|
|
|
16319
17226
|
|
|
17227
|
+
|
|
17228
|
+
|
|
17229
|
+
|
|
16320
17230
|
|
|
16321
17231
|
|
|
16322
17232
|
|
|
@@ -16519,6 +17429,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16519
17429
|
|
|
16520
17430
|
|
|
16521
17431
|
|
|
17432
|
+
|
|
17433
|
+
|
|
17434
|
+
|
|
17435
|
+
|
|
17436
|
+
|
|
17437
|
+
|
|
17438
|
+
|
|
17439
|
+
|
|
17440
|
+
|
|
17441
|
+
|
|
17442
|
+
|
|
17443
|
+
|
|
17444
|
+
|
|
17445
|
+
|
|
17446
|
+
|
|
16522
17447
|
|
|
16523
17448
|
|
|
16524
17449
|
|
|
@@ -16710,6 +17635,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16710
17635
|
|
|
16711
17636
|
|
|
16712
17637
|
|
|
17638
|
+
|
|
17639
|
+
|
|
17640
|
+
|
|
17641
|
+
|
|
17642
|
+
|
|
17643
|
+
|
|
17644
|
+
|
|
17645
|
+
|
|
17646
|
+
|
|
17647
|
+
|
|
17648
|
+
|
|
17649
|
+
|
|
17650
|
+
|
|
17651
|
+
|
|
17652
|
+
|
|
16713
17653
|
|
|
16714
17654
|
|
|
16715
17655
|
|
|
@@ -16736,6 +17676,31 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16736
17676
|
*values() {
|
|
16737
17677
|
for (const [, bucket] of this) yield bucket;
|
|
16738
17678
|
}
|
|
17679
|
+
/**
|
|
17680
|
+
* Iterate over all `[key, values[]]` entries (Map-compatible).
|
|
17681
|
+
* @remarks Time O(n), Space O(1) per step.
|
|
17682
|
+
|
|
17683
|
+
|
|
17684
|
+
|
|
17685
|
+
|
|
17686
|
+
|
|
17687
|
+
|
|
17688
|
+
|
|
17689
|
+
|
|
17690
|
+
* @example
|
|
17691
|
+
* // Iterate over entries
|
|
17692
|
+
* const mm = new TreeMultiMap<number, string>();
|
|
17693
|
+
* mm.set(1, 'a');
|
|
17694
|
+
* mm.set(1, 'b');
|
|
17695
|
+
* mm.set(2, 'c');
|
|
17696
|
+
* console.log([...mm.entries()]); // [
|
|
17697
|
+
* // [1, ['a', 'b']],
|
|
17698
|
+
* // [2, ['c']]
|
|
17699
|
+
* // ];
|
|
17700
|
+
*/
|
|
17701
|
+
*entries() {
|
|
17702
|
+
yield* this;
|
|
17703
|
+
}
|
|
16739
17704
|
// ---- entry-flat views ----
|
|
16740
17705
|
/**
|
|
16741
17706
|
* Iterates over all entries for a specific key.
|
|
@@ -16766,6 +17731,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16766
17731
|
|
|
16767
17732
|
|
|
16768
17733
|
|
|
17734
|
+
|
|
17735
|
+
|
|
17736
|
+
|
|
16769
17737
|
|
|
16770
17738
|
|
|
16771
17739
|
|
|
@@ -16811,6 +17779,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16811
17779
|
|
|
16812
17780
|
|
|
16813
17781
|
|
|
17782
|
+
|
|
17783
|
+
|
|
17784
|
+
|
|
16814
17785
|
|
|
16815
17786
|
|
|
16816
17787
|
|
|
@@ -16856,6 +17827,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16856
17827
|
|
|
16857
17828
|
|
|
16858
17829
|
|
|
17830
|
+
|
|
17831
|
+
|
|
17832
|
+
|
|
16859
17833
|
|
|
16860
17834
|
|
|
16861
17835
|
|
|
@@ -16940,6 +17914,12 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
16940
17914
|
|
|
16941
17915
|
|
|
16942
17916
|
|
|
17917
|
+
|
|
17918
|
+
|
|
17919
|
+
|
|
17920
|
+
|
|
17921
|
+
|
|
17922
|
+
|
|
16943
17923
|
|
|
16944
17924
|
|
|
16945
17925
|
|
|
@@ -17029,6 +18009,12 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
17029
18009
|
|
|
17030
18010
|
|
|
17031
18011
|
|
|
18012
|
+
|
|
18013
|
+
|
|
18014
|
+
|
|
18015
|
+
|
|
18016
|
+
|
|
18017
|
+
|
|
17032
18018
|
|
|
17033
18019
|
|
|
17034
18020
|
|
|
@@ -17082,6 +18068,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
17082
18068
|
|
|
17083
18069
|
|
|
17084
18070
|
|
|
18071
|
+
|
|
18072
|
+
|
|
18073
|
+
|
|
17085
18074
|
|
|
17086
18075
|
|
|
17087
18076
|
|
|
@@ -17131,6 +18120,9 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
17131
18120
|
|
|
17132
18121
|
|
|
17133
18122
|
|
|
18123
|
+
|
|
18124
|
+
|
|
18125
|
+
|
|
17134
18126
|
|
|
17135
18127
|
|
|
17136
18128
|
|
|
@@ -17317,6 +18309,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
17317
18309
|
|
|
17318
18310
|
|
|
17319
18311
|
|
|
18312
|
+
|
|
18313
|
+
|
|
18314
|
+
|
|
18315
|
+
|
|
18316
|
+
|
|
18317
|
+
|
|
18318
|
+
|
|
18319
|
+
|
|
18320
|
+
|
|
18321
|
+
|
|
18322
|
+
|
|
18323
|
+
|
|
18324
|
+
|
|
18325
|
+
|
|
18326
|
+
|
|
17320
18327
|
|
|
17321
18328
|
|
|
17322
18329
|
|
|
@@ -17519,6 +18526,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
17519
18526
|
|
|
17520
18527
|
|
|
17521
18528
|
|
|
18529
|
+
|
|
18530
|
+
|
|
18531
|
+
|
|
18532
|
+
|
|
18533
|
+
|
|
18534
|
+
|
|
18535
|
+
|
|
18536
|
+
|
|
18537
|
+
|
|
18538
|
+
|
|
18539
|
+
|
|
18540
|
+
|
|
18541
|
+
|
|
18542
|
+
|
|
18543
|
+
|
|
17522
18544
|
|
|
17523
18545
|
|
|
17524
18546
|
|
|
@@ -17685,6 +18707,18 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
17685
18707
|
|
|
17686
18708
|
|
|
17687
18709
|
|
|
18710
|
+
|
|
18711
|
+
|
|
18712
|
+
|
|
18713
|
+
|
|
18714
|
+
|
|
18715
|
+
|
|
18716
|
+
|
|
18717
|
+
|
|
18718
|
+
|
|
18719
|
+
|
|
18720
|
+
|
|
18721
|
+
|
|
17688
18722
|
|
|
17689
18723
|
|
|
17690
18724
|
|
|
@@ -17847,6 +18881,18 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
17847
18881
|
|
|
17848
18882
|
|
|
17849
18883
|
|
|
18884
|
+
|
|
18885
|
+
|
|
18886
|
+
|
|
18887
|
+
|
|
18888
|
+
|
|
18889
|
+
|
|
18890
|
+
|
|
18891
|
+
|
|
18892
|
+
|
|
18893
|
+
|
|
18894
|
+
|
|
18895
|
+
|
|
17850
18896
|
|
|
17851
18897
|
|
|
17852
18898
|
|
|
@@ -18043,6 +19089,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
18043
19089
|
|
|
18044
19090
|
|
|
18045
19091
|
|
|
19092
|
+
|
|
19093
|
+
|
|
19094
|
+
|
|
19095
|
+
|
|
19096
|
+
|
|
19097
|
+
|
|
19098
|
+
|
|
19099
|
+
|
|
19100
|
+
|
|
19101
|
+
|
|
19102
|
+
|
|
19103
|
+
|
|
19104
|
+
|
|
19105
|
+
|
|
19106
|
+
|
|
18046
19107
|
|
|
18047
19108
|
|
|
18048
19109
|
|
|
@@ -18233,6 +19294,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
18233
19294
|
|
|
18234
19295
|
|
|
18235
19296
|
|
|
19297
|
+
|
|
19298
|
+
|
|
19299
|
+
|
|
19300
|
+
|
|
19301
|
+
|
|
19302
|
+
|
|
19303
|
+
|
|
19304
|
+
|
|
19305
|
+
|
|
19306
|
+
|
|
19307
|
+
|
|
19308
|
+
|
|
19309
|
+
|
|
19310
|
+
|
|
19311
|
+
|
|
18236
19312
|
|
|
18237
19313
|
|
|
18238
19314
|
|
|
@@ -18428,6 +19504,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
18428
19504
|
|
|
18429
19505
|
|
|
18430
19506
|
|
|
19507
|
+
|
|
19508
|
+
|
|
19509
|
+
|
|
19510
|
+
|
|
19511
|
+
|
|
19512
|
+
|
|
19513
|
+
|
|
19514
|
+
|
|
19515
|
+
|
|
19516
|
+
|
|
19517
|
+
|
|
19518
|
+
|
|
19519
|
+
|
|
19520
|
+
|
|
19521
|
+
|
|
18431
19522
|
|
|
18432
19523
|
|
|
18433
19524
|
|
|
@@ -18625,6 +19716,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
18625
19716
|
|
|
18626
19717
|
|
|
18627
19718
|
|
|
19719
|
+
|
|
19720
|
+
|
|
19721
|
+
|
|
19722
|
+
|
|
19723
|
+
|
|
19724
|
+
|
|
19725
|
+
|
|
19726
|
+
|
|
19727
|
+
|
|
19728
|
+
|
|
19729
|
+
|
|
19730
|
+
|
|
19731
|
+
|
|
19732
|
+
|
|
19733
|
+
|
|
18628
19734
|
|
|
18629
19735
|
|
|
18630
19736
|
|
|
@@ -18820,6 +19926,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
18820
19926
|
|
|
18821
19927
|
|
|
18822
19928
|
|
|
19929
|
+
|
|
19930
|
+
|
|
19931
|
+
|
|
19932
|
+
|
|
19933
|
+
|
|
19934
|
+
|
|
19935
|
+
|
|
19936
|
+
|
|
19937
|
+
|
|
19938
|
+
|
|
19939
|
+
|
|
19940
|
+
|
|
19941
|
+
|
|
19942
|
+
|
|
19943
|
+
|
|
18823
19944
|
|
|
18824
19945
|
|
|
18825
19946
|
|
|
@@ -19008,6 +20129,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
19008
20129
|
|
|
19009
20130
|
|
|
19010
20131
|
|
|
20132
|
+
|
|
20133
|
+
|
|
20134
|
+
|
|
20135
|
+
|
|
20136
|
+
|
|
20137
|
+
|
|
20138
|
+
|
|
20139
|
+
|
|
20140
|
+
|
|
20141
|
+
|
|
20142
|
+
|
|
20143
|
+
|
|
20144
|
+
|
|
20145
|
+
|
|
20146
|
+
|
|
19011
20147
|
|
|
19012
20148
|
|
|
19013
20149
|
|
|
@@ -19169,6 +20305,18 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
19169
20305
|
|
|
19170
20306
|
|
|
19171
20307
|
|
|
20308
|
+
|
|
20309
|
+
|
|
20310
|
+
|
|
20311
|
+
|
|
20312
|
+
|
|
20313
|
+
|
|
20314
|
+
|
|
20315
|
+
|
|
20316
|
+
|
|
20317
|
+
|
|
20318
|
+
|
|
20319
|
+
|
|
19172
20320
|
|
|
19173
20321
|
|
|
19174
20322
|
|
|
@@ -19393,6 +20541,12 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
19393
20541
|
|
|
19394
20542
|
|
|
19395
20543
|
|
|
20544
|
+
|
|
20545
|
+
|
|
20546
|
+
|
|
20547
|
+
|
|
20548
|
+
|
|
20549
|
+
|
|
19396
20550
|
* @example
|
|
19397
20551
|
* // Pagination by position in tree order
|
|
19398
20552
|
* const tree = new TreeMultiMap<number>(
|
|
@@ -19432,6 +20586,21 @@ var TreeMultiMap = class _TreeMultiMap {
|
|
|
19432
20586
|
|
|
19433
20587
|
|
|
19434
20588
|
|
|
20589
|
+
|
|
20590
|
+
|
|
20591
|
+
|
|
20592
|
+
|
|
20593
|
+
|
|
20594
|
+
|
|
20595
|
+
|
|
20596
|
+
|
|
20597
|
+
|
|
20598
|
+
|
|
20599
|
+
|
|
20600
|
+
|
|
20601
|
+
|
|
20602
|
+
|
|
20603
|
+
|
|
19435
20604
|
|
|
19436
20605
|
|
|
19437
20606
|
|
|
@@ -19715,6 +20884,21 @@ var TreeMap = class _TreeMap {
|
|
|
19715
20884
|
|
|
19716
20885
|
|
|
19717
20886
|
|
|
20887
|
+
|
|
20888
|
+
|
|
20889
|
+
|
|
20890
|
+
|
|
20891
|
+
|
|
20892
|
+
|
|
20893
|
+
|
|
20894
|
+
|
|
20895
|
+
|
|
20896
|
+
|
|
20897
|
+
|
|
20898
|
+
|
|
20899
|
+
|
|
20900
|
+
|
|
20901
|
+
|
|
19718
20902
|
|
|
19719
20903
|
|
|
19720
20904
|
|
|
@@ -19912,6 +21096,21 @@ var TreeMap = class _TreeMap {
|
|
|
19912
21096
|
|
|
19913
21097
|
|
|
19914
21098
|
|
|
21099
|
+
|
|
21100
|
+
|
|
21101
|
+
|
|
21102
|
+
|
|
21103
|
+
|
|
21104
|
+
|
|
21105
|
+
|
|
21106
|
+
|
|
21107
|
+
|
|
21108
|
+
|
|
21109
|
+
|
|
21110
|
+
|
|
21111
|
+
|
|
21112
|
+
|
|
21113
|
+
|
|
19915
21114
|
|
|
19916
21115
|
|
|
19917
21116
|
|
|
@@ -19966,6 +21165,18 @@ var TreeMap = class _TreeMap {
|
|
|
19966
21165
|
|
|
19967
21166
|
|
|
19968
21167
|
|
|
21168
|
+
|
|
21169
|
+
|
|
21170
|
+
|
|
21171
|
+
|
|
21172
|
+
|
|
21173
|
+
|
|
21174
|
+
|
|
21175
|
+
|
|
21176
|
+
|
|
21177
|
+
|
|
21178
|
+
|
|
21179
|
+
|
|
19969
21180
|
|
|
19970
21181
|
|
|
19971
21182
|
|
|
@@ -20165,6 +21376,21 @@ var TreeMap = class _TreeMap {
|
|
|
20165
21376
|
|
|
20166
21377
|
|
|
20167
21378
|
|
|
21379
|
+
|
|
21380
|
+
|
|
21381
|
+
|
|
21382
|
+
|
|
21383
|
+
|
|
21384
|
+
|
|
21385
|
+
|
|
21386
|
+
|
|
21387
|
+
|
|
21388
|
+
|
|
21389
|
+
|
|
21390
|
+
|
|
21391
|
+
|
|
21392
|
+
|
|
21393
|
+
|
|
20168
21394
|
|
|
20169
21395
|
|
|
20170
21396
|
|
|
@@ -20373,6 +21599,21 @@ var TreeMap = class _TreeMap {
|
|
|
20373
21599
|
|
|
20374
21600
|
|
|
20375
21601
|
|
|
21602
|
+
|
|
21603
|
+
|
|
21604
|
+
|
|
21605
|
+
|
|
21606
|
+
|
|
21607
|
+
|
|
21608
|
+
|
|
21609
|
+
|
|
21610
|
+
|
|
21611
|
+
|
|
21612
|
+
|
|
21613
|
+
|
|
21614
|
+
|
|
21615
|
+
|
|
21616
|
+
|
|
20376
21617
|
|
|
20377
21618
|
|
|
20378
21619
|
|
|
@@ -20581,6 +21822,21 @@ var TreeMap = class _TreeMap {
|
|
|
20581
21822
|
|
|
20582
21823
|
|
|
20583
21824
|
|
|
21825
|
+
|
|
21826
|
+
|
|
21827
|
+
|
|
21828
|
+
|
|
21829
|
+
|
|
21830
|
+
|
|
21831
|
+
|
|
21832
|
+
|
|
21833
|
+
|
|
21834
|
+
|
|
21835
|
+
|
|
21836
|
+
|
|
21837
|
+
|
|
21838
|
+
|
|
21839
|
+
|
|
20584
21840
|
|
|
20585
21841
|
|
|
20586
21842
|
|
|
@@ -20795,6 +22051,21 @@ var TreeMap = class _TreeMap {
|
|
|
20795
22051
|
|
|
20796
22052
|
|
|
20797
22053
|
|
|
22054
|
+
|
|
22055
|
+
|
|
22056
|
+
|
|
22057
|
+
|
|
22058
|
+
|
|
22059
|
+
|
|
22060
|
+
|
|
22061
|
+
|
|
22062
|
+
|
|
22063
|
+
|
|
22064
|
+
|
|
22065
|
+
|
|
22066
|
+
|
|
22067
|
+
|
|
22068
|
+
|
|
20798
22069
|
|
|
20799
22070
|
|
|
20800
22071
|
|
|
@@ -20984,6 +22255,21 @@ var TreeMap = class _TreeMap {
|
|
|
20984
22255
|
|
|
20985
22256
|
|
|
20986
22257
|
|
|
22258
|
+
|
|
22259
|
+
|
|
22260
|
+
|
|
22261
|
+
|
|
22262
|
+
|
|
22263
|
+
|
|
22264
|
+
|
|
22265
|
+
|
|
22266
|
+
|
|
22267
|
+
|
|
22268
|
+
|
|
22269
|
+
|
|
22270
|
+
|
|
22271
|
+
|
|
22272
|
+
|
|
20987
22273
|
|
|
20988
22274
|
|
|
20989
22275
|
|
|
@@ -21177,6 +22463,21 @@ var TreeMap = class _TreeMap {
|
|
|
21177
22463
|
|
|
21178
22464
|
|
|
21179
22465
|
|
|
22466
|
+
|
|
22467
|
+
|
|
22468
|
+
|
|
22469
|
+
|
|
22470
|
+
|
|
22471
|
+
|
|
22472
|
+
|
|
22473
|
+
|
|
22474
|
+
|
|
22475
|
+
|
|
22476
|
+
|
|
22477
|
+
|
|
22478
|
+
|
|
22479
|
+
|
|
22480
|
+
|
|
21180
22481
|
|
|
21181
22482
|
|
|
21182
22483
|
|
|
@@ -21367,6 +22668,21 @@ var TreeMap = class _TreeMap {
|
|
|
21367
22668
|
|
|
21368
22669
|
|
|
21369
22670
|
|
|
22671
|
+
|
|
22672
|
+
|
|
22673
|
+
|
|
22674
|
+
|
|
22675
|
+
|
|
22676
|
+
|
|
22677
|
+
|
|
22678
|
+
|
|
22679
|
+
|
|
22680
|
+
|
|
22681
|
+
|
|
22682
|
+
|
|
22683
|
+
|
|
22684
|
+
|
|
22685
|
+
|
|
21370
22686
|
|
|
21371
22687
|
|
|
21372
22688
|
|
|
@@ -21560,6 +22876,21 @@ var TreeMap = class _TreeMap {
|
|
|
21560
22876
|
|
|
21561
22877
|
|
|
21562
22878
|
|
|
22879
|
+
|
|
22880
|
+
|
|
22881
|
+
|
|
22882
|
+
|
|
22883
|
+
|
|
22884
|
+
|
|
22885
|
+
|
|
22886
|
+
|
|
22887
|
+
|
|
22888
|
+
|
|
22889
|
+
|
|
22890
|
+
|
|
22891
|
+
|
|
22892
|
+
|
|
22893
|
+
|
|
21563
22894
|
|
|
21564
22895
|
|
|
21565
22896
|
|
|
@@ -21753,6 +23084,21 @@ var TreeMap = class _TreeMap {
|
|
|
21753
23084
|
|
|
21754
23085
|
|
|
21755
23086
|
|
|
23087
|
+
|
|
23088
|
+
|
|
23089
|
+
|
|
23090
|
+
|
|
23091
|
+
|
|
23092
|
+
|
|
23093
|
+
|
|
23094
|
+
|
|
23095
|
+
|
|
23096
|
+
|
|
23097
|
+
|
|
23098
|
+
|
|
23099
|
+
|
|
23100
|
+
|
|
23101
|
+
|
|
21756
23102
|
|
|
21757
23103
|
|
|
21758
23104
|
|
|
@@ -21949,6 +23295,21 @@ var TreeMap = class _TreeMap {
|
|
|
21949
23295
|
|
|
21950
23296
|
|
|
21951
23297
|
|
|
23298
|
+
|
|
23299
|
+
|
|
23300
|
+
|
|
23301
|
+
|
|
23302
|
+
|
|
23303
|
+
|
|
23304
|
+
|
|
23305
|
+
|
|
23306
|
+
|
|
23307
|
+
|
|
23308
|
+
|
|
23309
|
+
|
|
23310
|
+
|
|
23311
|
+
|
|
23312
|
+
|
|
21952
23313
|
|
|
21953
23314
|
|
|
21954
23315
|
|
|
@@ -22145,6 +23506,21 @@ var TreeMap = class _TreeMap {
|
|
|
22145
23506
|
|
|
22146
23507
|
|
|
22147
23508
|
|
|
23509
|
+
|
|
23510
|
+
|
|
23511
|
+
|
|
23512
|
+
|
|
23513
|
+
|
|
23514
|
+
|
|
23515
|
+
|
|
23516
|
+
|
|
23517
|
+
|
|
23518
|
+
|
|
23519
|
+
|
|
23520
|
+
|
|
23521
|
+
|
|
23522
|
+
|
|
23523
|
+
|
|
22148
23524
|
|
|
22149
23525
|
|
|
22150
23526
|
|
|
@@ -22335,6 +23711,21 @@ var TreeMap = class _TreeMap {
|
|
|
22335
23711
|
|
|
22336
23712
|
|
|
22337
23713
|
|
|
23714
|
+
|
|
23715
|
+
|
|
23716
|
+
|
|
23717
|
+
|
|
23718
|
+
|
|
23719
|
+
|
|
23720
|
+
|
|
23721
|
+
|
|
23722
|
+
|
|
23723
|
+
|
|
23724
|
+
|
|
23725
|
+
|
|
23726
|
+
|
|
23727
|
+
|
|
23728
|
+
|
|
22338
23729
|
|
|
22339
23730
|
|
|
22340
23731
|
|
|
@@ -22527,6 +23918,21 @@ var TreeMap = class _TreeMap {
|
|
|
22527
23918
|
|
|
22528
23919
|
|
|
22529
23920
|
|
|
23921
|
+
|
|
23922
|
+
|
|
23923
|
+
|
|
23924
|
+
|
|
23925
|
+
|
|
23926
|
+
|
|
23927
|
+
|
|
23928
|
+
|
|
23929
|
+
|
|
23930
|
+
|
|
23931
|
+
|
|
23932
|
+
|
|
23933
|
+
|
|
23934
|
+
|
|
23935
|
+
|
|
22530
23936
|
|
|
22531
23937
|
|
|
22532
23938
|
|
|
@@ -22720,6 +24126,21 @@ var TreeMap = class _TreeMap {
|
|
|
22720
24126
|
|
|
22721
24127
|
|
|
22722
24128
|
|
|
24129
|
+
|
|
24130
|
+
|
|
24131
|
+
|
|
24132
|
+
|
|
24133
|
+
|
|
24134
|
+
|
|
24135
|
+
|
|
24136
|
+
|
|
24137
|
+
|
|
24138
|
+
|
|
24139
|
+
|
|
24140
|
+
|
|
24141
|
+
|
|
24142
|
+
|
|
24143
|
+
|
|
22723
24144
|
|
|
22724
24145
|
|
|
22725
24146
|
|
|
@@ -22914,6 +24335,21 @@ var TreeMap = class _TreeMap {
|
|
|
22914
24335
|
|
|
22915
24336
|
|
|
22916
24337
|
|
|
24338
|
+
|
|
24339
|
+
|
|
24340
|
+
|
|
24341
|
+
|
|
24342
|
+
|
|
24343
|
+
|
|
24344
|
+
|
|
24345
|
+
|
|
24346
|
+
|
|
24347
|
+
|
|
24348
|
+
|
|
24349
|
+
|
|
24350
|
+
|
|
24351
|
+
|
|
24352
|
+
|
|
22917
24353
|
|
|
22918
24354
|
|
|
22919
24355
|
|
|
@@ -23103,6 +24539,21 @@ var TreeMap = class _TreeMap {
|
|
|
23103
24539
|
|
|
23104
24540
|
|
|
23105
24541
|
|
|
24542
|
+
|
|
24543
|
+
|
|
24544
|
+
|
|
24545
|
+
|
|
24546
|
+
|
|
24547
|
+
|
|
24548
|
+
|
|
24549
|
+
|
|
24550
|
+
|
|
24551
|
+
|
|
24552
|
+
|
|
24553
|
+
|
|
24554
|
+
|
|
24555
|
+
|
|
24556
|
+
|
|
23106
24557
|
|
|
23107
24558
|
|
|
23108
24559
|
|
|
@@ -23166,6 +24617,9 @@ var TreeMap = class _TreeMap {
|
|
|
23166
24617
|
|
|
23167
24618
|
|
|
23168
24619
|
|
|
24620
|
+
|
|
24621
|
+
|
|
24622
|
+
|
|
23169
24623
|
|
|
23170
24624
|
|
|
23171
24625
|
|
|
@@ -23238,6 +24692,9 @@ var TreeMap = class _TreeMap {
|
|
|
23238
24692
|
|
|
23239
24693
|
|
|
23240
24694
|
|
|
24695
|
+
|
|
24696
|
+
|
|
24697
|
+
|
|
23241
24698
|
|
|
23242
24699
|
|
|
23243
24700
|
|
|
@@ -23294,6 +24751,9 @@ var TreeMap = class _TreeMap {
|
|
|
23294
24751
|
|
|
23295
24752
|
|
|
23296
24753
|
|
|
24754
|
+
|
|
24755
|
+
|
|
24756
|
+
|
|
23297
24757
|
|
|
23298
24758
|
|
|
23299
24759
|
|
|
@@ -23354,6 +24814,9 @@ var TreeMap = class _TreeMap {
|
|
|
23354
24814
|
|
|
23355
24815
|
|
|
23356
24816
|
|
|
24817
|
+
|
|
24818
|
+
|
|
24819
|
+
|
|
23357
24820
|
|
|
23358
24821
|
|
|
23359
24822
|
|
|
@@ -23516,6 +24979,18 @@ var TreeMap = class _TreeMap {
|
|
|
23516
24979
|
|
|
23517
24980
|
|
|
23518
24981
|
|
|
24982
|
+
|
|
24983
|
+
|
|
24984
|
+
|
|
24985
|
+
|
|
24986
|
+
|
|
24987
|
+
|
|
24988
|
+
|
|
24989
|
+
|
|
24990
|
+
|
|
24991
|
+
|
|
24992
|
+
|
|
24993
|
+
|
|
23519
24994
|
|
|
23520
24995
|
|
|
23521
24996
|
|
|
@@ -23705,6 +25180,18 @@ var TreeMap = class _TreeMap {
|
|
|
23705
25180
|
|
|
23706
25181
|
|
|
23707
25182
|
|
|
25183
|
+
|
|
25184
|
+
|
|
25185
|
+
|
|
25186
|
+
|
|
25187
|
+
|
|
25188
|
+
|
|
25189
|
+
|
|
25190
|
+
|
|
25191
|
+
|
|
25192
|
+
|
|
25193
|
+
|
|
25194
|
+
|
|
23708
25195
|
|
|
23709
25196
|
|
|
23710
25197
|
|
|
@@ -23878,6 +25365,18 @@ var TreeMap = class _TreeMap {
|
|
|
23878
25365
|
|
|
23879
25366
|
|
|
23880
25367
|
|
|
25368
|
+
|
|
25369
|
+
|
|
25370
|
+
|
|
25371
|
+
|
|
25372
|
+
|
|
25373
|
+
|
|
25374
|
+
|
|
25375
|
+
|
|
25376
|
+
|
|
25377
|
+
|
|
25378
|
+
|
|
25379
|
+
|
|
23881
25380
|
|
|
23882
25381
|
|
|
23883
25382
|
|
|
@@ -24051,6 +25550,18 @@ var TreeMap = class _TreeMap {
|
|
|
24051
25550
|
|
|
24052
25551
|
|
|
24053
25552
|
|
|
25553
|
+
|
|
25554
|
+
|
|
25555
|
+
|
|
25556
|
+
|
|
25557
|
+
|
|
25558
|
+
|
|
25559
|
+
|
|
25560
|
+
|
|
25561
|
+
|
|
25562
|
+
|
|
25563
|
+
|
|
25564
|
+
|
|
24054
25565
|
|
|
24055
25566
|
|
|
24056
25567
|
|
|
@@ -24225,6 +25736,18 @@ var TreeMap = class _TreeMap {
|
|
|
24225
25736
|
|
|
24226
25737
|
|
|
24227
25738
|
|
|
25739
|
+
|
|
25740
|
+
|
|
25741
|
+
|
|
25742
|
+
|
|
25743
|
+
|
|
25744
|
+
|
|
25745
|
+
|
|
25746
|
+
|
|
25747
|
+
|
|
25748
|
+
|
|
25749
|
+
|
|
25750
|
+
|
|
24228
25751
|
|
|
24229
25752
|
|
|
24230
25753
|
|
|
@@ -24336,6 +25859,12 @@ var TreeMap = class _TreeMap {
|
|
|
24336
25859
|
|
|
24337
25860
|
|
|
24338
25861
|
|
|
25862
|
+
|
|
25863
|
+
|
|
25864
|
+
|
|
25865
|
+
|
|
25866
|
+
|
|
25867
|
+
|
|
24339
25868
|
* @example
|
|
24340
25869
|
* // Pagination by position in tree order
|
|
24341
25870
|
* const tree = new TreeMap<number>(
|
|
@@ -24521,6 +26050,21 @@ var TreeMap = class _TreeMap {
|
|
|
24521
26050
|
|
|
24522
26051
|
|
|
24523
26052
|
|
|
26053
|
+
|
|
26054
|
+
|
|
26055
|
+
|
|
26056
|
+
|
|
26057
|
+
|
|
26058
|
+
|
|
26059
|
+
|
|
26060
|
+
|
|
26061
|
+
|
|
26062
|
+
|
|
26063
|
+
|
|
26064
|
+
|
|
26065
|
+
|
|
26066
|
+
|
|
26067
|
+
|
|
24524
26068
|
|
|
24525
26069
|
|
|
24526
26070
|
|
|
@@ -24644,6 +26188,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
24644
26188
|
|
|
24645
26189
|
|
|
24646
26190
|
|
|
26191
|
+
|
|
26192
|
+
|
|
26193
|
+
|
|
24647
26194
|
|
|
24648
26195
|
|
|
24649
26196
|
|
|
@@ -24823,6 +26370,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
24823
26370
|
|
|
24824
26371
|
|
|
24825
26372
|
|
|
26373
|
+
|
|
26374
|
+
|
|
26375
|
+
|
|
26376
|
+
|
|
26377
|
+
|
|
26378
|
+
|
|
26379
|
+
|
|
26380
|
+
|
|
26381
|
+
|
|
26382
|
+
|
|
26383
|
+
|
|
26384
|
+
|
|
26385
|
+
|
|
26386
|
+
|
|
26387
|
+
|
|
24826
26388
|
|
|
24827
26389
|
|
|
24828
26390
|
|
|
@@ -25014,6 +26576,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25014
26576
|
|
|
25015
26577
|
|
|
25016
26578
|
|
|
26579
|
+
|
|
26580
|
+
|
|
26581
|
+
|
|
26582
|
+
|
|
26583
|
+
|
|
26584
|
+
|
|
26585
|
+
|
|
26586
|
+
|
|
26587
|
+
|
|
26588
|
+
|
|
26589
|
+
|
|
26590
|
+
|
|
26591
|
+
|
|
26592
|
+
|
|
26593
|
+
|
|
25017
26594
|
|
|
25018
26595
|
|
|
25019
26596
|
|
|
@@ -25070,6 +26647,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25070
26647
|
|
|
25071
26648
|
|
|
25072
26649
|
|
|
26650
|
+
|
|
26651
|
+
|
|
26652
|
+
|
|
25073
26653
|
|
|
25074
26654
|
|
|
25075
26655
|
|
|
@@ -25244,6 +26824,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25244
26824
|
|
|
25245
26825
|
|
|
25246
26826
|
|
|
26827
|
+
|
|
26828
|
+
|
|
26829
|
+
|
|
26830
|
+
|
|
26831
|
+
|
|
26832
|
+
|
|
26833
|
+
|
|
26834
|
+
|
|
26835
|
+
|
|
26836
|
+
|
|
26837
|
+
|
|
26838
|
+
|
|
26839
|
+
|
|
26840
|
+
|
|
26841
|
+
|
|
25247
26842
|
|
|
25248
26843
|
|
|
25249
26844
|
|
|
@@ -25309,6 +26904,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25309
26904
|
|
|
25310
26905
|
|
|
25311
26906
|
|
|
26907
|
+
|
|
26908
|
+
|
|
26909
|
+
|
|
25312
26910
|
|
|
25313
26911
|
|
|
25314
26912
|
|
|
@@ -25501,6 +27099,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25501
27099
|
|
|
25502
27100
|
|
|
25503
27101
|
|
|
27102
|
+
|
|
27103
|
+
|
|
27104
|
+
|
|
27105
|
+
|
|
27106
|
+
|
|
27107
|
+
|
|
27108
|
+
|
|
27109
|
+
|
|
27110
|
+
|
|
27111
|
+
|
|
27112
|
+
|
|
27113
|
+
|
|
27114
|
+
|
|
27115
|
+
|
|
27116
|
+
|
|
25504
27117
|
|
|
25505
27118
|
|
|
25506
27119
|
|
|
@@ -25567,6 +27180,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25567
27180
|
|
|
25568
27181
|
|
|
25569
27182
|
|
|
27183
|
+
|
|
27184
|
+
|
|
27185
|
+
|
|
25570
27186
|
|
|
25571
27187
|
|
|
25572
27188
|
|
|
@@ -25615,6 +27231,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25615
27231
|
|
|
25616
27232
|
|
|
25617
27233
|
|
|
27234
|
+
|
|
27235
|
+
|
|
27236
|
+
|
|
25618
27237
|
|
|
25619
27238
|
|
|
25620
27239
|
|
|
@@ -25794,6 +27413,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25794
27413
|
|
|
25795
27414
|
|
|
25796
27415
|
|
|
27416
|
+
|
|
27417
|
+
|
|
27418
|
+
|
|
27419
|
+
|
|
27420
|
+
|
|
27421
|
+
|
|
27422
|
+
|
|
27423
|
+
|
|
27424
|
+
|
|
27425
|
+
|
|
27426
|
+
|
|
27427
|
+
|
|
27428
|
+
|
|
27429
|
+
|
|
27430
|
+
|
|
25797
27431
|
|
|
25798
27432
|
|
|
25799
27433
|
|
|
@@ -25830,6 +27464,46 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25830
27464
|
for (let i = 0; i < c; i++) yield k;
|
|
25831
27465
|
}
|
|
25832
27466
|
}
|
|
27467
|
+
/**
|
|
27468
|
+
* Iterate over all elements with multiplicity (Set-compatible, alias for `[Symbol.iterator]`).
|
|
27469
|
+
* @remarks Each key is yielded `count(key)` times. Time O(size), Space O(1) per step.
|
|
27470
|
+
|
|
27471
|
+
|
|
27472
|
+
|
|
27473
|
+
|
|
27474
|
+
|
|
27475
|
+
|
|
27476
|
+
|
|
27477
|
+
|
|
27478
|
+
* @example
|
|
27479
|
+
* // Iterate with multiplicity
|
|
27480
|
+
* const ms = new TreeMultiSet<number>();
|
|
27481
|
+
* ms.add(1); ms.add(1); ms.add(2); ms.add(3); ms.add(3); ms.add(3);
|
|
27482
|
+
* console.log([...ms.keys()]); // [1, 1, 2, 3, 3, 3];
|
|
27483
|
+
*/
|
|
27484
|
+
*keys() {
|
|
27485
|
+
yield* this;
|
|
27486
|
+
}
|
|
27487
|
+
/**
|
|
27488
|
+
* Iterate over all elements with multiplicity (Set-compatible, alias for `[Symbol.iterator]`).
|
|
27489
|
+
* @remarks Each key is yielded `count(key)` times. Time O(size), Space O(1) per step.
|
|
27490
|
+
|
|
27491
|
+
|
|
27492
|
+
|
|
27493
|
+
|
|
27494
|
+
|
|
27495
|
+
|
|
27496
|
+
|
|
27497
|
+
|
|
27498
|
+
* @example
|
|
27499
|
+
* // Iterate with multiplicity
|
|
27500
|
+
* const ms = new TreeMultiSet<number>();
|
|
27501
|
+
* ms.add(5); ms.add(5); ms.add(10);
|
|
27502
|
+
* console.log([...ms.values()]); // [5, 5, 10];
|
|
27503
|
+
*/
|
|
27504
|
+
*values() {
|
|
27505
|
+
yield* this;
|
|
27506
|
+
}
|
|
25833
27507
|
/**
|
|
25834
27508
|
* Returns an array with all elements (expanded).
|
|
25835
27509
|
* @remarks Time O(size), Space O(size)
|
|
@@ -25995,6 +27669,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
25995
27669
|
|
|
25996
27670
|
|
|
25997
27671
|
|
|
27672
|
+
|
|
27673
|
+
|
|
27674
|
+
|
|
27675
|
+
|
|
27676
|
+
|
|
27677
|
+
|
|
27678
|
+
|
|
27679
|
+
|
|
27680
|
+
|
|
27681
|
+
|
|
27682
|
+
|
|
27683
|
+
|
|
27684
|
+
|
|
27685
|
+
|
|
27686
|
+
|
|
25998
27687
|
|
|
25999
27688
|
|
|
26000
27689
|
|
|
@@ -26050,6 +27739,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26050
27739
|
|
|
26051
27740
|
|
|
26052
27741
|
|
|
27742
|
+
|
|
27743
|
+
|
|
27744
|
+
|
|
26053
27745
|
|
|
26054
27746
|
|
|
26055
27747
|
|
|
@@ -26093,6 +27785,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26093
27785
|
|
|
26094
27786
|
|
|
26095
27787
|
|
|
27788
|
+
|
|
27789
|
+
|
|
27790
|
+
|
|
26096
27791
|
|
|
26097
27792
|
|
|
26098
27793
|
|
|
@@ -26281,6 +27976,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26281
27976
|
|
|
26282
27977
|
|
|
26283
27978
|
|
|
27979
|
+
|
|
27980
|
+
|
|
27981
|
+
|
|
27982
|
+
|
|
27983
|
+
|
|
27984
|
+
|
|
27985
|
+
|
|
27986
|
+
|
|
27987
|
+
|
|
27988
|
+
|
|
27989
|
+
|
|
27990
|
+
|
|
27991
|
+
|
|
27992
|
+
|
|
27993
|
+
|
|
26284
27994
|
|
|
26285
27995
|
|
|
26286
27996
|
|
|
@@ -26339,6 +28049,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26339
28049
|
|
|
26340
28050
|
|
|
26341
28051
|
|
|
28052
|
+
|
|
28053
|
+
|
|
28054
|
+
|
|
26342
28055
|
|
|
26343
28056
|
|
|
26344
28057
|
|
|
@@ -26383,6 +28096,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26383
28096
|
|
|
26384
28097
|
|
|
26385
28098
|
|
|
28099
|
+
|
|
28100
|
+
|
|
28101
|
+
|
|
26386
28102
|
|
|
26387
28103
|
|
|
26388
28104
|
|
|
@@ -26427,6 +28143,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26427
28143
|
|
|
26428
28144
|
|
|
26429
28145
|
|
|
28146
|
+
|
|
28147
|
+
|
|
28148
|
+
|
|
26430
28149
|
|
|
26431
28150
|
|
|
26432
28151
|
|
|
@@ -26475,6 +28194,9 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26475
28194
|
|
|
26476
28195
|
|
|
26477
28196
|
|
|
28197
|
+
|
|
28198
|
+
|
|
28199
|
+
|
|
26478
28200
|
|
|
26479
28201
|
|
|
26480
28202
|
|
|
@@ -26624,6 +28346,18 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26624
28346
|
|
|
26625
28347
|
|
|
26626
28348
|
|
|
28349
|
+
|
|
28350
|
+
|
|
28351
|
+
|
|
28352
|
+
|
|
28353
|
+
|
|
28354
|
+
|
|
28355
|
+
|
|
28356
|
+
|
|
28357
|
+
|
|
28358
|
+
|
|
28359
|
+
|
|
28360
|
+
|
|
26627
28361
|
|
|
26628
28362
|
|
|
26629
28363
|
|
|
@@ -26781,6 +28515,18 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26781
28515
|
|
|
26782
28516
|
|
|
26783
28517
|
|
|
28518
|
+
|
|
28519
|
+
|
|
28520
|
+
|
|
28521
|
+
|
|
28522
|
+
|
|
28523
|
+
|
|
28524
|
+
|
|
28525
|
+
|
|
28526
|
+
|
|
28527
|
+
|
|
28528
|
+
|
|
28529
|
+
|
|
26784
28530
|
|
|
26785
28531
|
|
|
26786
28532
|
|
|
@@ -26938,6 +28684,18 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
26938
28684
|
|
|
26939
28685
|
|
|
26940
28686
|
|
|
28687
|
+
|
|
28688
|
+
|
|
28689
|
+
|
|
28690
|
+
|
|
28691
|
+
|
|
28692
|
+
|
|
28693
|
+
|
|
28694
|
+
|
|
28695
|
+
|
|
28696
|
+
|
|
28697
|
+
|
|
28698
|
+
|
|
26941
28699
|
|
|
26942
28700
|
|
|
26943
28701
|
|
|
@@ -27094,6 +28852,18 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
27094
28852
|
|
|
27095
28853
|
|
|
27096
28854
|
|
|
28855
|
+
|
|
28856
|
+
|
|
28857
|
+
|
|
28858
|
+
|
|
28859
|
+
|
|
28860
|
+
|
|
28861
|
+
|
|
28862
|
+
|
|
28863
|
+
|
|
28864
|
+
|
|
28865
|
+
|
|
28866
|
+
|
|
27097
28867
|
|
|
27098
28868
|
|
|
27099
28869
|
|
|
@@ -27285,6 +29055,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
27285
29055
|
|
|
27286
29056
|
|
|
27287
29057
|
|
|
29058
|
+
|
|
29059
|
+
|
|
29060
|
+
|
|
29061
|
+
|
|
29062
|
+
|
|
29063
|
+
|
|
29064
|
+
|
|
29065
|
+
|
|
29066
|
+
|
|
29067
|
+
|
|
29068
|
+
|
|
29069
|
+
|
|
29070
|
+
|
|
29071
|
+
|
|
29072
|
+
|
|
27288
29073
|
|
|
27289
29074
|
|
|
27290
29075
|
|
|
@@ -27481,6 +29266,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
27481
29266
|
|
|
27482
29267
|
|
|
27483
29268
|
|
|
29269
|
+
|
|
29270
|
+
|
|
29271
|
+
|
|
29272
|
+
|
|
29273
|
+
|
|
29274
|
+
|
|
29275
|
+
|
|
29276
|
+
|
|
29277
|
+
|
|
29278
|
+
|
|
29279
|
+
|
|
29280
|
+
|
|
29281
|
+
|
|
29282
|
+
|
|
29283
|
+
|
|
27484
29284
|
|
|
27485
29285
|
|
|
27486
29286
|
|
|
@@ -27684,6 +29484,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
27684
29484
|
|
|
27685
29485
|
|
|
27686
29486
|
|
|
29487
|
+
|
|
29488
|
+
|
|
29489
|
+
|
|
29490
|
+
|
|
29491
|
+
|
|
29492
|
+
|
|
29493
|
+
|
|
29494
|
+
|
|
29495
|
+
|
|
29496
|
+
|
|
29497
|
+
|
|
29498
|
+
|
|
29499
|
+
|
|
29500
|
+
|
|
29501
|
+
|
|
27687
29502
|
|
|
27688
29503
|
|
|
27689
29504
|
|
|
@@ -27882,6 +29697,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
27882
29697
|
|
|
27883
29698
|
|
|
27884
29699
|
|
|
29700
|
+
|
|
29701
|
+
|
|
29702
|
+
|
|
29703
|
+
|
|
29704
|
+
|
|
29705
|
+
|
|
29706
|
+
|
|
29707
|
+
|
|
29708
|
+
|
|
29709
|
+
|
|
29710
|
+
|
|
29711
|
+
|
|
29712
|
+
|
|
29713
|
+
|
|
29714
|
+
|
|
27885
29715
|
|
|
27886
29716
|
|
|
27887
29717
|
|
|
@@ -28115,6 +29945,12 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
28115
29945
|
|
|
28116
29946
|
|
|
28117
29947
|
|
|
29948
|
+
|
|
29949
|
+
|
|
29950
|
+
|
|
29951
|
+
|
|
29952
|
+
|
|
29953
|
+
|
|
28118
29954
|
* @example
|
|
28119
29955
|
* // Pagination by position in tree order
|
|
28120
29956
|
* const tree = new TreeMultiSet<number>(
|
|
@@ -28153,6 +29989,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
28153
29989
|
|
|
28154
29990
|
|
|
28155
29991
|
|
|
29992
|
+
|
|
29993
|
+
|
|
29994
|
+
|
|
29995
|
+
|
|
29996
|
+
|
|
29997
|
+
|
|
29998
|
+
|
|
29999
|
+
|
|
30000
|
+
|
|
30001
|
+
|
|
30002
|
+
|
|
30003
|
+
|
|
30004
|
+
|
|
30005
|
+
|
|
30006
|
+
|
|
28156
30007
|
|
|
28157
30008
|
|
|
28158
30009
|
|
|
@@ -28310,6 +30161,18 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
28310
30161
|
|
|
28311
30162
|
|
|
28312
30163
|
|
|
30164
|
+
|
|
30165
|
+
|
|
30166
|
+
|
|
30167
|
+
|
|
30168
|
+
|
|
30169
|
+
|
|
30170
|
+
|
|
30171
|
+
|
|
30172
|
+
|
|
30173
|
+
|
|
30174
|
+
|
|
30175
|
+
|
|
28313
30176
|
|
|
28314
30177
|
|
|
28315
30178
|
|
|
@@ -28502,6 +30365,21 @@ var TreeMultiSet = class _TreeMultiSet {
|
|
|
28502
30365
|
|
|
28503
30366
|
|
|
28504
30367
|
|
|
30368
|
+
|
|
30369
|
+
|
|
30370
|
+
|
|
30371
|
+
|
|
30372
|
+
|
|
30373
|
+
|
|
30374
|
+
|
|
30375
|
+
|
|
30376
|
+
|
|
30377
|
+
|
|
30378
|
+
|
|
30379
|
+
|
|
30380
|
+
|
|
30381
|
+
|
|
30382
|
+
|
|
28505
30383
|
|
|
28506
30384
|
|
|
28507
30385
|
|