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
|
@@ -266,6 +266,35 @@ var _IterableElementBase = class _IterableElementBase {
|
|
|
266
266
|
for (const ele of this) if (ele === element) return true;
|
|
267
267
|
return false;
|
|
268
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Check whether a value exists (Array-compatible alias for `has`).
|
|
271
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1).
|
|
272
|
+
* @param element - Element to search for (uses `===`).
|
|
273
|
+
* @returns `true` if found.
|
|
274
|
+
*/
|
|
275
|
+
includes(element) {
|
|
276
|
+
return this.has(element);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Return an iterator of `[index, value]` pairs (Array-compatible).
|
|
280
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1) per step.
|
|
281
|
+
*/
|
|
282
|
+
*entries() {
|
|
283
|
+
let index = 0;
|
|
284
|
+
for (const value of this) {
|
|
285
|
+
yield [index++, value];
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Return an iterator of numeric indices (Array-compatible).
|
|
290
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1) per step.
|
|
291
|
+
*/
|
|
292
|
+
*keys() {
|
|
293
|
+
let index = 0;
|
|
294
|
+
for (const _ of this) {
|
|
295
|
+
yield index++;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
269
298
|
/**
|
|
270
299
|
* Reduces all elements to a single accumulated value.
|
|
271
300
|
*
|
|
@@ -527,6 +556,16 @@ var _LinearBase = class _LinearBase extends IterableElementBase {
|
|
|
527
556
|
}
|
|
528
557
|
return this;
|
|
529
558
|
}
|
|
559
|
+
/**
|
|
560
|
+
* Return a new instance of the same type with elements in reverse order (non-mutating).
|
|
561
|
+
* @remarks Provided for familiarity when migrating from Array (ES2023 `toReversed`). Time O(n), Space O(n).
|
|
562
|
+
* @returns A new reversed instance.
|
|
563
|
+
*/
|
|
564
|
+
toReversed() {
|
|
565
|
+
const cloned = this.clone();
|
|
566
|
+
cloned.reverse();
|
|
567
|
+
return cloned;
|
|
568
|
+
}
|
|
530
569
|
};
|
|
531
570
|
__name(_LinearBase, "LinearBase");
|
|
532
571
|
var LinearBase = _LinearBase;
|
|
@@ -804,6 +843,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
804
843
|
|
|
805
844
|
|
|
806
845
|
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
807
849
|
|
|
808
850
|
|
|
809
851
|
|
|
@@ -858,6 +900,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
858
900
|
|
|
859
901
|
|
|
860
902
|
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
861
906
|
|
|
862
907
|
|
|
863
908
|
|
|
@@ -936,6 +981,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
936
981
|
|
|
937
982
|
|
|
938
983
|
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
|
|
939
987
|
|
|
940
988
|
|
|
941
989
|
|
|
@@ -1002,6 +1050,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1002
1050
|
|
|
1003
1051
|
|
|
1004
1052
|
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1005
1056
|
|
|
1006
1057
|
|
|
1007
1058
|
|
|
@@ -1075,6 +1126,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1075
1126
|
|
|
1076
1127
|
|
|
1077
1128
|
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
|
|
1078
1132
|
|
|
1079
1133
|
|
|
1080
1134
|
|
|
@@ -1138,6 +1192,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1138
1192
|
|
|
1139
1193
|
|
|
1140
1194
|
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1141
1198
|
|
|
1142
1199
|
|
|
1143
1200
|
|
|
@@ -1194,6 +1251,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1194
1251
|
|
|
1195
1252
|
|
|
1196
1253
|
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1197
1257
|
|
|
1198
1258
|
|
|
1199
1259
|
|
|
@@ -1306,6 +1366,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1306
1366
|
|
|
1307
1367
|
|
|
1308
1368
|
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
|
|
1309
1372
|
|
|
1310
1373
|
|
|
1311
1374
|
|
|
@@ -1356,6 +1419,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1356
1419
|
|
|
1357
1420
|
|
|
1358
1421
|
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1359
1425
|
|
|
1360
1426
|
|
|
1361
1427
|
|
|
@@ -1429,6 +1495,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1429
1495
|
|
|
1430
1496
|
|
|
1431
1497
|
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
|
|
1432
1501
|
|
|
1433
1502
|
|
|
1434
1503
|
|
|
@@ -1486,6 +1555,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1486
1555
|
|
|
1487
1556
|
|
|
1488
1557
|
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
|
|
1489
1561
|
|
|
1490
1562
|
|
|
1491
1563
|
|
|
@@ -1547,6 +1619,9 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1547
1619
|
|
|
1548
1620
|
|
|
1549
1621
|
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
|
|
1550
1625
|
|
|
1551
1626
|
|
|
1552
1627
|
|
|
@@ -2059,6 +2134,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2059
2134
|
|
|
2060
2135
|
|
|
2061
2136
|
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
|
|
2062
2140
|
|
|
2063
2141
|
|
|
2064
2142
|
|
|
@@ -2117,6 +2195,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2117
2195
|
|
|
2118
2196
|
|
|
2119
2197
|
|
|
2198
|
+
|
|
2199
|
+
|
|
2200
|
+
|
|
2120
2201
|
|
|
2121
2202
|
|
|
2122
2203
|
|
|
@@ -2227,6 +2308,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2227
2308
|
|
|
2228
2309
|
|
|
2229
2310
|
|
|
2311
|
+
|
|
2312
|
+
|
|
2313
|
+
|
|
2230
2314
|
|
|
2231
2315
|
|
|
2232
2316
|
|
|
@@ -2273,6 +2357,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2273
2357
|
|
|
2274
2358
|
|
|
2275
2359
|
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2276
2363
|
|
|
2277
2364
|
|
|
2278
2365
|
|
|
@@ -2340,6 +2427,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2340
2427
|
|
|
2341
2428
|
|
|
2342
2429
|
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
|
|
2343
2433
|
|
|
2344
2434
|
|
|
2345
2435
|
|
|
@@ -2446,6 +2536,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2446
2536
|
|
|
2447
2537
|
|
|
2448
2538
|
|
|
2539
|
+
|
|
2540
|
+
|
|
2541
|
+
|
|
2449
2542
|
|
|
2450
2543
|
|
|
2451
2544
|
|
|
@@ -2550,6 +2643,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2550
2643
|
|
|
2551
2644
|
|
|
2552
2645
|
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
|
|
2553
2649
|
|
|
2554
2650
|
|
|
2555
2651
|
|
|
@@ -2612,6 +2708,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2612
2708
|
|
|
2613
2709
|
|
|
2614
2710
|
|
|
2711
|
+
|
|
2712
|
+
|
|
2713
|
+
|
|
2615
2714
|
|
|
2616
2715
|
|
|
2617
2716
|
|
|
@@ -2677,6 +2776,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2677
2776
|
|
|
2678
2777
|
|
|
2679
2778
|
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
|
|
2680
2782
|
|
|
2681
2783
|
|
|
2682
2784
|
|
|
@@ -2729,6 +2831,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2729
2831
|
|
|
2730
2832
|
|
|
2731
2833
|
|
|
2834
|
+
|
|
2835
|
+
|
|
2836
|
+
|
|
2732
2837
|
|
|
2733
2838
|
|
|
2734
2839
|
|
|
@@ -2790,6 +2895,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2790
2895
|
|
|
2791
2896
|
|
|
2792
2897
|
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
|
|
2793
2901
|
|
|
2794
2902
|
|
|
2795
2903
|
|
|
@@ -2878,6 +2986,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2878
2986
|
|
|
2879
2987
|
|
|
2880
2988
|
|
|
2989
|
+
|
|
2990
|
+
|
|
2991
|
+
|
|
2881
2992
|
|
|
2882
2993
|
|
|
2883
2994
|
|
|
@@ -2943,6 +3054,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2943
3054
|
|
|
2944
3055
|
|
|
2945
3056
|
|
|
3057
|
+
|
|
3058
|
+
|
|
3059
|
+
|
|
2946
3060
|
|
|
2947
3061
|
|
|
2948
3062
|
|
|
@@ -3424,6 +3538,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3424
3538
|
|
|
3425
3539
|
|
|
3426
3540
|
|
|
3541
|
+
|
|
3542
|
+
|
|
3543
|
+
|
|
3427
3544
|
|
|
3428
3545
|
|
|
3429
3546
|
|
|
@@ -3480,6 +3597,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3480
3597
|
|
|
3481
3598
|
|
|
3482
3599
|
|
|
3600
|
+
|
|
3601
|
+
|
|
3602
|
+
|
|
3483
3603
|
|
|
3484
3604
|
|
|
3485
3605
|
|
|
@@ -3540,6 +3660,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3540
3660
|
|
|
3541
3661
|
|
|
3542
3662
|
|
|
3663
|
+
|
|
3664
|
+
|
|
3665
|
+
|
|
3543
3666
|
|
|
3544
3667
|
|
|
3545
3668
|
|
|
@@ -3625,6 +3748,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3625
3748
|
|
|
3626
3749
|
|
|
3627
3750
|
|
|
3751
|
+
|
|
3752
|
+
|
|
3753
|
+
|
|
3628
3754
|
|
|
3629
3755
|
|
|
3630
3756
|
|
|
@@ -4446,6 +4572,12 @@ var _BST = class _BST extends BinaryTree {
|
|
|
4446
4572
|
|
|
4447
4573
|
|
|
4448
4574
|
|
|
4575
|
+
|
|
4576
|
+
|
|
4577
|
+
|
|
4578
|
+
|
|
4579
|
+
|
|
4580
|
+
|
|
4449
4581
|
|
|
4450
4582
|
|
|
4451
4583
|
|
|
@@ -4793,6 +4925,15 @@ var _BST = class _BST extends BinaryTree {
|
|
|
4793
4925
|
|
|
4794
4926
|
|
|
4795
4927
|
|
|
4928
|
+
|
|
4929
|
+
|
|
4930
|
+
|
|
4931
|
+
|
|
4932
|
+
|
|
4933
|
+
|
|
4934
|
+
|
|
4935
|
+
|
|
4936
|
+
|
|
4796
4937
|
|
|
4797
4938
|
|
|
4798
4939
|
|
|
@@ -4919,6 +5060,12 @@ var _BST = class _BST extends BinaryTree {
|
|
|
4919
5060
|
|
|
4920
5061
|
|
|
4921
5062
|
|
|
5063
|
+
|
|
5064
|
+
|
|
5065
|
+
|
|
5066
|
+
|
|
5067
|
+
|
|
5068
|
+
|
|
4922
5069
|
|
|
4923
5070
|
|
|
4924
5071
|
|
|
@@ -5213,6 +5360,9 @@ var _BST = class _BST extends BinaryTree {
|
|
|
5213
5360
|
|
|
5214
5361
|
|
|
5215
5362
|
|
|
5363
|
+
|
|
5364
|
+
|
|
5365
|
+
|
|
5216
5366
|
|
|
5217
5367
|
|
|
5218
5368
|
|
|
@@ -5286,6 +5436,9 @@ var _BST = class _BST extends BinaryTree {
|
|
|
5286
5436
|
|
|
5287
5437
|
|
|
5288
5438
|
|
|
5439
|
+
|
|
5440
|
+
|
|
5441
|
+
|
|
5289
5442
|
|
|
5290
5443
|
|
|
5291
5444
|
|
|
@@ -5413,6 +5566,12 @@ var _BST = class _BST extends BinaryTree {
|
|
|
5413
5566
|
|
|
5414
5567
|
|
|
5415
5568
|
|
|
5569
|
+
|
|
5570
|
+
|
|
5571
|
+
|
|
5572
|
+
|
|
5573
|
+
|
|
5574
|
+
|
|
5416
5575
|
|
|
5417
5576
|
|
|
5418
5577
|
|
|
@@ -6115,6 +6274,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6115
6274
|
|
|
6116
6275
|
|
|
6117
6276
|
|
|
6277
|
+
|
|
6278
|
+
|
|
6279
|
+
|
|
6280
|
+
|
|
6281
|
+
|
|
6282
|
+
|
|
6118
6283
|
|
|
6119
6284
|
|
|
6120
6285
|
|
|
@@ -6199,6 +6364,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6199
6364
|
|
|
6200
6365
|
|
|
6201
6366
|
|
|
6367
|
+
|
|
6368
|
+
|
|
6369
|
+
|
|
6370
|
+
|
|
6371
|
+
|
|
6372
|
+
|
|
6202
6373
|
|
|
6203
6374
|
|
|
6204
6375
|
|
|
@@ -6283,6 +6454,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6283
6454
|
|
|
6284
6455
|
|
|
6285
6456
|
|
|
6457
|
+
|
|
6458
|
+
|
|
6459
|
+
|
|
6460
|
+
|
|
6461
|
+
|
|
6462
|
+
|
|
6286
6463
|
|
|
6287
6464
|
|
|
6288
6465
|
|
|
@@ -6367,6 +6544,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6367
6544
|
|
|
6368
6545
|
|
|
6369
6546
|
|
|
6547
|
+
|
|
6548
|
+
|
|
6549
|
+
|
|
6550
|
+
|
|
6551
|
+
|
|
6552
|
+
|
|
6370
6553
|
|
|
6371
6554
|
|
|
6372
6555
|
|
|
@@ -6449,6 +6632,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6449
6632
|
|
|
6450
6633
|
|
|
6451
6634
|
|
|
6635
|
+
|
|
6636
|
+
|
|
6637
|
+
|
|
6638
|
+
|
|
6639
|
+
|
|
6640
|
+
|
|
6452
6641
|
|
|
6453
6642
|
|
|
6454
6643
|
|
|
@@ -6538,6 +6727,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6538
6727
|
|
|
6539
6728
|
|
|
6540
6729
|
|
|
6730
|
+
|
|
6731
|
+
|
|
6732
|
+
|
|
6733
|
+
|
|
6734
|
+
|
|
6735
|
+
|
|
6541
6736
|
|
|
6542
6737
|
|
|
6543
6738
|
|
|
@@ -6595,6 +6790,9 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6595
6790
|
|
|
6596
6791
|
|
|
6597
6792
|
|
|
6793
|
+
|
|
6794
|
+
|
|
6795
|
+
|
|
6598
6796
|
|
|
6599
6797
|
|
|
6600
6798
|
|
|
@@ -6660,6 +6858,9 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6660
6858
|
|
|
6661
6859
|
|
|
6662
6860
|
|
|
6861
|
+
|
|
6862
|
+
|
|
6863
|
+
|
|
6663
6864
|
|
|
6664
6865
|
|
|
6665
6866
|
|
|
@@ -6827,6 +7028,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
6827
7028
|
|
|
6828
7029
|
|
|
6829
7030
|
|
|
7031
|
+
|
|
7032
|
+
|
|
7033
|
+
|
|
6830
7034
|
|
|
6831
7035
|
|
|
6832
7036
|
|
|
@@ -6903,6 +7107,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
6903
7107
|
|
|
6904
7108
|
|
|
6905
7109
|
|
|
7110
|
+
|
|
7111
|
+
|
|
7112
|
+
|
|
6906
7113
|
|
|
6907
7114
|
|
|
6908
7115
|
|
|
@@ -6973,6 +7180,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
6973
7180
|
|
|
6974
7181
|
|
|
6975
7182
|
|
|
7183
|
+
|
|
7184
|
+
|
|
7185
|
+
|
|
6976
7186
|
|
|
6977
7187
|
|
|
6978
7188
|
|
|
@@ -7050,6 +7260,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
7050
7260
|
|
|
7051
7261
|
|
|
7052
7262
|
|
|
7263
|
+
|
|
7264
|
+
|
|
7265
|
+
|
|
7053
7266
|
|
|
7054
7267
|
|
|
7055
7268
|
|
|
@@ -7105,6 +7318,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
7105
7318
|
|
|
7106
7319
|
|
|
7107
7320
|
|
|
7321
|
+
|
|
7322
|
+
|
|
7323
|
+
|
|
7108
7324
|
|
|
7109
7325
|
|
|
7110
7326
|
|
|
@@ -7186,6 +7402,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
7186
7402
|
|
|
7187
7403
|
|
|
7188
7404
|
|
|
7405
|
+
|
|
7406
|
+
|
|
7407
|
+
|
|
7189
7408
|
|
|
7190
7409
|
|
|
7191
7410
|
|
|
@@ -7588,6 +7807,18 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7588
7807
|
|
|
7589
7808
|
|
|
7590
7809
|
|
|
7810
|
+
|
|
7811
|
+
|
|
7812
|
+
|
|
7813
|
+
|
|
7814
|
+
|
|
7815
|
+
|
|
7816
|
+
|
|
7817
|
+
|
|
7818
|
+
|
|
7819
|
+
|
|
7820
|
+
|
|
7821
|
+
|
|
7591
7822
|
|
|
7592
7823
|
|
|
7593
7824
|
|
|
@@ -7727,6 +7958,15 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7727
7958
|
|
|
7728
7959
|
|
|
7729
7960
|
|
|
7961
|
+
|
|
7962
|
+
|
|
7963
|
+
|
|
7964
|
+
|
|
7965
|
+
|
|
7966
|
+
|
|
7967
|
+
|
|
7968
|
+
|
|
7969
|
+
|
|
7730
7970
|
|
|
7731
7971
|
|
|
7732
7972
|
|
|
@@ -7821,6 +8061,12 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7821
8061
|
|
|
7822
8062
|
|
|
7823
8063
|
|
|
8064
|
+
|
|
8065
|
+
|
|
8066
|
+
|
|
8067
|
+
|
|
8068
|
+
|
|
8069
|
+
|
|
7824
8070
|
|
|
7825
8071
|
|
|
7826
8072
|
|
|
@@ -7966,6 +8212,15 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7966
8212
|
|
|
7967
8213
|
|
|
7968
8214
|
|
|
8215
|
+
|
|
8216
|
+
|
|
8217
|
+
|
|
8218
|
+
|
|
8219
|
+
|
|
8220
|
+
|
|
8221
|
+
|
|
8222
|
+
|
|
8223
|
+
|
|
7969
8224
|
|
|
7970
8225
|
|
|
7971
8226
|
|
|
@@ -8599,6 +8854,18 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
8599
8854
|
|
|
8600
8855
|
|
|
8601
8856
|
|
|
8857
|
+
|
|
8858
|
+
|
|
8859
|
+
|
|
8860
|
+
|
|
8861
|
+
|
|
8862
|
+
|
|
8863
|
+
|
|
8864
|
+
|
|
8865
|
+
|
|
8866
|
+
|
|
8867
|
+
|
|
8868
|
+
|
|
8602
8869
|
|
|
8603
8870
|
|
|
8604
8871
|
|
|
@@ -9106,16 +9373,28 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9106
9373
|
|
|
9107
9374
|
|
|
9108
9375
|
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9376
|
+
|
|
9377
|
+
|
|
9378
|
+
|
|
9379
|
+
|
|
9380
|
+
|
|
9381
|
+
|
|
9382
|
+
|
|
9383
|
+
|
|
9384
|
+
|
|
9385
|
+
|
|
9386
|
+
|
|
9387
|
+
|
|
9388
|
+
* @example
|
|
9389
|
+
* // basic Red-Black Tree with simple number keys
|
|
9390
|
+
* // Create a simple Red-Black Tree with numeric keys
|
|
9391
|
+
* const tree = new RedBlackTree([5, 2, 8, 1, 9]);
|
|
9392
|
+
*
|
|
9393
|
+
* tree.print();
|
|
9394
|
+
* // _2___
|
|
9395
|
+
* // / \
|
|
9396
|
+
* // 1 _8_
|
|
9397
|
+
* // / \
|
|
9119
9398
|
* // 5 9
|
|
9120
9399
|
*
|
|
9121
9400
|
* // Verify the tree maintains sorted order
|
|
@@ -9308,6 +9587,18 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9308
9587
|
|
|
9309
9588
|
|
|
9310
9589
|
|
|
9590
|
+
|
|
9591
|
+
|
|
9592
|
+
|
|
9593
|
+
|
|
9594
|
+
|
|
9595
|
+
|
|
9596
|
+
|
|
9597
|
+
|
|
9598
|
+
|
|
9599
|
+
|
|
9600
|
+
|
|
9601
|
+
|
|
9311
9602
|
|
|
9312
9603
|
|
|
9313
9604
|
|
|
@@ -9507,6 +9798,15 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9507
9798
|
|
|
9508
9799
|
|
|
9509
9800
|
|
|
9801
|
+
|
|
9802
|
+
|
|
9803
|
+
|
|
9804
|
+
|
|
9805
|
+
|
|
9806
|
+
|
|
9807
|
+
|
|
9808
|
+
|
|
9809
|
+
|
|
9510
9810
|
|
|
9511
9811
|
|
|
9512
9812
|
|
|
@@ -9672,6 +9972,18 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9672
9972
|
|
|
9673
9973
|
|
|
9674
9974
|
|
|
9975
|
+
|
|
9976
|
+
|
|
9977
|
+
|
|
9978
|
+
|
|
9979
|
+
|
|
9980
|
+
|
|
9981
|
+
|
|
9982
|
+
|
|
9983
|
+
|
|
9984
|
+
|
|
9985
|
+
|
|
9986
|
+
|
|
9675
9987
|
|
|
9676
9988
|
|
|
9677
9989
|
|
|
@@ -10208,6 +10520,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10208
10520
|
|
|
10209
10521
|
|
|
10210
10522
|
|
|
10523
|
+
|
|
10524
|
+
|
|
10525
|
+
|
|
10526
|
+
|
|
10527
|
+
|
|
10528
|
+
|
|
10529
|
+
|
|
10530
|
+
|
|
10531
|
+
|
|
10532
|
+
|
|
10533
|
+
|
|
10534
|
+
|
|
10535
|
+
|
|
10536
|
+
|
|
10537
|
+
|
|
10211
10538
|
|
|
10212
10539
|
|
|
10213
10540
|
|
|
@@ -10412,6 +10739,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10412
10739
|
|
|
10413
10740
|
|
|
10414
10741
|
|
|
10742
|
+
|
|
10743
|
+
|
|
10744
|
+
|
|
10745
|
+
|
|
10746
|
+
|
|
10747
|
+
|
|
10748
|
+
|
|
10749
|
+
|
|
10750
|
+
|
|
10751
|
+
|
|
10752
|
+
|
|
10753
|
+
|
|
10754
|
+
|
|
10755
|
+
|
|
10756
|
+
|
|
10415
10757
|
|
|
10416
10758
|
|
|
10417
10759
|
|
|
@@ -10457,6 +10799,18 @@ var _TreeSet = class _TreeSet {
|
|
|
10457
10799
|
|
|
10458
10800
|
|
|
10459
10801
|
|
|
10802
|
+
|
|
10803
|
+
|
|
10804
|
+
|
|
10805
|
+
|
|
10806
|
+
|
|
10807
|
+
|
|
10808
|
+
|
|
10809
|
+
|
|
10810
|
+
|
|
10811
|
+
|
|
10812
|
+
|
|
10813
|
+
|
|
10460
10814
|
|
|
10461
10815
|
|
|
10462
10816
|
|
|
@@ -10656,6 +11010,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10656
11010
|
|
|
10657
11011
|
|
|
10658
11012
|
|
|
11013
|
+
|
|
11014
|
+
|
|
11015
|
+
|
|
11016
|
+
|
|
11017
|
+
|
|
11018
|
+
|
|
11019
|
+
|
|
11020
|
+
|
|
11021
|
+
|
|
11022
|
+
|
|
11023
|
+
|
|
11024
|
+
|
|
11025
|
+
|
|
11026
|
+
|
|
11027
|
+
|
|
10659
11028
|
|
|
10660
11029
|
|
|
10661
11030
|
|
|
@@ -10860,6 +11229,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10860
11229
|
|
|
10861
11230
|
|
|
10862
11231
|
|
|
11232
|
+
|
|
11233
|
+
|
|
11234
|
+
|
|
11235
|
+
|
|
11236
|
+
|
|
11237
|
+
|
|
11238
|
+
|
|
11239
|
+
|
|
11240
|
+
|
|
11241
|
+
|
|
11242
|
+
|
|
11243
|
+
|
|
11244
|
+
|
|
11245
|
+
|
|
11246
|
+
|
|
10863
11247
|
|
|
10864
11248
|
|
|
10865
11249
|
|
|
@@ -11069,6 +11453,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11069
11453
|
|
|
11070
11454
|
|
|
11071
11455
|
|
|
11456
|
+
|
|
11457
|
+
|
|
11458
|
+
|
|
11459
|
+
|
|
11460
|
+
|
|
11461
|
+
|
|
11462
|
+
|
|
11463
|
+
|
|
11464
|
+
|
|
11465
|
+
|
|
11466
|
+
|
|
11467
|
+
|
|
11468
|
+
|
|
11469
|
+
|
|
11470
|
+
|
|
11072
11471
|
|
|
11073
11472
|
|
|
11074
11473
|
|
|
@@ -11258,6 +11657,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11258
11657
|
|
|
11259
11658
|
|
|
11260
11659
|
|
|
11660
|
+
|
|
11661
|
+
|
|
11662
|
+
|
|
11663
|
+
|
|
11664
|
+
|
|
11665
|
+
|
|
11666
|
+
|
|
11667
|
+
|
|
11668
|
+
|
|
11669
|
+
|
|
11670
|
+
|
|
11671
|
+
|
|
11672
|
+
|
|
11673
|
+
|
|
11674
|
+
|
|
11261
11675
|
|
|
11262
11676
|
|
|
11263
11677
|
|
|
@@ -11448,6 +11862,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11448
11862
|
|
|
11449
11863
|
|
|
11450
11864
|
|
|
11865
|
+
|
|
11866
|
+
|
|
11867
|
+
|
|
11868
|
+
|
|
11869
|
+
|
|
11870
|
+
|
|
11871
|
+
|
|
11872
|
+
|
|
11873
|
+
|
|
11874
|
+
|
|
11875
|
+
|
|
11876
|
+
|
|
11877
|
+
|
|
11878
|
+
|
|
11879
|
+
|
|
11451
11880
|
|
|
11452
11881
|
|
|
11453
11882
|
|
|
@@ -11638,6 +12067,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11638
12067
|
|
|
11639
12068
|
|
|
11640
12069
|
|
|
12070
|
+
|
|
12071
|
+
|
|
12072
|
+
|
|
12073
|
+
|
|
12074
|
+
|
|
12075
|
+
|
|
12076
|
+
|
|
12077
|
+
|
|
12078
|
+
|
|
12079
|
+
|
|
12080
|
+
|
|
12081
|
+
|
|
12082
|
+
|
|
12083
|
+
|
|
12084
|
+
|
|
11641
12085
|
|
|
11642
12086
|
|
|
11643
12087
|
|
|
@@ -11831,6 +12275,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11831
12275
|
|
|
11832
12276
|
|
|
11833
12277
|
|
|
12278
|
+
|
|
12279
|
+
|
|
12280
|
+
|
|
12281
|
+
|
|
12282
|
+
|
|
12283
|
+
|
|
12284
|
+
|
|
12285
|
+
|
|
12286
|
+
|
|
12287
|
+
|
|
12288
|
+
|
|
12289
|
+
|
|
12290
|
+
|
|
12291
|
+
|
|
12292
|
+
|
|
11834
12293
|
|
|
11835
12294
|
|
|
11836
12295
|
|
|
@@ -12024,6 +12483,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12024
12483
|
|
|
12025
12484
|
|
|
12026
12485
|
|
|
12486
|
+
|
|
12487
|
+
|
|
12488
|
+
|
|
12489
|
+
|
|
12490
|
+
|
|
12491
|
+
|
|
12492
|
+
|
|
12493
|
+
|
|
12494
|
+
|
|
12495
|
+
|
|
12496
|
+
|
|
12497
|
+
|
|
12498
|
+
|
|
12499
|
+
|
|
12500
|
+
|
|
12027
12501
|
|
|
12028
12502
|
|
|
12029
12503
|
|
|
@@ -12220,6 +12694,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12220
12694
|
|
|
12221
12695
|
|
|
12222
12696
|
|
|
12697
|
+
|
|
12698
|
+
|
|
12699
|
+
|
|
12700
|
+
|
|
12701
|
+
|
|
12702
|
+
|
|
12703
|
+
|
|
12704
|
+
|
|
12705
|
+
|
|
12706
|
+
|
|
12707
|
+
|
|
12708
|
+
|
|
12709
|
+
|
|
12710
|
+
|
|
12711
|
+
|
|
12223
12712
|
|
|
12224
12713
|
|
|
12225
12714
|
|
|
@@ -12416,6 +12905,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12416
12905
|
|
|
12417
12906
|
|
|
12418
12907
|
|
|
12908
|
+
|
|
12909
|
+
|
|
12910
|
+
|
|
12911
|
+
|
|
12912
|
+
|
|
12913
|
+
|
|
12914
|
+
|
|
12915
|
+
|
|
12916
|
+
|
|
12917
|
+
|
|
12918
|
+
|
|
12919
|
+
|
|
12920
|
+
|
|
12921
|
+
|
|
12922
|
+
|
|
12419
12923
|
|
|
12420
12924
|
|
|
12421
12925
|
|
|
@@ -12623,15 +13127,30 @@ var _TreeSet = class _TreeSet {
|
|
|
12623
13127
|
|
|
12624
13128
|
|
|
12625
13129
|
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
13130
|
+
|
|
13131
|
+
|
|
13132
|
+
|
|
13133
|
+
|
|
13134
|
+
|
|
13135
|
+
|
|
13136
|
+
|
|
13137
|
+
|
|
13138
|
+
|
|
13139
|
+
|
|
13140
|
+
|
|
13141
|
+
|
|
13142
|
+
|
|
13143
|
+
|
|
13144
|
+
|
|
13145
|
+
* @example
|
|
13146
|
+
* // Test all
|
|
13147
|
+
* const ts = new TreeSet<number>([2, 4, 6]);
|
|
13148
|
+
* console.log(ts.every(k => k > 0)); // true;
|
|
13149
|
+
*/
|
|
13150
|
+
every(callbackfn, thisArg) {
|
|
13151
|
+
let index = 0;
|
|
13152
|
+
for (const v of this) {
|
|
13153
|
+
const ok = thisArg === void 0 ? callbackfn(v, index++, this) : callbackfn.call(thisArg, v, index++, this);
|
|
12635
13154
|
if (!ok) return false;
|
|
12636
13155
|
}
|
|
12637
13156
|
return true;
|
|
@@ -12799,6 +13318,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12799
13318
|
|
|
12800
13319
|
|
|
12801
13320
|
|
|
13321
|
+
|
|
13322
|
+
|
|
13323
|
+
|
|
13324
|
+
|
|
13325
|
+
|
|
13326
|
+
|
|
13327
|
+
|
|
13328
|
+
|
|
13329
|
+
|
|
13330
|
+
|
|
13331
|
+
|
|
13332
|
+
|
|
13333
|
+
|
|
13334
|
+
|
|
13335
|
+
|
|
12802
13336
|
|
|
12803
13337
|
|
|
12804
13338
|
|
|
@@ -12991,6 +13525,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12991
13525
|
|
|
12992
13526
|
|
|
12993
13527
|
|
|
13528
|
+
|
|
13529
|
+
|
|
13530
|
+
|
|
13531
|
+
|
|
13532
|
+
|
|
13533
|
+
|
|
13534
|
+
|
|
13535
|
+
|
|
13536
|
+
|
|
13537
|
+
|
|
13538
|
+
|
|
13539
|
+
|
|
13540
|
+
|
|
13541
|
+
|
|
13542
|
+
|
|
12994
13543
|
|
|
12995
13544
|
|
|
12996
13545
|
|
|
@@ -13186,6 +13735,21 @@ var _TreeSet = class _TreeSet {
|
|
|
13186
13735
|
|
|
13187
13736
|
|
|
13188
13737
|
|
|
13738
|
+
|
|
13739
|
+
|
|
13740
|
+
|
|
13741
|
+
|
|
13742
|
+
|
|
13743
|
+
|
|
13744
|
+
|
|
13745
|
+
|
|
13746
|
+
|
|
13747
|
+
|
|
13748
|
+
|
|
13749
|
+
|
|
13750
|
+
|
|
13751
|
+
|
|
13752
|
+
|
|
13189
13753
|
|
|
13190
13754
|
|
|
13191
13755
|
|
|
@@ -13375,6 +13939,21 @@ var _TreeSet = class _TreeSet {
|
|
|
13375
13939
|
|
|
13376
13940
|
|
|
13377
13941
|
|
|
13942
|
+
|
|
13943
|
+
|
|
13944
|
+
|
|
13945
|
+
|
|
13946
|
+
|
|
13947
|
+
|
|
13948
|
+
|
|
13949
|
+
|
|
13950
|
+
|
|
13951
|
+
|
|
13952
|
+
|
|
13953
|
+
|
|
13954
|
+
|
|
13955
|
+
|
|
13956
|
+
|
|
13378
13957
|
|
|
13379
13958
|
|
|
13380
13959
|
|
|
@@ -13437,6 +14016,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13437
14016
|
|
|
13438
14017
|
|
|
13439
14018
|
|
|
14019
|
+
|
|
14020
|
+
|
|
14021
|
+
|
|
13440
14022
|
|
|
13441
14023
|
|
|
13442
14024
|
|
|
@@ -13509,6 +14091,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13509
14091
|
|
|
13510
14092
|
|
|
13511
14093
|
|
|
14094
|
+
|
|
14095
|
+
|
|
14096
|
+
|
|
13512
14097
|
|
|
13513
14098
|
|
|
13514
14099
|
|
|
@@ -13559,6 +14144,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13559
14144
|
|
|
13560
14145
|
|
|
13561
14146
|
|
|
14147
|
+
|
|
14148
|
+
|
|
14149
|
+
|
|
13562
14150
|
|
|
13563
14151
|
|
|
13564
14152
|
|
|
@@ -13614,6 +14202,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13614
14202
|
|
|
13615
14203
|
|
|
13616
14204
|
|
|
14205
|
+
|
|
14206
|
+
|
|
14207
|
+
|
|
13617
14208
|
|
|
13618
14209
|
|
|
13619
14210
|
|
|
@@ -13770,6 +14361,18 @@ var _TreeSet = class _TreeSet {
|
|
|
13770
14361
|
|
|
13771
14362
|
|
|
13772
14363
|
|
|
14364
|
+
|
|
14365
|
+
|
|
14366
|
+
|
|
14367
|
+
|
|
14368
|
+
|
|
14369
|
+
|
|
14370
|
+
|
|
14371
|
+
|
|
14372
|
+
|
|
14373
|
+
|
|
14374
|
+
|
|
14375
|
+
|
|
13773
14376
|
|
|
13774
14377
|
|
|
13775
14378
|
|
|
@@ -13943,6 +14546,18 @@ var _TreeSet = class _TreeSet {
|
|
|
13943
14546
|
|
|
13944
14547
|
|
|
13945
14548
|
|
|
14549
|
+
|
|
14550
|
+
|
|
14551
|
+
|
|
14552
|
+
|
|
14553
|
+
|
|
14554
|
+
|
|
14555
|
+
|
|
14556
|
+
|
|
14557
|
+
|
|
14558
|
+
|
|
14559
|
+
|
|
14560
|
+
|
|
13946
14561
|
|
|
13947
14562
|
|
|
13948
14563
|
|
|
@@ -14108,6 +14723,18 @@ var _TreeSet = class _TreeSet {
|
|
|
14108
14723
|
|
|
14109
14724
|
|
|
14110
14725
|
|
|
14726
|
+
|
|
14727
|
+
|
|
14728
|
+
|
|
14729
|
+
|
|
14730
|
+
|
|
14731
|
+
|
|
14732
|
+
|
|
14733
|
+
|
|
14734
|
+
|
|
14735
|
+
|
|
14736
|
+
|
|
14737
|
+
|
|
14111
14738
|
|
|
14112
14739
|
|
|
14113
14740
|
|
|
@@ -14271,6 +14898,18 @@ var _TreeSet = class _TreeSet {
|
|
|
14271
14898
|
|
|
14272
14899
|
|
|
14273
14900
|
|
|
14901
|
+
|
|
14902
|
+
|
|
14903
|
+
|
|
14904
|
+
|
|
14905
|
+
|
|
14906
|
+
|
|
14907
|
+
|
|
14908
|
+
|
|
14909
|
+
|
|
14910
|
+
|
|
14911
|
+
|
|
14912
|
+
|
|
14274
14913
|
|
|
14275
14914
|
|
|
14276
14915
|
|
|
@@ -14437,6 +15076,18 @@ var _TreeSet = class _TreeSet {
|
|
|
14437
15076
|
|
|
14438
15077
|
|
|
14439
15078
|
|
|
15079
|
+
|
|
15080
|
+
|
|
15081
|
+
|
|
15082
|
+
|
|
15083
|
+
|
|
15084
|
+
|
|
15085
|
+
|
|
15086
|
+
|
|
15087
|
+
|
|
15088
|
+
|
|
15089
|
+
|
|
15090
|
+
|
|
14440
15091
|
|
|
14441
15092
|
|
|
14442
15093
|
|
|
@@ -14530,6 +15181,12 @@ var _TreeSet = class _TreeSet {
|
|
|
14530
15181
|
|
|
14531
15182
|
|
|
14532
15183
|
|
|
15184
|
+
|
|
15185
|
+
|
|
15186
|
+
|
|
15187
|
+
|
|
15188
|
+
|
|
15189
|
+
|
|
14533
15190
|
* @example
|
|
14534
15191
|
* // Pagination by position in tree order
|
|
14535
15192
|
* const tree = new TreeSet<number>(
|
|
@@ -14722,6 +15379,145 @@ var _TreeSet = class _TreeSet {
|
|
|
14722
15379
|
|
|
14723
15380
|
|
|
14724
15381
|
|
|
15382
|
+
|
|
15383
|
+
|
|
15384
|
+
|
|
15385
|
+
|
|
15386
|
+
|
|
15387
|
+
|
|
15388
|
+
|
|
15389
|
+
|
|
15390
|
+
|
|
15391
|
+
|
|
15392
|
+
|
|
15393
|
+
|
|
15394
|
+
|
|
15395
|
+
* @example
|
|
15396
|
+
* // Deep clone
|
|
15397
|
+
* const ts = new TreeSet<number>([1, 2, 3]);
|
|
15398
|
+
* const copy = ts.clone();
|
|
15399
|
+
* copy.delete(1);
|
|
15400
|
+
* console.log(ts.has(1)); // true;
|
|
15401
|
+
*/
|
|
15402
|
+
// ---- ES2025 Set-like operations ----
|
|
15403
|
+
/**
|
|
15404
|
+
* Return a new TreeSet containing all elements from both sets.
|
|
15405
|
+
* @remarks When both sets share the same comparator, uses O(n+m) merge. Otherwise O(m log n).
|
|
15406
|
+
* @param other - Any iterable of keys.
|
|
15407
|
+
* @returns A new TreeSet.
|
|
15408
|
+
* @example
|
|
15409
|
+
* // Merge two sets
|
|
15410
|
+
* console.log([...a.union(b)]); // [1, 2, 3, 4, 5, 6, 7];
|
|
15411
|
+
*/
|
|
15412
|
+
union(other) {
|
|
15413
|
+
const result = this.clone();
|
|
15414
|
+
for (const key of other) result.add(key);
|
|
15415
|
+
return result;
|
|
15416
|
+
}
|
|
15417
|
+
/**
|
|
15418
|
+
* Return a new TreeSet containing only elements present in both sets.
|
|
15419
|
+
* @remarks Time O(n+m) with ordered merge when possible, otherwise O(n log m).
|
|
15420
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15421
|
+
* @returns A new TreeSet.
|
|
15422
|
+
* @example
|
|
15423
|
+
* // Find common elements
|
|
15424
|
+
* console.log([...a.intersection(b)]); // [3, 4, 5];
|
|
15425
|
+
*/
|
|
15426
|
+
intersection(other) {
|
|
15427
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15428
|
+
const result = new _TreeSet([], { comparator: __privateGet(this, _isDefaultComparator) ? void 0 : __privateGet(this, _userComparator) });
|
|
15429
|
+
for (const key of this) {
|
|
15430
|
+
if (otherSet.has(key)) result.add(key);
|
|
15431
|
+
}
|
|
15432
|
+
return result;
|
|
15433
|
+
}
|
|
15434
|
+
/**
|
|
15435
|
+
* Return a new TreeSet containing elements in this set but not in the other.
|
|
15436
|
+
* @remarks Time O(n+m) with ordered merge when possible, otherwise O(n log m).
|
|
15437
|
+
* @param other - Any iterable of keys.
|
|
15438
|
+
* @returns A new TreeSet.
|
|
15439
|
+
* @example
|
|
15440
|
+
* // Find exclusive elements
|
|
15441
|
+
* console.log([...a.difference(b)]); // [1, 2];
|
|
15442
|
+
*/
|
|
15443
|
+
difference(other) {
|
|
15444
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15445
|
+
const result = new _TreeSet([], { comparator: __privateGet(this, _isDefaultComparator) ? void 0 : __privateGet(this, _userComparator) });
|
|
15446
|
+
for (const key of this) {
|
|
15447
|
+
if (!otherSet.has(key)) result.add(key);
|
|
15448
|
+
}
|
|
15449
|
+
return result;
|
|
15450
|
+
}
|
|
15451
|
+
/**
|
|
15452
|
+
* Return a new TreeSet containing elements in either set but not both.
|
|
15453
|
+
* @remarks Time O(n+m).
|
|
15454
|
+
* @param other - Any iterable of keys.
|
|
15455
|
+
* @returns A new TreeSet.
|
|
15456
|
+
* @example
|
|
15457
|
+
* // Find symmetric difference
|
|
15458
|
+
* console.log([...a.symmetricDifference(b)]); // [1, 2, 6, 7];
|
|
15459
|
+
*/
|
|
15460
|
+
symmetricDifference(other) {
|
|
15461
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15462
|
+
const result = new _TreeSet([], { comparator: __privateGet(this, _isDefaultComparator) ? void 0 : __privateGet(this, _userComparator) });
|
|
15463
|
+
for (const key of this) {
|
|
15464
|
+
if (!otherSet.has(key)) result.add(key);
|
|
15465
|
+
}
|
|
15466
|
+
for (const key of otherSet) {
|
|
15467
|
+
if (!this.has(key)) result.add(key);
|
|
15468
|
+
}
|
|
15469
|
+
return result;
|
|
15470
|
+
}
|
|
15471
|
+
/**
|
|
15472
|
+
* Check whether every element in this set is also in the other.
|
|
15473
|
+
* @remarks Time O(n).
|
|
15474
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15475
|
+
* @returns `true` if this is a subset of other.
|
|
15476
|
+
* @example
|
|
15477
|
+
* // Check subset
|
|
15478
|
+
* console.log(new TreeSet([3, 4]).isSubsetOf(a)); // true;
|
|
15479
|
+
*/
|
|
15480
|
+
isSubsetOf(other) {
|
|
15481
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15482
|
+
for (const key of this) {
|
|
15483
|
+
if (!otherSet.has(key)) return false;
|
|
15484
|
+
}
|
|
15485
|
+
return true;
|
|
15486
|
+
}
|
|
15487
|
+
/**
|
|
15488
|
+
* Check whether every element in the other set is also in this set.
|
|
15489
|
+
* @remarks Time O(m).
|
|
15490
|
+
* @param other - Any iterable of keys.
|
|
15491
|
+
* @returns `true` if this is a superset of other.
|
|
15492
|
+
* @example
|
|
15493
|
+
* // Check superset
|
|
15494
|
+
* console.log(a.isSupersetOf(new TreeSet([2, 3]))); // true;
|
|
15495
|
+
*/
|
|
15496
|
+
isSupersetOf(other) {
|
|
15497
|
+
for (const key of other) {
|
|
15498
|
+
if (!this.has(key)) return false;
|
|
15499
|
+
}
|
|
15500
|
+
return true;
|
|
15501
|
+
}
|
|
15502
|
+
/**
|
|
15503
|
+
* Check whether this set and the other share no common elements.
|
|
15504
|
+
* @remarks Time O(min(n,m)), can short-circuit on first overlap.
|
|
15505
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15506
|
+
* @returns `true` if sets are disjoint.
|
|
15507
|
+
* @example
|
|
15508
|
+
* // Check disjoint
|
|
15509
|
+
* console.log(a.isDisjointFrom(new TreeSet([8, 9]))); // true;
|
|
15510
|
+
*/
|
|
15511
|
+
isDisjointFrom(other) {
|
|
15512
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15513
|
+
for (const key of this) {
|
|
15514
|
+
if (otherSet.has(key)) return false;
|
|
15515
|
+
}
|
|
15516
|
+
return true;
|
|
15517
|
+
}
|
|
15518
|
+
/**
|
|
15519
|
+
* Deep copy
|
|
15520
|
+
|
|
14725
15521
|
|
|
14726
15522
|
|
|
14727
15523
|
|
|
@@ -14988,6 +15784,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
14988
15784
|
|
|
14989
15785
|
|
|
14990
15786
|
|
|
15787
|
+
|
|
15788
|
+
|
|
15789
|
+
|
|
15790
|
+
|
|
15791
|
+
|
|
15792
|
+
|
|
15793
|
+
|
|
15794
|
+
|
|
15795
|
+
|
|
15796
|
+
|
|
15797
|
+
|
|
15798
|
+
|
|
15799
|
+
|
|
15800
|
+
|
|
15801
|
+
|
|
14991
15802
|
|
|
14992
15803
|
|
|
14993
15804
|
|
|
@@ -15176,6 +15987,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15176
15987
|
|
|
15177
15988
|
|
|
15178
15989
|
|
|
15990
|
+
|
|
15991
|
+
|
|
15992
|
+
|
|
15993
|
+
|
|
15994
|
+
|
|
15995
|
+
|
|
15996
|
+
|
|
15997
|
+
|
|
15998
|
+
|
|
15999
|
+
|
|
16000
|
+
|
|
16001
|
+
|
|
16002
|
+
|
|
16003
|
+
|
|
16004
|
+
|
|
15179
16005
|
|
|
15180
16006
|
|
|
15181
16007
|
|
|
@@ -15231,6 +16057,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15231
16057
|
|
|
15232
16058
|
|
|
15233
16059
|
|
|
16060
|
+
|
|
16061
|
+
|
|
16062
|
+
|
|
15234
16063
|
|
|
15235
16064
|
|
|
15236
16065
|
|
|
@@ -15275,6 +16104,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15275
16104
|
|
|
15276
16105
|
|
|
15277
16106
|
|
|
16107
|
+
|
|
16108
|
+
|
|
16109
|
+
|
|
15278
16110
|
|
|
15279
16111
|
|
|
15280
16112
|
|
|
@@ -15496,6 +16328,24 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15496
16328
|
|
|
15497
16329
|
|
|
15498
16330
|
|
|
16331
|
+
|
|
16332
|
+
|
|
16333
|
+
|
|
16334
|
+
|
|
16335
|
+
|
|
16336
|
+
|
|
16337
|
+
|
|
16338
|
+
|
|
16339
|
+
|
|
16340
|
+
|
|
16341
|
+
|
|
16342
|
+
|
|
16343
|
+
|
|
16344
|
+
|
|
16345
|
+
|
|
16346
|
+
|
|
16347
|
+
|
|
16348
|
+
|
|
15499
16349
|
|
|
15500
16350
|
|
|
15501
16351
|
|
|
@@ -15730,6 +16580,24 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15730
16580
|
|
|
15731
16581
|
|
|
15732
16582
|
|
|
16583
|
+
|
|
16584
|
+
|
|
16585
|
+
|
|
16586
|
+
|
|
16587
|
+
|
|
16588
|
+
|
|
16589
|
+
|
|
16590
|
+
|
|
16591
|
+
|
|
16592
|
+
|
|
16593
|
+
|
|
16594
|
+
|
|
16595
|
+
|
|
16596
|
+
|
|
16597
|
+
|
|
16598
|
+
|
|
16599
|
+
|
|
16600
|
+
|
|
15733
16601
|
|
|
15734
16602
|
|
|
15735
16603
|
|
|
@@ -15919,6 +16787,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15919
16787
|
|
|
15920
16788
|
|
|
15921
16789
|
|
|
16790
|
+
|
|
16791
|
+
|
|
16792
|
+
|
|
16793
|
+
|
|
16794
|
+
|
|
16795
|
+
|
|
16796
|
+
|
|
16797
|
+
|
|
16798
|
+
|
|
16799
|
+
|
|
16800
|
+
|
|
16801
|
+
|
|
16802
|
+
|
|
16803
|
+
|
|
16804
|
+
|
|
15922
16805
|
|
|
15923
16806
|
|
|
15924
16807
|
|
|
@@ -16175,6 +17058,24 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16175
17058
|
|
|
16176
17059
|
|
|
16177
17060
|
|
|
17061
|
+
|
|
17062
|
+
|
|
17063
|
+
|
|
17064
|
+
|
|
17065
|
+
|
|
17066
|
+
|
|
17067
|
+
|
|
17068
|
+
|
|
17069
|
+
|
|
17070
|
+
|
|
17071
|
+
|
|
17072
|
+
|
|
17073
|
+
|
|
17074
|
+
|
|
17075
|
+
|
|
17076
|
+
|
|
17077
|
+
|
|
17078
|
+
|
|
16178
17079
|
|
|
16179
17080
|
|
|
16180
17081
|
|
|
@@ -16235,6 +17136,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16235
17136
|
|
|
16236
17137
|
|
|
16237
17138
|
|
|
17139
|
+
|
|
17140
|
+
|
|
17141
|
+
|
|
16238
17142
|
|
|
16239
17143
|
|
|
16240
17144
|
|
|
@@ -16280,6 +17184,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16280
17184
|
|
|
16281
17185
|
|
|
16282
17186
|
|
|
17187
|
+
|
|
17188
|
+
|
|
17189
|
+
|
|
16283
17190
|
|
|
16284
17191
|
|
|
16285
17192
|
|
|
@@ -16330,6 +17237,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16330
17237
|
|
|
16331
17238
|
|
|
16332
17239
|
|
|
17240
|
+
|
|
17241
|
+
|
|
17242
|
+
|
|
16333
17243
|
|
|
16334
17244
|
|
|
16335
17245
|
|
|
@@ -16534,6 +17444,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16534
17444
|
|
|
16535
17445
|
|
|
16536
17446
|
|
|
17447
|
+
|
|
17448
|
+
|
|
17449
|
+
|
|
17450
|
+
|
|
17451
|
+
|
|
17452
|
+
|
|
17453
|
+
|
|
17454
|
+
|
|
17455
|
+
|
|
17456
|
+
|
|
17457
|
+
|
|
17458
|
+
|
|
17459
|
+
|
|
17460
|
+
|
|
17461
|
+
|
|
16537
17462
|
|
|
16538
17463
|
|
|
16539
17464
|
|
|
@@ -16725,6 +17650,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16725
17650
|
|
|
16726
17651
|
|
|
16727
17652
|
|
|
17653
|
+
|
|
17654
|
+
|
|
17655
|
+
|
|
17656
|
+
|
|
17657
|
+
|
|
17658
|
+
|
|
17659
|
+
|
|
17660
|
+
|
|
17661
|
+
|
|
17662
|
+
|
|
17663
|
+
|
|
17664
|
+
|
|
17665
|
+
|
|
17666
|
+
|
|
17667
|
+
|
|
16728
17668
|
|
|
16729
17669
|
|
|
16730
17670
|
|
|
@@ -16751,6 +17691,31 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16751
17691
|
*values() {
|
|
16752
17692
|
for (const [, bucket] of this) yield bucket;
|
|
16753
17693
|
}
|
|
17694
|
+
/**
|
|
17695
|
+
* Iterate over all `[key, values[]]` entries (Map-compatible).
|
|
17696
|
+
* @remarks Time O(n), Space O(1) per step.
|
|
17697
|
+
|
|
17698
|
+
|
|
17699
|
+
|
|
17700
|
+
|
|
17701
|
+
|
|
17702
|
+
|
|
17703
|
+
|
|
17704
|
+
|
|
17705
|
+
* @example
|
|
17706
|
+
* // Iterate over entries
|
|
17707
|
+
* const mm = new TreeMultiMap<number, string>();
|
|
17708
|
+
* mm.set(1, 'a');
|
|
17709
|
+
* mm.set(1, 'b');
|
|
17710
|
+
* mm.set(2, 'c');
|
|
17711
|
+
* console.log([...mm.entries()]); // [
|
|
17712
|
+
* // [1, ['a', 'b']],
|
|
17713
|
+
* // [2, ['c']]
|
|
17714
|
+
* // ];
|
|
17715
|
+
*/
|
|
17716
|
+
*entries() {
|
|
17717
|
+
yield* this;
|
|
17718
|
+
}
|
|
16754
17719
|
// ---- entry-flat views ----
|
|
16755
17720
|
/**
|
|
16756
17721
|
* Iterates over all entries for a specific key.
|
|
@@ -16781,6 +17746,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16781
17746
|
|
|
16782
17747
|
|
|
16783
17748
|
|
|
17749
|
+
|
|
17750
|
+
|
|
17751
|
+
|
|
16784
17752
|
|
|
16785
17753
|
|
|
16786
17754
|
|
|
@@ -16826,6 +17794,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16826
17794
|
|
|
16827
17795
|
|
|
16828
17796
|
|
|
17797
|
+
|
|
17798
|
+
|
|
17799
|
+
|
|
16829
17800
|
|
|
16830
17801
|
|
|
16831
17802
|
|
|
@@ -16871,6 +17842,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16871
17842
|
|
|
16872
17843
|
|
|
16873
17844
|
|
|
17845
|
+
|
|
17846
|
+
|
|
17847
|
+
|
|
16874
17848
|
|
|
16875
17849
|
|
|
16876
17850
|
|
|
@@ -16955,6 +17929,12 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16955
17929
|
|
|
16956
17930
|
|
|
16957
17931
|
|
|
17932
|
+
|
|
17933
|
+
|
|
17934
|
+
|
|
17935
|
+
|
|
17936
|
+
|
|
17937
|
+
|
|
16958
17938
|
|
|
16959
17939
|
|
|
16960
17940
|
|
|
@@ -17044,6 +18024,12 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17044
18024
|
|
|
17045
18025
|
|
|
17046
18026
|
|
|
18027
|
+
|
|
18028
|
+
|
|
18029
|
+
|
|
18030
|
+
|
|
18031
|
+
|
|
18032
|
+
|
|
17047
18033
|
|
|
17048
18034
|
|
|
17049
18035
|
|
|
@@ -17097,6 +18083,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17097
18083
|
|
|
17098
18084
|
|
|
17099
18085
|
|
|
18086
|
+
|
|
18087
|
+
|
|
18088
|
+
|
|
17100
18089
|
|
|
17101
18090
|
|
|
17102
18091
|
|
|
@@ -17146,6 +18135,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17146
18135
|
|
|
17147
18136
|
|
|
17148
18137
|
|
|
18138
|
+
|
|
18139
|
+
|
|
18140
|
+
|
|
17149
18141
|
|
|
17150
18142
|
|
|
17151
18143
|
|
|
@@ -17332,6 +18324,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17332
18324
|
|
|
17333
18325
|
|
|
17334
18326
|
|
|
18327
|
+
|
|
18328
|
+
|
|
18329
|
+
|
|
18330
|
+
|
|
18331
|
+
|
|
18332
|
+
|
|
18333
|
+
|
|
18334
|
+
|
|
18335
|
+
|
|
18336
|
+
|
|
18337
|
+
|
|
18338
|
+
|
|
18339
|
+
|
|
18340
|
+
|
|
18341
|
+
|
|
17335
18342
|
|
|
17336
18343
|
|
|
17337
18344
|
|
|
@@ -17534,6 +18541,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17534
18541
|
|
|
17535
18542
|
|
|
17536
18543
|
|
|
18544
|
+
|
|
18545
|
+
|
|
18546
|
+
|
|
18547
|
+
|
|
18548
|
+
|
|
18549
|
+
|
|
18550
|
+
|
|
18551
|
+
|
|
18552
|
+
|
|
18553
|
+
|
|
18554
|
+
|
|
18555
|
+
|
|
18556
|
+
|
|
18557
|
+
|
|
18558
|
+
|
|
17537
18559
|
|
|
17538
18560
|
|
|
17539
18561
|
|
|
@@ -17700,6 +18722,18 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17700
18722
|
|
|
17701
18723
|
|
|
17702
18724
|
|
|
18725
|
+
|
|
18726
|
+
|
|
18727
|
+
|
|
18728
|
+
|
|
18729
|
+
|
|
18730
|
+
|
|
18731
|
+
|
|
18732
|
+
|
|
18733
|
+
|
|
18734
|
+
|
|
18735
|
+
|
|
18736
|
+
|
|
17703
18737
|
|
|
17704
18738
|
|
|
17705
18739
|
|
|
@@ -17862,6 +18896,18 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17862
18896
|
|
|
17863
18897
|
|
|
17864
18898
|
|
|
18899
|
+
|
|
18900
|
+
|
|
18901
|
+
|
|
18902
|
+
|
|
18903
|
+
|
|
18904
|
+
|
|
18905
|
+
|
|
18906
|
+
|
|
18907
|
+
|
|
18908
|
+
|
|
18909
|
+
|
|
18910
|
+
|
|
17865
18911
|
|
|
17866
18912
|
|
|
17867
18913
|
|
|
@@ -18058,6 +19104,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18058
19104
|
|
|
18059
19105
|
|
|
18060
19106
|
|
|
19107
|
+
|
|
19108
|
+
|
|
19109
|
+
|
|
19110
|
+
|
|
19111
|
+
|
|
19112
|
+
|
|
19113
|
+
|
|
19114
|
+
|
|
19115
|
+
|
|
19116
|
+
|
|
19117
|
+
|
|
19118
|
+
|
|
19119
|
+
|
|
19120
|
+
|
|
19121
|
+
|
|
18061
19122
|
|
|
18062
19123
|
|
|
18063
19124
|
|
|
@@ -18248,6 +19309,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18248
19309
|
|
|
18249
19310
|
|
|
18250
19311
|
|
|
19312
|
+
|
|
19313
|
+
|
|
19314
|
+
|
|
19315
|
+
|
|
19316
|
+
|
|
19317
|
+
|
|
19318
|
+
|
|
19319
|
+
|
|
19320
|
+
|
|
19321
|
+
|
|
19322
|
+
|
|
19323
|
+
|
|
19324
|
+
|
|
19325
|
+
|
|
19326
|
+
|
|
18251
19327
|
|
|
18252
19328
|
|
|
18253
19329
|
|
|
@@ -18443,6 +19519,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18443
19519
|
|
|
18444
19520
|
|
|
18445
19521
|
|
|
19522
|
+
|
|
19523
|
+
|
|
19524
|
+
|
|
19525
|
+
|
|
19526
|
+
|
|
19527
|
+
|
|
19528
|
+
|
|
19529
|
+
|
|
19530
|
+
|
|
19531
|
+
|
|
19532
|
+
|
|
19533
|
+
|
|
19534
|
+
|
|
19535
|
+
|
|
19536
|
+
|
|
18446
19537
|
|
|
18447
19538
|
|
|
18448
19539
|
|
|
@@ -18640,6 +19731,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18640
19731
|
|
|
18641
19732
|
|
|
18642
19733
|
|
|
19734
|
+
|
|
19735
|
+
|
|
19736
|
+
|
|
19737
|
+
|
|
19738
|
+
|
|
19739
|
+
|
|
19740
|
+
|
|
19741
|
+
|
|
19742
|
+
|
|
19743
|
+
|
|
19744
|
+
|
|
19745
|
+
|
|
19746
|
+
|
|
19747
|
+
|
|
19748
|
+
|
|
18643
19749
|
|
|
18644
19750
|
|
|
18645
19751
|
|
|
@@ -18835,6 +19941,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18835
19941
|
|
|
18836
19942
|
|
|
18837
19943
|
|
|
19944
|
+
|
|
19945
|
+
|
|
19946
|
+
|
|
19947
|
+
|
|
19948
|
+
|
|
19949
|
+
|
|
19950
|
+
|
|
19951
|
+
|
|
19952
|
+
|
|
19953
|
+
|
|
19954
|
+
|
|
19955
|
+
|
|
19956
|
+
|
|
19957
|
+
|
|
19958
|
+
|
|
18838
19959
|
|
|
18839
19960
|
|
|
18840
19961
|
|
|
@@ -19023,6 +20144,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19023
20144
|
|
|
19024
20145
|
|
|
19025
20146
|
|
|
20147
|
+
|
|
20148
|
+
|
|
20149
|
+
|
|
20150
|
+
|
|
20151
|
+
|
|
20152
|
+
|
|
20153
|
+
|
|
20154
|
+
|
|
20155
|
+
|
|
20156
|
+
|
|
20157
|
+
|
|
20158
|
+
|
|
20159
|
+
|
|
20160
|
+
|
|
20161
|
+
|
|
19026
20162
|
|
|
19027
20163
|
|
|
19028
20164
|
|
|
@@ -19184,6 +20320,18 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19184
20320
|
|
|
19185
20321
|
|
|
19186
20322
|
|
|
20323
|
+
|
|
20324
|
+
|
|
20325
|
+
|
|
20326
|
+
|
|
20327
|
+
|
|
20328
|
+
|
|
20329
|
+
|
|
20330
|
+
|
|
20331
|
+
|
|
20332
|
+
|
|
20333
|
+
|
|
20334
|
+
|
|
19187
20335
|
|
|
19188
20336
|
|
|
19189
20337
|
|
|
@@ -19409,6 +20557,12 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19409
20557
|
|
|
19410
20558
|
|
|
19411
20559
|
|
|
20560
|
+
|
|
20561
|
+
|
|
20562
|
+
|
|
20563
|
+
|
|
20564
|
+
|
|
20565
|
+
|
|
19412
20566
|
* @example
|
|
19413
20567
|
* // Pagination by position in tree order
|
|
19414
20568
|
* const tree = new TreeMultiMap<number>(
|
|
@@ -19451,6 +20605,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19451
20605
|
|
|
19452
20606
|
|
|
19453
20607
|
|
|
20608
|
+
|
|
20609
|
+
|
|
20610
|
+
|
|
20611
|
+
|
|
20612
|
+
|
|
20613
|
+
|
|
20614
|
+
|
|
20615
|
+
|
|
20616
|
+
|
|
20617
|
+
|
|
20618
|
+
|
|
20619
|
+
|
|
20620
|
+
|
|
20621
|
+
|
|
20622
|
+
|
|
19454
20623
|
|
|
19455
20624
|
|
|
19456
20625
|
|
|
@@ -19737,6 +20906,21 @@ var _TreeMap = class _TreeMap {
|
|
|
19737
20906
|
|
|
19738
20907
|
|
|
19739
20908
|
|
|
20909
|
+
|
|
20910
|
+
|
|
20911
|
+
|
|
20912
|
+
|
|
20913
|
+
|
|
20914
|
+
|
|
20915
|
+
|
|
20916
|
+
|
|
20917
|
+
|
|
20918
|
+
|
|
20919
|
+
|
|
20920
|
+
|
|
20921
|
+
|
|
20922
|
+
|
|
20923
|
+
|
|
19740
20924
|
|
|
19741
20925
|
|
|
19742
20926
|
|
|
@@ -19934,6 +21118,21 @@ var _TreeMap = class _TreeMap {
|
|
|
19934
21118
|
|
|
19935
21119
|
|
|
19936
21120
|
|
|
21121
|
+
|
|
21122
|
+
|
|
21123
|
+
|
|
21124
|
+
|
|
21125
|
+
|
|
21126
|
+
|
|
21127
|
+
|
|
21128
|
+
|
|
21129
|
+
|
|
21130
|
+
|
|
21131
|
+
|
|
21132
|
+
|
|
21133
|
+
|
|
21134
|
+
|
|
21135
|
+
|
|
19937
21136
|
|
|
19938
21137
|
|
|
19939
21138
|
|
|
@@ -19988,6 +21187,18 @@ var _TreeMap = class _TreeMap {
|
|
|
19988
21187
|
|
|
19989
21188
|
|
|
19990
21189
|
|
|
21190
|
+
|
|
21191
|
+
|
|
21192
|
+
|
|
21193
|
+
|
|
21194
|
+
|
|
21195
|
+
|
|
21196
|
+
|
|
21197
|
+
|
|
21198
|
+
|
|
21199
|
+
|
|
21200
|
+
|
|
21201
|
+
|
|
19991
21202
|
|
|
19992
21203
|
|
|
19993
21204
|
|
|
@@ -20187,6 +21398,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20187
21398
|
|
|
20188
21399
|
|
|
20189
21400
|
|
|
21401
|
+
|
|
21402
|
+
|
|
21403
|
+
|
|
21404
|
+
|
|
21405
|
+
|
|
21406
|
+
|
|
21407
|
+
|
|
21408
|
+
|
|
21409
|
+
|
|
21410
|
+
|
|
21411
|
+
|
|
21412
|
+
|
|
21413
|
+
|
|
21414
|
+
|
|
21415
|
+
|
|
20190
21416
|
|
|
20191
21417
|
|
|
20192
21418
|
|
|
@@ -20395,6 +21621,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20395
21621
|
|
|
20396
21622
|
|
|
20397
21623
|
|
|
21624
|
+
|
|
21625
|
+
|
|
21626
|
+
|
|
21627
|
+
|
|
21628
|
+
|
|
21629
|
+
|
|
21630
|
+
|
|
21631
|
+
|
|
21632
|
+
|
|
21633
|
+
|
|
21634
|
+
|
|
21635
|
+
|
|
21636
|
+
|
|
21637
|
+
|
|
21638
|
+
|
|
20398
21639
|
|
|
20399
21640
|
|
|
20400
21641
|
|
|
@@ -20603,6 +21844,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20603
21844
|
|
|
20604
21845
|
|
|
20605
21846
|
|
|
21847
|
+
|
|
21848
|
+
|
|
21849
|
+
|
|
21850
|
+
|
|
21851
|
+
|
|
21852
|
+
|
|
21853
|
+
|
|
21854
|
+
|
|
21855
|
+
|
|
21856
|
+
|
|
21857
|
+
|
|
21858
|
+
|
|
21859
|
+
|
|
21860
|
+
|
|
21861
|
+
|
|
20606
21862
|
|
|
20607
21863
|
|
|
20608
21864
|
|
|
@@ -20817,6 +22073,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20817
22073
|
|
|
20818
22074
|
|
|
20819
22075
|
|
|
22076
|
+
|
|
22077
|
+
|
|
22078
|
+
|
|
22079
|
+
|
|
22080
|
+
|
|
22081
|
+
|
|
22082
|
+
|
|
22083
|
+
|
|
22084
|
+
|
|
22085
|
+
|
|
22086
|
+
|
|
22087
|
+
|
|
22088
|
+
|
|
22089
|
+
|
|
22090
|
+
|
|
20820
22091
|
|
|
20821
22092
|
|
|
20822
22093
|
|
|
@@ -21006,6 +22277,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21006
22277
|
|
|
21007
22278
|
|
|
21008
22279
|
|
|
22280
|
+
|
|
22281
|
+
|
|
22282
|
+
|
|
22283
|
+
|
|
22284
|
+
|
|
22285
|
+
|
|
22286
|
+
|
|
22287
|
+
|
|
22288
|
+
|
|
22289
|
+
|
|
22290
|
+
|
|
22291
|
+
|
|
22292
|
+
|
|
22293
|
+
|
|
22294
|
+
|
|
21009
22295
|
|
|
21010
22296
|
|
|
21011
22297
|
|
|
@@ -21199,6 +22485,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21199
22485
|
|
|
21200
22486
|
|
|
21201
22487
|
|
|
22488
|
+
|
|
22489
|
+
|
|
22490
|
+
|
|
22491
|
+
|
|
22492
|
+
|
|
22493
|
+
|
|
22494
|
+
|
|
22495
|
+
|
|
22496
|
+
|
|
22497
|
+
|
|
22498
|
+
|
|
22499
|
+
|
|
22500
|
+
|
|
22501
|
+
|
|
22502
|
+
|
|
21202
22503
|
|
|
21203
22504
|
|
|
21204
22505
|
|
|
@@ -21389,6 +22690,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21389
22690
|
|
|
21390
22691
|
|
|
21391
22692
|
|
|
22693
|
+
|
|
22694
|
+
|
|
22695
|
+
|
|
22696
|
+
|
|
22697
|
+
|
|
22698
|
+
|
|
22699
|
+
|
|
22700
|
+
|
|
22701
|
+
|
|
22702
|
+
|
|
22703
|
+
|
|
22704
|
+
|
|
22705
|
+
|
|
22706
|
+
|
|
22707
|
+
|
|
21392
22708
|
|
|
21393
22709
|
|
|
21394
22710
|
|
|
@@ -21582,6 +22898,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21582
22898
|
|
|
21583
22899
|
|
|
21584
22900
|
|
|
22901
|
+
|
|
22902
|
+
|
|
22903
|
+
|
|
22904
|
+
|
|
22905
|
+
|
|
22906
|
+
|
|
22907
|
+
|
|
22908
|
+
|
|
22909
|
+
|
|
22910
|
+
|
|
22911
|
+
|
|
22912
|
+
|
|
22913
|
+
|
|
22914
|
+
|
|
22915
|
+
|
|
21585
22916
|
|
|
21586
22917
|
|
|
21587
22918
|
|
|
@@ -21775,6 +23106,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21775
23106
|
|
|
21776
23107
|
|
|
21777
23108
|
|
|
23109
|
+
|
|
23110
|
+
|
|
23111
|
+
|
|
23112
|
+
|
|
23113
|
+
|
|
23114
|
+
|
|
23115
|
+
|
|
23116
|
+
|
|
23117
|
+
|
|
23118
|
+
|
|
23119
|
+
|
|
23120
|
+
|
|
23121
|
+
|
|
23122
|
+
|
|
23123
|
+
|
|
21778
23124
|
|
|
21779
23125
|
|
|
21780
23126
|
|
|
@@ -21971,6 +23317,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21971
23317
|
|
|
21972
23318
|
|
|
21973
23319
|
|
|
23320
|
+
|
|
23321
|
+
|
|
23322
|
+
|
|
23323
|
+
|
|
23324
|
+
|
|
23325
|
+
|
|
23326
|
+
|
|
23327
|
+
|
|
23328
|
+
|
|
23329
|
+
|
|
23330
|
+
|
|
23331
|
+
|
|
23332
|
+
|
|
23333
|
+
|
|
23334
|
+
|
|
21974
23335
|
|
|
21975
23336
|
|
|
21976
23337
|
|
|
@@ -22167,6 +23528,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22167
23528
|
|
|
22168
23529
|
|
|
22169
23530
|
|
|
23531
|
+
|
|
23532
|
+
|
|
23533
|
+
|
|
23534
|
+
|
|
23535
|
+
|
|
23536
|
+
|
|
23537
|
+
|
|
23538
|
+
|
|
23539
|
+
|
|
23540
|
+
|
|
23541
|
+
|
|
23542
|
+
|
|
23543
|
+
|
|
23544
|
+
|
|
23545
|
+
|
|
22170
23546
|
|
|
22171
23547
|
|
|
22172
23548
|
|
|
@@ -22357,6 +23733,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22357
23733
|
|
|
22358
23734
|
|
|
22359
23735
|
|
|
23736
|
+
|
|
23737
|
+
|
|
23738
|
+
|
|
23739
|
+
|
|
23740
|
+
|
|
23741
|
+
|
|
23742
|
+
|
|
23743
|
+
|
|
23744
|
+
|
|
23745
|
+
|
|
23746
|
+
|
|
23747
|
+
|
|
23748
|
+
|
|
23749
|
+
|
|
23750
|
+
|
|
22360
23751
|
|
|
22361
23752
|
|
|
22362
23753
|
|
|
@@ -22549,6 +23940,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22549
23940
|
|
|
22550
23941
|
|
|
22551
23942
|
|
|
23943
|
+
|
|
23944
|
+
|
|
23945
|
+
|
|
23946
|
+
|
|
23947
|
+
|
|
23948
|
+
|
|
23949
|
+
|
|
23950
|
+
|
|
23951
|
+
|
|
23952
|
+
|
|
23953
|
+
|
|
23954
|
+
|
|
23955
|
+
|
|
23956
|
+
|
|
23957
|
+
|
|
22552
23958
|
|
|
22553
23959
|
|
|
22554
23960
|
|
|
@@ -22742,6 +24148,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22742
24148
|
|
|
22743
24149
|
|
|
22744
24150
|
|
|
24151
|
+
|
|
24152
|
+
|
|
24153
|
+
|
|
24154
|
+
|
|
24155
|
+
|
|
24156
|
+
|
|
24157
|
+
|
|
24158
|
+
|
|
24159
|
+
|
|
24160
|
+
|
|
24161
|
+
|
|
24162
|
+
|
|
24163
|
+
|
|
24164
|
+
|
|
24165
|
+
|
|
22745
24166
|
|
|
22746
24167
|
|
|
22747
24168
|
|
|
@@ -22936,6 +24357,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22936
24357
|
|
|
22937
24358
|
|
|
22938
24359
|
|
|
24360
|
+
|
|
24361
|
+
|
|
24362
|
+
|
|
24363
|
+
|
|
24364
|
+
|
|
24365
|
+
|
|
24366
|
+
|
|
24367
|
+
|
|
24368
|
+
|
|
24369
|
+
|
|
24370
|
+
|
|
24371
|
+
|
|
24372
|
+
|
|
24373
|
+
|
|
24374
|
+
|
|
22939
24375
|
|
|
22940
24376
|
|
|
22941
24377
|
|
|
@@ -23125,6 +24561,21 @@ var _TreeMap = class _TreeMap {
|
|
|
23125
24561
|
|
|
23126
24562
|
|
|
23127
24563
|
|
|
24564
|
+
|
|
24565
|
+
|
|
24566
|
+
|
|
24567
|
+
|
|
24568
|
+
|
|
24569
|
+
|
|
24570
|
+
|
|
24571
|
+
|
|
24572
|
+
|
|
24573
|
+
|
|
24574
|
+
|
|
24575
|
+
|
|
24576
|
+
|
|
24577
|
+
|
|
24578
|
+
|
|
23128
24579
|
|
|
23129
24580
|
|
|
23130
24581
|
|
|
@@ -23188,6 +24639,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23188
24639
|
|
|
23189
24640
|
|
|
23190
24641
|
|
|
24642
|
+
|
|
24643
|
+
|
|
24644
|
+
|
|
23191
24645
|
|
|
23192
24646
|
|
|
23193
24647
|
|
|
@@ -23260,6 +24714,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23260
24714
|
|
|
23261
24715
|
|
|
23262
24716
|
|
|
24717
|
+
|
|
24718
|
+
|
|
24719
|
+
|
|
23263
24720
|
|
|
23264
24721
|
|
|
23265
24722
|
|
|
@@ -23316,6 +24773,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23316
24773
|
|
|
23317
24774
|
|
|
23318
24775
|
|
|
24776
|
+
|
|
24777
|
+
|
|
24778
|
+
|
|
23319
24779
|
|
|
23320
24780
|
|
|
23321
24781
|
|
|
@@ -23376,6 +24836,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23376
24836
|
|
|
23377
24837
|
|
|
23378
24838
|
|
|
24839
|
+
|
|
24840
|
+
|
|
24841
|
+
|
|
23379
24842
|
|
|
23380
24843
|
|
|
23381
24844
|
|
|
@@ -23538,6 +25001,18 @@ var _TreeMap = class _TreeMap {
|
|
|
23538
25001
|
|
|
23539
25002
|
|
|
23540
25003
|
|
|
25004
|
+
|
|
25005
|
+
|
|
25006
|
+
|
|
25007
|
+
|
|
25008
|
+
|
|
25009
|
+
|
|
25010
|
+
|
|
25011
|
+
|
|
25012
|
+
|
|
25013
|
+
|
|
25014
|
+
|
|
25015
|
+
|
|
23541
25016
|
|
|
23542
25017
|
|
|
23543
25018
|
|
|
@@ -23727,6 +25202,18 @@ var _TreeMap = class _TreeMap {
|
|
|
23727
25202
|
|
|
23728
25203
|
|
|
23729
25204
|
|
|
25205
|
+
|
|
25206
|
+
|
|
25207
|
+
|
|
25208
|
+
|
|
25209
|
+
|
|
25210
|
+
|
|
25211
|
+
|
|
25212
|
+
|
|
25213
|
+
|
|
25214
|
+
|
|
25215
|
+
|
|
25216
|
+
|
|
23730
25217
|
|
|
23731
25218
|
|
|
23732
25219
|
|
|
@@ -23900,6 +25387,18 @@ var _TreeMap = class _TreeMap {
|
|
|
23900
25387
|
|
|
23901
25388
|
|
|
23902
25389
|
|
|
25390
|
+
|
|
25391
|
+
|
|
25392
|
+
|
|
25393
|
+
|
|
25394
|
+
|
|
25395
|
+
|
|
25396
|
+
|
|
25397
|
+
|
|
25398
|
+
|
|
25399
|
+
|
|
25400
|
+
|
|
25401
|
+
|
|
23903
25402
|
|
|
23904
25403
|
|
|
23905
25404
|
|
|
@@ -24073,6 +25572,18 @@ var _TreeMap = class _TreeMap {
|
|
|
24073
25572
|
|
|
24074
25573
|
|
|
24075
25574
|
|
|
25575
|
+
|
|
25576
|
+
|
|
25577
|
+
|
|
25578
|
+
|
|
25579
|
+
|
|
25580
|
+
|
|
25581
|
+
|
|
25582
|
+
|
|
25583
|
+
|
|
25584
|
+
|
|
25585
|
+
|
|
25586
|
+
|
|
24076
25587
|
|
|
24077
25588
|
|
|
24078
25589
|
|
|
@@ -24247,6 +25758,18 @@ var _TreeMap = class _TreeMap {
|
|
|
24247
25758
|
|
|
24248
25759
|
|
|
24249
25760
|
|
|
25761
|
+
|
|
25762
|
+
|
|
25763
|
+
|
|
25764
|
+
|
|
25765
|
+
|
|
25766
|
+
|
|
25767
|
+
|
|
25768
|
+
|
|
25769
|
+
|
|
25770
|
+
|
|
25771
|
+
|
|
25772
|
+
|
|
24250
25773
|
|
|
24251
25774
|
|
|
24252
25775
|
|
|
@@ -24358,6 +25881,12 @@ var _TreeMap = class _TreeMap {
|
|
|
24358
25881
|
|
|
24359
25882
|
|
|
24360
25883
|
|
|
25884
|
+
|
|
25885
|
+
|
|
25886
|
+
|
|
25887
|
+
|
|
25888
|
+
|
|
25889
|
+
|
|
24361
25890
|
* @example
|
|
24362
25891
|
* // Pagination by position in tree order
|
|
24363
25892
|
* const tree = new TreeMap<number>(
|
|
@@ -24543,6 +26072,21 @@ var _TreeMap = class _TreeMap {
|
|
|
24543
26072
|
|
|
24544
26073
|
|
|
24545
26074
|
|
|
26075
|
+
|
|
26076
|
+
|
|
26077
|
+
|
|
26078
|
+
|
|
26079
|
+
|
|
26080
|
+
|
|
26081
|
+
|
|
26082
|
+
|
|
26083
|
+
|
|
26084
|
+
|
|
26085
|
+
|
|
26086
|
+
|
|
26087
|
+
|
|
26088
|
+
|
|
26089
|
+
|
|
24546
26090
|
|
|
24547
26091
|
|
|
24548
26092
|
|
|
@@ -24670,6 +26214,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
24670
26214
|
|
|
24671
26215
|
|
|
24672
26216
|
|
|
26217
|
+
|
|
26218
|
+
|
|
26219
|
+
|
|
24673
26220
|
|
|
24674
26221
|
|
|
24675
26222
|
|
|
@@ -24849,6 +26396,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
24849
26396
|
|
|
24850
26397
|
|
|
24851
26398
|
|
|
26399
|
+
|
|
26400
|
+
|
|
26401
|
+
|
|
26402
|
+
|
|
26403
|
+
|
|
26404
|
+
|
|
26405
|
+
|
|
26406
|
+
|
|
26407
|
+
|
|
26408
|
+
|
|
26409
|
+
|
|
26410
|
+
|
|
26411
|
+
|
|
26412
|
+
|
|
26413
|
+
|
|
24852
26414
|
|
|
24853
26415
|
|
|
24854
26416
|
|
|
@@ -25040,6 +26602,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25040
26602
|
|
|
25041
26603
|
|
|
25042
26604
|
|
|
26605
|
+
|
|
26606
|
+
|
|
26607
|
+
|
|
26608
|
+
|
|
26609
|
+
|
|
26610
|
+
|
|
26611
|
+
|
|
26612
|
+
|
|
26613
|
+
|
|
26614
|
+
|
|
26615
|
+
|
|
26616
|
+
|
|
26617
|
+
|
|
26618
|
+
|
|
26619
|
+
|
|
25043
26620
|
|
|
25044
26621
|
|
|
25045
26622
|
|
|
@@ -25096,6 +26673,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25096
26673
|
|
|
25097
26674
|
|
|
25098
26675
|
|
|
26676
|
+
|
|
26677
|
+
|
|
26678
|
+
|
|
25099
26679
|
|
|
25100
26680
|
|
|
25101
26681
|
|
|
@@ -25271,6 +26851,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25271
26851
|
|
|
25272
26852
|
|
|
25273
26853
|
|
|
26854
|
+
|
|
26855
|
+
|
|
26856
|
+
|
|
26857
|
+
|
|
26858
|
+
|
|
26859
|
+
|
|
26860
|
+
|
|
26861
|
+
|
|
26862
|
+
|
|
26863
|
+
|
|
26864
|
+
|
|
26865
|
+
|
|
26866
|
+
|
|
26867
|
+
|
|
26868
|
+
|
|
25274
26869
|
|
|
25275
26870
|
|
|
25276
26871
|
|
|
@@ -25337,6 +26932,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25337
26932
|
|
|
25338
26933
|
|
|
25339
26934
|
|
|
26935
|
+
|
|
26936
|
+
|
|
26937
|
+
|
|
25340
26938
|
|
|
25341
26939
|
|
|
25342
26940
|
|
|
@@ -25530,6 +27128,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25530
27128
|
|
|
25531
27129
|
|
|
25532
27130
|
|
|
27131
|
+
|
|
27132
|
+
|
|
27133
|
+
|
|
27134
|
+
|
|
27135
|
+
|
|
27136
|
+
|
|
27137
|
+
|
|
27138
|
+
|
|
27139
|
+
|
|
27140
|
+
|
|
27141
|
+
|
|
27142
|
+
|
|
27143
|
+
|
|
27144
|
+
|
|
27145
|
+
|
|
25533
27146
|
|
|
25534
27147
|
|
|
25535
27148
|
|
|
@@ -25597,6 +27210,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25597
27210
|
|
|
25598
27211
|
|
|
25599
27212
|
|
|
27213
|
+
|
|
27214
|
+
|
|
27215
|
+
|
|
25600
27216
|
|
|
25601
27217
|
|
|
25602
27218
|
|
|
@@ -25646,6 +27262,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25646
27262
|
|
|
25647
27263
|
|
|
25648
27264
|
|
|
27265
|
+
|
|
27266
|
+
|
|
27267
|
+
|
|
25649
27268
|
|
|
25650
27269
|
|
|
25651
27270
|
|
|
@@ -25825,6 +27444,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25825
27444
|
|
|
25826
27445
|
|
|
25827
27446
|
|
|
27447
|
+
|
|
27448
|
+
|
|
27449
|
+
|
|
27450
|
+
|
|
27451
|
+
|
|
27452
|
+
|
|
27453
|
+
|
|
27454
|
+
|
|
27455
|
+
|
|
27456
|
+
|
|
27457
|
+
|
|
27458
|
+
|
|
27459
|
+
|
|
27460
|
+
|
|
27461
|
+
|
|
25828
27462
|
|
|
25829
27463
|
|
|
25830
27464
|
|
|
@@ -25861,6 +27495,46 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25861
27495
|
for (let i = 0; i < c; i++) yield k;
|
|
25862
27496
|
}
|
|
25863
27497
|
}
|
|
27498
|
+
/**
|
|
27499
|
+
* Iterate over all elements with multiplicity (Set-compatible, alias for `[Symbol.iterator]`).
|
|
27500
|
+
* @remarks Each key is yielded `count(key)` times. Time O(size), Space O(1) per step.
|
|
27501
|
+
|
|
27502
|
+
|
|
27503
|
+
|
|
27504
|
+
|
|
27505
|
+
|
|
27506
|
+
|
|
27507
|
+
|
|
27508
|
+
|
|
27509
|
+
* @example
|
|
27510
|
+
* // Iterate with multiplicity
|
|
27511
|
+
* const ms = new TreeMultiSet<number>();
|
|
27512
|
+
* ms.add(1); ms.add(1); ms.add(2); ms.add(3); ms.add(3); ms.add(3);
|
|
27513
|
+
* console.log([...ms.keys()]); // [1, 1, 2, 3, 3, 3];
|
|
27514
|
+
*/
|
|
27515
|
+
*keys() {
|
|
27516
|
+
yield* this;
|
|
27517
|
+
}
|
|
27518
|
+
/**
|
|
27519
|
+
* Iterate over all elements with multiplicity (Set-compatible, alias for `[Symbol.iterator]`).
|
|
27520
|
+
* @remarks Each key is yielded `count(key)` times. Time O(size), Space O(1) per step.
|
|
27521
|
+
|
|
27522
|
+
|
|
27523
|
+
|
|
27524
|
+
|
|
27525
|
+
|
|
27526
|
+
|
|
27527
|
+
|
|
27528
|
+
|
|
27529
|
+
* @example
|
|
27530
|
+
* // Iterate with multiplicity
|
|
27531
|
+
* const ms = new TreeMultiSet<number>();
|
|
27532
|
+
* ms.add(5); ms.add(5); ms.add(10);
|
|
27533
|
+
* console.log([...ms.values()]); // [5, 5, 10];
|
|
27534
|
+
*/
|
|
27535
|
+
*values() {
|
|
27536
|
+
yield* this;
|
|
27537
|
+
}
|
|
25864
27538
|
/**
|
|
25865
27539
|
* Returns an array with all elements (expanded).
|
|
25866
27540
|
* @remarks Time O(size), Space O(size)
|
|
@@ -26026,6 +27700,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26026
27700
|
|
|
26027
27701
|
|
|
26028
27702
|
|
|
27703
|
+
|
|
27704
|
+
|
|
27705
|
+
|
|
27706
|
+
|
|
27707
|
+
|
|
27708
|
+
|
|
27709
|
+
|
|
27710
|
+
|
|
27711
|
+
|
|
27712
|
+
|
|
27713
|
+
|
|
27714
|
+
|
|
27715
|
+
|
|
27716
|
+
|
|
27717
|
+
|
|
26029
27718
|
|
|
26030
27719
|
|
|
26031
27720
|
|
|
@@ -26081,6 +27770,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26081
27770
|
|
|
26082
27771
|
|
|
26083
27772
|
|
|
27773
|
+
|
|
27774
|
+
|
|
27775
|
+
|
|
26084
27776
|
|
|
26085
27777
|
|
|
26086
27778
|
|
|
@@ -26124,6 +27816,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26124
27816
|
|
|
26125
27817
|
|
|
26126
27818
|
|
|
27819
|
+
|
|
27820
|
+
|
|
27821
|
+
|
|
26127
27822
|
|
|
26128
27823
|
|
|
26129
27824
|
|
|
@@ -26312,6 +28007,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26312
28007
|
|
|
26313
28008
|
|
|
26314
28009
|
|
|
28010
|
+
|
|
28011
|
+
|
|
28012
|
+
|
|
28013
|
+
|
|
28014
|
+
|
|
28015
|
+
|
|
28016
|
+
|
|
28017
|
+
|
|
28018
|
+
|
|
28019
|
+
|
|
28020
|
+
|
|
28021
|
+
|
|
28022
|
+
|
|
28023
|
+
|
|
28024
|
+
|
|
26315
28025
|
|
|
26316
28026
|
|
|
26317
28027
|
|
|
@@ -26370,6 +28080,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26370
28080
|
|
|
26371
28081
|
|
|
26372
28082
|
|
|
28083
|
+
|
|
28084
|
+
|
|
28085
|
+
|
|
26373
28086
|
|
|
26374
28087
|
|
|
26375
28088
|
|
|
@@ -26414,6 +28127,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26414
28127
|
|
|
26415
28128
|
|
|
26416
28129
|
|
|
28130
|
+
|
|
28131
|
+
|
|
28132
|
+
|
|
26417
28133
|
|
|
26418
28134
|
|
|
26419
28135
|
|
|
@@ -26458,6 +28174,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26458
28174
|
|
|
26459
28175
|
|
|
26460
28176
|
|
|
28177
|
+
|
|
28178
|
+
|
|
28179
|
+
|
|
26461
28180
|
|
|
26462
28181
|
|
|
26463
28182
|
|
|
@@ -26506,6 +28225,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26506
28225
|
|
|
26507
28226
|
|
|
26508
28227
|
|
|
28228
|
+
|
|
28229
|
+
|
|
28230
|
+
|
|
26509
28231
|
|
|
26510
28232
|
|
|
26511
28233
|
|
|
@@ -26655,6 +28377,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26655
28377
|
|
|
26656
28378
|
|
|
26657
28379
|
|
|
28380
|
+
|
|
28381
|
+
|
|
28382
|
+
|
|
28383
|
+
|
|
28384
|
+
|
|
28385
|
+
|
|
28386
|
+
|
|
28387
|
+
|
|
28388
|
+
|
|
28389
|
+
|
|
28390
|
+
|
|
28391
|
+
|
|
26658
28392
|
|
|
26659
28393
|
|
|
26660
28394
|
|
|
@@ -26812,6 +28546,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26812
28546
|
|
|
26813
28547
|
|
|
26814
28548
|
|
|
28549
|
+
|
|
28550
|
+
|
|
28551
|
+
|
|
28552
|
+
|
|
28553
|
+
|
|
28554
|
+
|
|
28555
|
+
|
|
28556
|
+
|
|
28557
|
+
|
|
28558
|
+
|
|
28559
|
+
|
|
28560
|
+
|
|
26815
28561
|
|
|
26816
28562
|
|
|
26817
28563
|
|
|
@@ -26969,6 +28715,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26969
28715
|
|
|
26970
28716
|
|
|
26971
28717
|
|
|
28718
|
+
|
|
28719
|
+
|
|
28720
|
+
|
|
28721
|
+
|
|
28722
|
+
|
|
28723
|
+
|
|
28724
|
+
|
|
28725
|
+
|
|
28726
|
+
|
|
28727
|
+
|
|
28728
|
+
|
|
28729
|
+
|
|
26972
28730
|
|
|
26973
28731
|
|
|
26974
28732
|
|
|
@@ -27125,6 +28883,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27125
28883
|
|
|
27126
28884
|
|
|
27127
28885
|
|
|
28886
|
+
|
|
28887
|
+
|
|
28888
|
+
|
|
28889
|
+
|
|
28890
|
+
|
|
28891
|
+
|
|
28892
|
+
|
|
28893
|
+
|
|
28894
|
+
|
|
28895
|
+
|
|
28896
|
+
|
|
28897
|
+
|
|
27128
28898
|
|
|
27129
28899
|
|
|
27130
28900
|
|
|
@@ -27316,6 +29086,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27316
29086
|
|
|
27317
29087
|
|
|
27318
29088
|
|
|
29089
|
+
|
|
29090
|
+
|
|
29091
|
+
|
|
29092
|
+
|
|
29093
|
+
|
|
29094
|
+
|
|
29095
|
+
|
|
29096
|
+
|
|
29097
|
+
|
|
29098
|
+
|
|
29099
|
+
|
|
29100
|
+
|
|
29101
|
+
|
|
29102
|
+
|
|
29103
|
+
|
|
27319
29104
|
|
|
27320
29105
|
|
|
27321
29106
|
|
|
@@ -27512,6 +29297,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27512
29297
|
|
|
27513
29298
|
|
|
27514
29299
|
|
|
29300
|
+
|
|
29301
|
+
|
|
29302
|
+
|
|
29303
|
+
|
|
29304
|
+
|
|
29305
|
+
|
|
29306
|
+
|
|
29307
|
+
|
|
29308
|
+
|
|
29309
|
+
|
|
29310
|
+
|
|
29311
|
+
|
|
29312
|
+
|
|
29313
|
+
|
|
29314
|
+
|
|
27515
29315
|
|
|
27516
29316
|
|
|
27517
29317
|
|
|
@@ -27715,6 +29515,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27715
29515
|
|
|
27716
29516
|
|
|
27717
29517
|
|
|
29518
|
+
|
|
29519
|
+
|
|
29520
|
+
|
|
29521
|
+
|
|
29522
|
+
|
|
29523
|
+
|
|
29524
|
+
|
|
29525
|
+
|
|
29526
|
+
|
|
29527
|
+
|
|
29528
|
+
|
|
29529
|
+
|
|
29530
|
+
|
|
29531
|
+
|
|
29532
|
+
|
|
27718
29533
|
|
|
27719
29534
|
|
|
27720
29535
|
|
|
@@ -27913,6 +29728,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27913
29728
|
|
|
27914
29729
|
|
|
27915
29730
|
|
|
29731
|
+
|
|
29732
|
+
|
|
29733
|
+
|
|
29734
|
+
|
|
29735
|
+
|
|
29736
|
+
|
|
29737
|
+
|
|
29738
|
+
|
|
29739
|
+
|
|
29740
|
+
|
|
29741
|
+
|
|
29742
|
+
|
|
29743
|
+
|
|
29744
|
+
|
|
29745
|
+
|
|
27916
29746
|
|
|
27917
29747
|
|
|
27918
29748
|
|
|
@@ -28146,6 +29976,12 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28146
29976
|
|
|
28147
29977
|
|
|
28148
29978
|
|
|
29979
|
+
|
|
29980
|
+
|
|
29981
|
+
|
|
29982
|
+
|
|
29983
|
+
|
|
29984
|
+
|
|
28149
29985
|
* @example
|
|
28150
29986
|
* // Pagination by position in tree order
|
|
28151
29987
|
* const tree = new TreeMultiSet<number>(
|
|
@@ -28184,6 +30020,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28184
30020
|
|
|
28185
30021
|
|
|
28186
30022
|
|
|
30023
|
+
|
|
30024
|
+
|
|
30025
|
+
|
|
30026
|
+
|
|
30027
|
+
|
|
30028
|
+
|
|
30029
|
+
|
|
30030
|
+
|
|
30031
|
+
|
|
30032
|
+
|
|
30033
|
+
|
|
30034
|
+
|
|
30035
|
+
|
|
30036
|
+
|
|
30037
|
+
|
|
28187
30038
|
|
|
28188
30039
|
|
|
28189
30040
|
|
|
@@ -28341,6 +30192,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28341
30192
|
|
|
28342
30193
|
|
|
28343
30194
|
|
|
30195
|
+
|
|
30196
|
+
|
|
30197
|
+
|
|
30198
|
+
|
|
30199
|
+
|
|
30200
|
+
|
|
30201
|
+
|
|
30202
|
+
|
|
30203
|
+
|
|
30204
|
+
|
|
30205
|
+
|
|
30206
|
+
|
|
28344
30207
|
|
|
28345
30208
|
|
|
28346
30209
|
|
|
@@ -28533,6 +30396,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28533
30396
|
|
|
28534
30397
|
|
|
28535
30398
|
|
|
30399
|
+
|
|
30400
|
+
|
|
30401
|
+
|
|
30402
|
+
|
|
30403
|
+
|
|
30404
|
+
|
|
30405
|
+
|
|
30406
|
+
|
|
30407
|
+
|
|
30408
|
+
|
|
30409
|
+
|
|
30410
|
+
|
|
30411
|
+
|
|
30412
|
+
|
|
30413
|
+
|
|
28536
30414
|
|
|
28537
30415
|
|
|
28538
30416
|
|