data-structure-typed 2.5.3 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/LinkedHashMap.md +14 -10
- package/jest.integration.config.js +1 -2
- package/package.json +9 -7
- package/src/data-structures/base/iterable-element-base.ts +32 -0
- package/src/data-structures/base/linear-base.ts +11 -0
- package/src/data-structures/binary-tree/avl-tree.ts +36 -0
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +42 -0
- package/src/data-structures/binary-tree/binary-tree.ts +75 -0
- package/src/data-structures/binary-tree/bst.ts +72 -0
- package/src/data-structures/binary-tree/red-black-tree.ts +57 -0
- package/src/data-structures/binary-tree/segment-tree.ts +18 -0
- package/src/data-structures/binary-tree/tree-map.ts +375 -0
- package/src/data-structures/binary-tree/tree-multi-map.ts +392 -0
- package/src/data-structures/binary-tree/tree-multi-set.ts +336 -0
- package/src/data-structures/binary-tree/tree-set.ts +492 -0
- package/src/data-structures/graph/directed-graph.ts +30 -0
- package/src/data-structures/graph/undirected-graph.ts +27 -0
- package/src/data-structures/hash/hash-map.ts +33 -0
- package/src/data-structures/heap/heap.ts +42 -0
- package/src/data-structures/linked-list/doubly-linked-list.ts +90 -2
- package/src/data-structures/linked-list/singly-linked-list.ts +45 -0
- package/src/data-structures/linked-list/skip-linked-list.ts +54 -0
- package/src/data-structures/matrix/matrix.ts +24 -0
- package/src/data-structures/queue/deque.ts +103 -1
- package/src/data-structures/queue/queue.ts +36 -0
- package/src/data-structures/stack/stack.ts +30 -0
- package/src/data-structures/trie/trie.ts +36 -0
|
@@ -264,6 +264,35 @@ var _IterableElementBase = class _IterableElementBase {
|
|
|
264
264
|
for (const ele of this) if (ele === element) return true;
|
|
265
265
|
return false;
|
|
266
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Check whether a value exists (Array-compatible alias for `has`).
|
|
269
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1).
|
|
270
|
+
* @param element - Element to search for (uses `===`).
|
|
271
|
+
* @returns `true` if found.
|
|
272
|
+
*/
|
|
273
|
+
includes(element) {
|
|
274
|
+
return this.has(element);
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Return an iterator of `[index, value]` pairs (Array-compatible).
|
|
278
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1) per step.
|
|
279
|
+
*/
|
|
280
|
+
*entries() {
|
|
281
|
+
let index = 0;
|
|
282
|
+
for (const value of this) {
|
|
283
|
+
yield [index++, value];
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Return an iterator of numeric indices (Array-compatible).
|
|
288
|
+
* @remarks Provided for familiarity when migrating from Array. Time O(n), Space O(1) per step.
|
|
289
|
+
*/
|
|
290
|
+
*keys() {
|
|
291
|
+
let index = 0;
|
|
292
|
+
for (const _ of this) {
|
|
293
|
+
yield index++;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
267
296
|
/**
|
|
268
297
|
* Reduces all elements to a single accumulated value.
|
|
269
298
|
*
|
|
@@ -525,6 +554,16 @@ var _LinearBase = class _LinearBase extends IterableElementBase {
|
|
|
525
554
|
}
|
|
526
555
|
return this;
|
|
527
556
|
}
|
|
557
|
+
/**
|
|
558
|
+
* Return a new instance of the same type with elements in reverse order (non-mutating).
|
|
559
|
+
* @remarks Provided for familiarity when migrating from Array (ES2023 `toReversed`). Time O(n), Space O(n).
|
|
560
|
+
* @returns A new reversed instance.
|
|
561
|
+
*/
|
|
562
|
+
toReversed() {
|
|
563
|
+
const cloned = this.clone();
|
|
564
|
+
cloned.reverse();
|
|
565
|
+
return cloned;
|
|
566
|
+
}
|
|
528
567
|
};
|
|
529
568
|
__name(_LinearBase, "LinearBase");
|
|
530
569
|
var LinearBase = _LinearBase;
|
|
@@ -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
|
|
|
@@ -2057,6 +2132,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2057
2132
|
|
|
2058
2133
|
|
|
2059
2134
|
|
|
2135
|
+
|
|
2136
|
+
|
|
2137
|
+
|
|
2060
2138
|
|
|
2061
2139
|
|
|
2062
2140
|
|
|
@@ -2115,6 +2193,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2115
2193
|
|
|
2116
2194
|
|
|
2117
2195
|
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
|
|
2118
2199
|
|
|
2119
2200
|
|
|
2120
2201
|
|
|
@@ -2225,6 +2306,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2225
2306
|
|
|
2226
2307
|
|
|
2227
2308
|
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
|
|
2228
2312
|
|
|
2229
2313
|
|
|
2230
2314
|
|
|
@@ -2271,6 +2355,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2271
2355
|
|
|
2272
2356
|
|
|
2273
2357
|
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
|
|
2274
2361
|
|
|
2275
2362
|
|
|
2276
2363
|
|
|
@@ -2338,6 +2425,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2338
2425
|
|
|
2339
2426
|
|
|
2340
2427
|
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
|
|
2341
2431
|
|
|
2342
2432
|
|
|
2343
2433
|
|
|
@@ -2444,6 +2534,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2444
2534
|
|
|
2445
2535
|
|
|
2446
2536
|
|
|
2537
|
+
|
|
2538
|
+
|
|
2539
|
+
|
|
2447
2540
|
|
|
2448
2541
|
|
|
2449
2542
|
|
|
@@ -2548,6 +2641,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2548
2641
|
|
|
2549
2642
|
|
|
2550
2643
|
|
|
2644
|
+
|
|
2645
|
+
|
|
2646
|
+
|
|
2551
2647
|
|
|
2552
2648
|
|
|
2553
2649
|
|
|
@@ -2610,6 +2706,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2610
2706
|
|
|
2611
2707
|
|
|
2612
2708
|
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
|
|
2613
2712
|
|
|
2614
2713
|
|
|
2615
2714
|
|
|
@@ -2675,6 +2774,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2675
2774
|
|
|
2676
2775
|
|
|
2677
2776
|
|
|
2777
|
+
|
|
2778
|
+
|
|
2779
|
+
|
|
2678
2780
|
|
|
2679
2781
|
|
|
2680
2782
|
|
|
@@ -2727,6 +2829,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2727
2829
|
|
|
2728
2830
|
|
|
2729
2831
|
|
|
2832
|
+
|
|
2833
|
+
|
|
2834
|
+
|
|
2730
2835
|
|
|
2731
2836
|
|
|
2732
2837
|
|
|
@@ -2788,6 +2893,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2788
2893
|
|
|
2789
2894
|
|
|
2790
2895
|
|
|
2896
|
+
|
|
2897
|
+
|
|
2898
|
+
|
|
2791
2899
|
|
|
2792
2900
|
|
|
2793
2901
|
|
|
@@ -2876,6 +2984,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2876
2984
|
|
|
2877
2985
|
|
|
2878
2986
|
|
|
2987
|
+
|
|
2988
|
+
|
|
2989
|
+
|
|
2879
2990
|
|
|
2880
2991
|
|
|
2881
2992
|
|
|
@@ -2941,6 +3052,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2941
3052
|
|
|
2942
3053
|
|
|
2943
3054
|
|
|
3055
|
+
|
|
3056
|
+
|
|
3057
|
+
|
|
2944
3058
|
|
|
2945
3059
|
|
|
2946
3060
|
|
|
@@ -3422,6 +3536,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3422
3536
|
|
|
3423
3537
|
|
|
3424
3538
|
|
|
3539
|
+
|
|
3540
|
+
|
|
3541
|
+
|
|
3425
3542
|
|
|
3426
3543
|
|
|
3427
3544
|
|
|
@@ -3478,6 +3595,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3478
3595
|
|
|
3479
3596
|
|
|
3480
3597
|
|
|
3598
|
+
|
|
3599
|
+
|
|
3600
|
+
|
|
3481
3601
|
|
|
3482
3602
|
|
|
3483
3603
|
|
|
@@ -3538,6 +3658,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3538
3658
|
|
|
3539
3659
|
|
|
3540
3660
|
|
|
3661
|
+
|
|
3662
|
+
|
|
3663
|
+
|
|
3541
3664
|
|
|
3542
3665
|
|
|
3543
3666
|
|
|
@@ -3623,6 +3746,9 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3623
3746
|
|
|
3624
3747
|
|
|
3625
3748
|
|
|
3749
|
+
|
|
3750
|
+
|
|
3751
|
+
|
|
3626
3752
|
|
|
3627
3753
|
|
|
3628
3754
|
|
|
@@ -4444,6 +4570,12 @@ var _BST = class _BST extends BinaryTree {
|
|
|
4444
4570
|
|
|
4445
4571
|
|
|
4446
4572
|
|
|
4573
|
+
|
|
4574
|
+
|
|
4575
|
+
|
|
4576
|
+
|
|
4577
|
+
|
|
4578
|
+
|
|
4447
4579
|
|
|
4448
4580
|
|
|
4449
4581
|
|
|
@@ -4791,6 +4923,15 @@ var _BST = class _BST extends BinaryTree {
|
|
|
4791
4923
|
|
|
4792
4924
|
|
|
4793
4925
|
|
|
4926
|
+
|
|
4927
|
+
|
|
4928
|
+
|
|
4929
|
+
|
|
4930
|
+
|
|
4931
|
+
|
|
4932
|
+
|
|
4933
|
+
|
|
4934
|
+
|
|
4794
4935
|
|
|
4795
4936
|
|
|
4796
4937
|
|
|
@@ -4917,6 +5058,12 @@ var _BST = class _BST extends BinaryTree {
|
|
|
4917
5058
|
|
|
4918
5059
|
|
|
4919
5060
|
|
|
5061
|
+
|
|
5062
|
+
|
|
5063
|
+
|
|
5064
|
+
|
|
5065
|
+
|
|
5066
|
+
|
|
4920
5067
|
|
|
4921
5068
|
|
|
4922
5069
|
|
|
@@ -5211,6 +5358,9 @@ var _BST = class _BST extends BinaryTree {
|
|
|
5211
5358
|
|
|
5212
5359
|
|
|
5213
5360
|
|
|
5361
|
+
|
|
5362
|
+
|
|
5363
|
+
|
|
5214
5364
|
|
|
5215
5365
|
|
|
5216
5366
|
|
|
@@ -5284,6 +5434,9 @@ var _BST = class _BST extends BinaryTree {
|
|
|
5284
5434
|
|
|
5285
5435
|
|
|
5286
5436
|
|
|
5437
|
+
|
|
5438
|
+
|
|
5439
|
+
|
|
5287
5440
|
|
|
5288
5441
|
|
|
5289
5442
|
|
|
@@ -5411,6 +5564,12 @@ var _BST = class _BST extends BinaryTree {
|
|
|
5411
5564
|
|
|
5412
5565
|
|
|
5413
5566
|
|
|
5567
|
+
|
|
5568
|
+
|
|
5569
|
+
|
|
5570
|
+
|
|
5571
|
+
|
|
5572
|
+
|
|
5414
5573
|
|
|
5415
5574
|
|
|
5416
5575
|
|
|
@@ -6113,6 +6272,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6113
6272
|
|
|
6114
6273
|
|
|
6115
6274
|
|
|
6275
|
+
|
|
6276
|
+
|
|
6277
|
+
|
|
6278
|
+
|
|
6279
|
+
|
|
6280
|
+
|
|
6116
6281
|
|
|
6117
6282
|
|
|
6118
6283
|
|
|
@@ -6197,6 +6362,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6197
6362
|
|
|
6198
6363
|
|
|
6199
6364
|
|
|
6365
|
+
|
|
6366
|
+
|
|
6367
|
+
|
|
6368
|
+
|
|
6369
|
+
|
|
6370
|
+
|
|
6200
6371
|
|
|
6201
6372
|
|
|
6202
6373
|
|
|
@@ -6281,6 +6452,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6281
6452
|
|
|
6282
6453
|
|
|
6283
6454
|
|
|
6455
|
+
|
|
6456
|
+
|
|
6457
|
+
|
|
6458
|
+
|
|
6459
|
+
|
|
6460
|
+
|
|
6284
6461
|
|
|
6285
6462
|
|
|
6286
6463
|
|
|
@@ -6365,6 +6542,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6365
6542
|
|
|
6366
6543
|
|
|
6367
6544
|
|
|
6545
|
+
|
|
6546
|
+
|
|
6547
|
+
|
|
6548
|
+
|
|
6549
|
+
|
|
6550
|
+
|
|
6368
6551
|
|
|
6369
6552
|
|
|
6370
6553
|
|
|
@@ -6447,6 +6630,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6447
6630
|
|
|
6448
6631
|
|
|
6449
6632
|
|
|
6633
|
+
|
|
6634
|
+
|
|
6635
|
+
|
|
6636
|
+
|
|
6637
|
+
|
|
6638
|
+
|
|
6450
6639
|
|
|
6451
6640
|
|
|
6452
6641
|
|
|
@@ -6536,6 +6725,12 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6536
6725
|
|
|
6537
6726
|
|
|
6538
6727
|
|
|
6728
|
+
|
|
6729
|
+
|
|
6730
|
+
|
|
6731
|
+
|
|
6732
|
+
|
|
6733
|
+
|
|
6539
6734
|
|
|
6540
6735
|
|
|
6541
6736
|
|
|
@@ -6593,6 +6788,9 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6593
6788
|
|
|
6594
6789
|
|
|
6595
6790
|
|
|
6791
|
+
|
|
6792
|
+
|
|
6793
|
+
|
|
6596
6794
|
|
|
6597
6795
|
|
|
6598
6796
|
|
|
@@ -6658,6 +6856,9 @@ var _BinaryIndexedTree = class _BinaryIndexedTree {
|
|
|
6658
6856
|
|
|
6659
6857
|
|
|
6660
6858
|
|
|
6859
|
+
|
|
6860
|
+
|
|
6861
|
+
|
|
6661
6862
|
|
|
6662
6863
|
|
|
6663
6864
|
|
|
@@ -6825,6 +7026,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
6825
7026
|
|
|
6826
7027
|
|
|
6827
7028
|
|
|
7029
|
+
|
|
7030
|
+
|
|
7031
|
+
|
|
6828
7032
|
|
|
6829
7033
|
|
|
6830
7034
|
|
|
@@ -6901,6 +7105,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
6901
7105
|
|
|
6902
7106
|
|
|
6903
7107
|
|
|
7108
|
+
|
|
7109
|
+
|
|
7110
|
+
|
|
6904
7111
|
|
|
6905
7112
|
|
|
6906
7113
|
|
|
@@ -6971,6 +7178,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
6971
7178
|
|
|
6972
7179
|
|
|
6973
7180
|
|
|
7181
|
+
|
|
7182
|
+
|
|
7183
|
+
|
|
6974
7184
|
|
|
6975
7185
|
|
|
6976
7186
|
|
|
@@ -7048,6 +7258,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
7048
7258
|
|
|
7049
7259
|
|
|
7050
7260
|
|
|
7261
|
+
|
|
7262
|
+
|
|
7263
|
+
|
|
7051
7264
|
|
|
7052
7265
|
|
|
7053
7266
|
|
|
@@ -7103,6 +7316,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
7103
7316
|
|
|
7104
7317
|
|
|
7105
7318
|
|
|
7319
|
+
|
|
7320
|
+
|
|
7321
|
+
|
|
7106
7322
|
|
|
7107
7323
|
|
|
7108
7324
|
|
|
@@ -7184,6 +7400,9 @@ var _SegmentTree = class _SegmentTree {
|
|
|
7184
7400
|
|
|
7185
7401
|
|
|
7186
7402
|
|
|
7403
|
+
|
|
7404
|
+
|
|
7405
|
+
|
|
7187
7406
|
|
|
7188
7407
|
|
|
7189
7408
|
|
|
@@ -7586,6 +7805,18 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7586
7805
|
|
|
7587
7806
|
|
|
7588
7807
|
|
|
7808
|
+
|
|
7809
|
+
|
|
7810
|
+
|
|
7811
|
+
|
|
7812
|
+
|
|
7813
|
+
|
|
7814
|
+
|
|
7815
|
+
|
|
7816
|
+
|
|
7817
|
+
|
|
7818
|
+
|
|
7819
|
+
|
|
7589
7820
|
|
|
7590
7821
|
|
|
7591
7822
|
|
|
@@ -7725,6 +7956,15 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7725
7956
|
|
|
7726
7957
|
|
|
7727
7958
|
|
|
7959
|
+
|
|
7960
|
+
|
|
7961
|
+
|
|
7962
|
+
|
|
7963
|
+
|
|
7964
|
+
|
|
7965
|
+
|
|
7966
|
+
|
|
7967
|
+
|
|
7728
7968
|
|
|
7729
7969
|
|
|
7730
7970
|
|
|
@@ -7819,6 +8059,12 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7819
8059
|
|
|
7820
8060
|
|
|
7821
8061
|
|
|
8062
|
+
|
|
8063
|
+
|
|
8064
|
+
|
|
8065
|
+
|
|
8066
|
+
|
|
8067
|
+
|
|
7822
8068
|
|
|
7823
8069
|
|
|
7824
8070
|
|
|
@@ -7964,6 +8210,15 @@ var _AVLTree = class _AVLTree extends BST {
|
|
|
7964
8210
|
|
|
7965
8211
|
|
|
7966
8212
|
|
|
8213
|
+
|
|
8214
|
+
|
|
8215
|
+
|
|
8216
|
+
|
|
8217
|
+
|
|
8218
|
+
|
|
8219
|
+
|
|
8220
|
+
|
|
8221
|
+
|
|
7967
8222
|
|
|
7968
8223
|
|
|
7969
8224
|
|
|
@@ -8597,6 +8852,18 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
8597
8852
|
|
|
8598
8853
|
|
|
8599
8854
|
|
|
8855
|
+
|
|
8856
|
+
|
|
8857
|
+
|
|
8858
|
+
|
|
8859
|
+
|
|
8860
|
+
|
|
8861
|
+
|
|
8862
|
+
|
|
8863
|
+
|
|
8864
|
+
|
|
8865
|
+
|
|
8866
|
+
|
|
8600
8867
|
|
|
8601
8868
|
|
|
8602
8869
|
|
|
@@ -9104,16 +9371,28 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9104
9371
|
|
|
9105
9372
|
|
|
9106
9373
|
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9374
|
+
|
|
9375
|
+
|
|
9376
|
+
|
|
9377
|
+
|
|
9378
|
+
|
|
9379
|
+
|
|
9380
|
+
|
|
9381
|
+
|
|
9382
|
+
|
|
9383
|
+
|
|
9384
|
+
|
|
9385
|
+
|
|
9386
|
+
* @example
|
|
9387
|
+
* // basic Red-Black Tree with simple number keys
|
|
9388
|
+
* // Create a simple Red-Black Tree with numeric keys
|
|
9389
|
+
* const tree = new RedBlackTree([5, 2, 8, 1, 9]);
|
|
9390
|
+
*
|
|
9391
|
+
* tree.print();
|
|
9392
|
+
* // _2___
|
|
9393
|
+
* // / \
|
|
9394
|
+
* // 1 _8_
|
|
9395
|
+
* // / \
|
|
9117
9396
|
* // 5 9
|
|
9118
9397
|
*
|
|
9119
9398
|
* // Verify the tree maintains sorted order
|
|
@@ -9306,6 +9585,18 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9306
9585
|
|
|
9307
9586
|
|
|
9308
9587
|
|
|
9588
|
+
|
|
9589
|
+
|
|
9590
|
+
|
|
9591
|
+
|
|
9592
|
+
|
|
9593
|
+
|
|
9594
|
+
|
|
9595
|
+
|
|
9596
|
+
|
|
9597
|
+
|
|
9598
|
+
|
|
9599
|
+
|
|
9309
9600
|
|
|
9310
9601
|
|
|
9311
9602
|
|
|
@@ -9505,6 +9796,15 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9505
9796
|
|
|
9506
9797
|
|
|
9507
9798
|
|
|
9799
|
+
|
|
9800
|
+
|
|
9801
|
+
|
|
9802
|
+
|
|
9803
|
+
|
|
9804
|
+
|
|
9805
|
+
|
|
9806
|
+
|
|
9807
|
+
|
|
9508
9808
|
|
|
9509
9809
|
|
|
9510
9810
|
|
|
@@ -9670,6 +9970,18 @@ var _RedBlackTree = class _RedBlackTree extends BST {
|
|
|
9670
9970
|
|
|
9671
9971
|
|
|
9672
9972
|
|
|
9973
|
+
|
|
9974
|
+
|
|
9975
|
+
|
|
9976
|
+
|
|
9977
|
+
|
|
9978
|
+
|
|
9979
|
+
|
|
9980
|
+
|
|
9981
|
+
|
|
9982
|
+
|
|
9983
|
+
|
|
9984
|
+
|
|
9673
9985
|
|
|
9674
9986
|
|
|
9675
9987
|
|
|
@@ -10206,6 +10518,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10206
10518
|
|
|
10207
10519
|
|
|
10208
10520
|
|
|
10521
|
+
|
|
10522
|
+
|
|
10523
|
+
|
|
10524
|
+
|
|
10525
|
+
|
|
10526
|
+
|
|
10527
|
+
|
|
10528
|
+
|
|
10529
|
+
|
|
10530
|
+
|
|
10531
|
+
|
|
10532
|
+
|
|
10533
|
+
|
|
10534
|
+
|
|
10535
|
+
|
|
10209
10536
|
|
|
10210
10537
|
|
|
10211
10538
|
|
|
@@ -10410,6 +10737,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10410
10737
|
|
|
10411
10738
|
|
|
10412
10739
|
|
|
10740
|
+
|
|
10741
|
+
|
|
10742
|
+
|
|
10743
|
+
|
|
10744
|
+
|
|
10745
|
+
|
|
10746
|
+
|
|
10747
|
+
|
|
10748
|
+
|
|
10749
|
+
|
|
10750
|
+
|
|
10751
|
+
|
|
10752
|
+
|
|
10753
|
+
|
|
10754
|
+
|
|
10413
10755
|
|
|
10414
10756
|
|
|
10415
10757
|
|
|
@@ -10455,6 +10797,18 @@ var _TreeSet = class _TreeSet {
|
|
|
10455
10797
|
|
|
10456
10798
|
|
|
10457
10799
|
|
|
10800
|
+
|
|
10801
|
+
|
|
10802
|
+
|
|
10803
|
+
|
|
10804
|
+
|
|
10805
|
+
|
|
10806
|
+
|
|
10807
|
+
|
|
10808
|
+
|
|
10809
|
+
|
|
10810
|
+
|
|
10811
|
+
|
|
10458
10812
|
|
|
10459
10813
|
|
|
10460
10814
|
|
|
@@ -10654,6 +11008,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10654
11008
|
|
|
10655
11009
|
|
|
10656
11010
|
|
|
11011
|
+
|
|
11012
|
+
|
|
11013
|
+
|
|
11014
|
+
|
|
11015
|
+
|
|
11016
|
+
|
|
11017
|
+
|
|
11018
|
+
|
|
11019
|
+
|
|
11020
|
+
|
|
11021
|
+
|
|
11022
|
+
|
|
11023
|
+
|
|
11024
|
+
|
|
11025
|
+
|
|
10657
11026
|
|
|
10658
11027
|
|
|
10659
11028
|
|
|
@@ -10858,6 +11227,21 @@ var _TreeSet = class _TreeSet {
|
|
|
10858
11227
|
|
|
10859
11228
|
|
|
10860
11229
|
|
|
11230
|
+
|
|
11231
|
+
|
|
11232
|
+
|
|
11233
|
+
|
|
11234
|
+
|
|
11235
|
+
|
|
11236
|
+
|
|
11237
|
+
|
|
11238
|
+
|
|
11239
|
+
|
|
11240
|
+
|
|
11241
|
+
|
|
11242
|
+
|
|
11243
|
+
|
|
11244
|
+
|
|
10861
11245
|
|
|
10862
11246
|
|
|
10863
11247
|
|
|
@@ -11067,6 +11451,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11067
11451
|
|
|
11068
11452
|
|
|
11069
11453
|
|
|
11454
|
+
|
|
11455
|
+
|
|
11456
|
+
|
|
11457
|
+
|
|
11458
|
+
|
|
11459
|
+
|
|
11460
|
+
|
|
11461
|
+
|
|
11462
|
+
|
|
11463
|
+
|
|
11464
|
+
|
|
11465
|
+
|
|
11466
|
+
|
|
11467
|
+
|
|
11468
|
+
|
|
11070
11469
|
|
|
11071
11470
|
|
|
11072
11471
|
|
|
@@ -11256,6 +11655,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11256
11655
|
|
|
11257
11656
|
|
|
11258
11657
|
|
|
11658
|
+
|
|
11659
|
+
|
|
11660
|
+
|
|
11661
|
+
|
|
11662
|
+
|
|
11663
|
+
|
|
11664
|
+
|
|
11665
|
+
|
|
11666
|
+
|
|
11667
|
+
|
|
11668
|
+
|
|
11669
|
+
|
|
11670
|
+
|
|
11671
|
+
|
|
11672
|
+
|
|
11259
11673
|
|
|
11260
11674
|
|
|
11261
11675
|
|
|
@@ -11446,6 +11860,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11446
11860
|
|
|
11447
11861
|
|
|
11448
11862
|
|
|
11863
|
+
|
|
11864
|
+
|
|
11865
|
+
|
|
11866
|
+
|
|
11867
|
+
|
|
11868
|
+
|
|
11869
|
+
|
|
11870
|
+
|
|
11871
|
+
|
|
11872
|
+
|
|
11873
|
+
|
|
11874
|
+
|
|
11875
|
+
|
|
11876
|
+
|
|
11877
|
+
|
|
11449
11878
|
|
|
11450
11879
|
|
|
11451
11880
|
|
|
@@ -11636,6 +12065,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11636
12065
|
|
|
11637
12066
|
|
|
11638
12067
|
|
|
12068
|
+
|
|
12069
|
+
|
|
12070
|
+
|
|
12071
|
+
|
|
12072
|
+
|
|
12073
|
+
|
|
12074
|
+
|
|
12075
|
+
|
|
12076
|
+
|
|
12077
|
+
|
|
12078
|
+
|
|
12079
|
+
|
|
12080
|
+
|
|
12081
|
+
|
|
12082
|
+
|
|
11639
12083
|
|
|
11640
12084
|
|
|
11641
12085
|
|
|
@@ -11829,6 +12273,21 @@ var _TreeSet = class _TreeSet {
|
|
|
11829
12273
|
|
|
11830
12274
|
|
|
11831
12275
|
|
|
12276
|
+
|
|
12277
|
+
|
|
12278
|
+
|
|
12279
|
+
|
|
12280
|
+
|
|
12281
|
+
|
|
12282
|
+
|
|
12283
|
+
|
|
12284
|
+
|
|
12285
|
+
|
|
12286
|
+
|
|
12287
|
+
|
|
12288
|
+
|
|
12289
|
+
|
|
12290
|
+
|
|
11832
12291
|
|
|
11833
12292
|
|
|
11834
12293
|
|
|
@@ -12022,6 +12481,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12022
12481
|
|
|
12023
12482
|
|
|
12024
12483
|
|
|
12484
|
+
|
|
12485
|
+
|
|
12486
|
+
|
|
12487
|
+
|
|
12488
|
+
|
|
12489
|
+
|
|
12490
|
+
|
|
12491
|
+
|
|
12492
|
+
|
|
12493
|
+
|
|
12494
|
+
|
|
12495
|
+
|
|
12496
|
+
|
|
12497
|
+
|
|
12498
|
+
|
|
12025
12499
|
|
|
12026
12500
|
|
|
12027
12501
|
|
|
@@ -12218,6 +12692,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12218
12692
|
|
|
12219
12693
|
|
|
12220
12694
|
|
|
12695
|
+
|
|
12696
|
+
|
|
12697
|
+
|
|
12698
|
+
|
|
12699
|
+
|
|
12700
|
+
|
|
12701
|
+
|
|
12702
|
+
|
|
12703
|
+
|
|
12704
|
+
|
|
12705
|
+
|
|
12706
|
+
|
|
12707
|
+
|
|
12708
|
+
|
|
12709
|
+
|
|
12221
12710
|
|
|
12222
12711
|
|
|
12223
12712
|
|
|
@@ -12414,6 +12903,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12414
12903
|
|
|
12415
12904
|
|
|
12416
12905
|
|
|
12906
|
+
|
|
12907
|
+
|
|
12908
|
+
|
|
12909
|
+
|
|
12910
|
+
|
|
12911
|
+
|
|
12912
|
+
|
|
12913
|
+
|
|
12914
|
+
|
|
12915
|
+
|
|
12916
|
+
|
|
12917
|
+
|
|
12918
|
+
|
|
12919
|
+
|
|
12920
|
+
|
|
12417
12921
|
|
|
12418
12922
|
|
|
12419
12923
|
|
|
@@ -12621,15 +13125,30 @@ var _TreeSet = class _TreeSet {
|
|
|
12621
13125
|
|
|
12622
13126
|
|
|
12623
13127
|
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
13128
|
+
|
|
13129
|
+
|
|
13130
|
+
|
|
13131
|
+
|
|
13132
|
+
|
|
13133
|
+
|
|
13134
|
+
|
|
13135
|
+
|
|
13136
|
+
|
|
13137
|
+
|
|
13138
|
+
|
|
13139
|
+
|
|
13140
|
+
|
|
13141
|
+
|
|
13142
|
+
|
|
13143
|
+
* @example
|
|
13144
|
+
* // Test all
|
|
13145
|
+
* const ts = new TreeSet<number>([2, 4, 6]);
|
|
13146
|
+
* console.log(ts.every(k => k > 0)); // true;
|
|
13147
|
+
*/
|
|
13148
|
+
every(callbackfn, thisArg) {
|
|
13149
|
+
let index = 0;
|
|
13150
|
+
for (const v of this) {
|
|
13151
|
+
const ok = thisArg === void 0 ? callbackfn(v, index++, this) : callbackfn.call(thisArg, v, index++, this);
|
|
12633
13152
|
if (!ok) return false;
|
|
12634
13153
|
}
|
|
12635
13154
|
return true;
|
|
@@ -12797,6 +13316,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12797
13316
|
|
|
12798
13317
|
|
|
12799
13318
|
|
|
13319
|
+
|
|
13320
|
+
|
|
13321
|
+
|
|
13322
|
+
|
|
13323
|
+
|
|
13324
|
+
|
|
13325
|
+
|
|
13326
|
+
|
|
13327
|
+
|
|
13328
|
+
|
|
13329
|
+
|
|
13330
|
+
|
|
13331
|
+
|
|
13332
|
+
|
|
13333
|
+
|
|
12800
13334
|
|
|
12801
13335
|
|
|
12802
13336
|
|
|
@@ -12989,6 +13523,21 @@ var _TreeSet = class _TreeSet {
|
|
|
12989
13523
|
|
|
12990
13524
|
|
|
12991
13525
|
|
|
13526
|
+
|
|
13527
|
+
|
|
13528
|
+
|
|
13529
|
+
|
|
13530
|
+
|
|
13531
|
+
|
|
13532
|
+
|
|
13533
|
+
|
|
13534
|
+
|
|
13535
|
+
|
|
13536
|
+
|
|
13537
|
+
|
|
13538
|
+
|
|
13539
|
+
|
|
13540
|
+
|
|
12992
13541
|
|
|
12993
13542
|
|
|
12994
13543
|
|
|
@@ -13184,6 +13733,21 @@ var _TreeSet = class _TreeSet {
|
|
|
13184
13733
|
|
|
13185
13734
|
|
|
13186
13735
|
|
|
13736
|
+
|
|
13737
|
+
|
|
13738
|
+
|
|
13739
|
+
|
|
13740
|
+
|
|
13741
|
+
|
|
13742
|
+
|
|
13743
|
+
|
|
13744
|
+
|
|
13745
|
+
|
|
13746
|
+
|
|
13747
|
+
|
|
13748
|
+
|
|
13749
|
+
|
|
13750
|
+
|
|
13187
13751
|
|
|
13188
13752
|
|
|
13189
13753
|
|
|
@@ -13373,6 +13937,21 @@ var _TreeSet = class _TreeSet {
|
|
|
13373
13937
|
|
|
13374
13938
|
|
|
13375
13939
|
|
|
13940
|
+
|
|
13941
|
+
|
|
13942
|
+
|
|
13943
|
+
|
|
13944
|
+
|
|
13945
|
+
|
|
13946
|
+
|
|
13947
|
+
|
|
13948
|
+
|
|
13949
|
+
|
|
13950
|
+
|
|
13951
|
+
|
|
13952
|
+
|
|
13953
|
+
|
|
13954
|
+
|
|
13376
13955
|
|
|
13377
13956
|
|
|
13378
13957
|
|
|
@@ -13435,6 +14014,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13435
14014
|
|
|
13436
14015
|
|
|
13437
14016
|
|
|
14017
|
+
|
|
14018
|
+
|
|
14019
|
+
|
|
13438
14020
|
|
|
13439
14021
|
|
|
13440
14022
|
|
|
@@ -13507,6 +14089,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13507
14089
|
|
|
13508
14090
|
|
|
13509
14091
|
|
|
14092
|
+
|
|
14093
|
+
|
|
14094
|
+
|
|
13510
14095
|
|
|
13511
14096
|
|
|
13512
14097
|
|
|
@@ -13557,6 +14142,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13557
14142
|
|
|
13558
14143
|
|
|
13559
14144
|
|
|
14145
|
+
|
|
14146
|
+
|
|
14147
|
+
|
|
13560
14148
|
|
|
13561
14149
|
|
|
13562
14150
|
|
|
@@ -13612,6 +14200,9 @@ var _TreeSet = class _TreeSet {
|
|
|
13612
14200
|
|
|
13613
14201
|
|
|
13614
14202
|
|
|
14203
|
+
|
|
14204
|
+
|
|
14205
|
+
|
|
13615
14206
|
|
|
13616
14207
|
|
|
13617
14208
|
|
|
@@ -13768,6 +14359,18 @@ var _TreeSet = class _TreeSet {
|
|
|
13768
14359
|
|
|
13769
14360
|
|
|
13770
14361
|
|
|
14362
|
+
|
|
14363
|
+
|
|
14364
|
+
|
|
14365
|
+
|
|
14366
|
+
|
|
14367
|
+
|
|
14368
|
+
|
|
14369
|
+
|
|
14370
|
+
|
|
14371
|
+
|
|
14372
|
+
|
|
14373
|
+
|
|
13771
14374
|
|
|
13772
14375
|
|
|
13773
14376
|
|
|
@@ -13941,6 +14544,18 @@ var _TreeSet = class _TreeSet {
|
|
|
13941
14544
|
|
|
13942
14545
|
|
|
13943
14546
|
|
|
14547
|
+
|
|
14548
|
+
|
|
14549
|
+
|
|
14550
|
+
|
|
14551
|
+
|
|
14552
|
+
|
|
14553
|
+
|
|
14554
|
+
|
|
14555
|
+
|
|
14556
|
+
|
|
14557
|
+
|
|
14558
|
+
|
|
13944
14559
|
|
|
13945
14560
|
|
|
13946
14561
|
|
|
@@ -14106,6 +14721,18 @@ var _TreeSet = class _TreeSet {
|
|
|
14106
14721
|
|
|
14107
14722
|
|
|
14108
14723
|
|
|
14724
|
+
|
|
14725
|
+
|
|
14726
|
+
|
|
14727
|
+
|
|
14728
|
+
|
|
14729
|
+
|
|
14730
|
+
|
|
14731
|
+
|
|
14732
|
+
|
|
14733
|
+
|
|
14734
|
+
|
|
14735
|
+
|
|
14109
14736
|
|
|
14110
14737
|
|
|
14111
14738
|
|
|
@@ -14269,6 +14896,18 @@ var _TreeSet = class _TreeSet {
|
|
|
14269
14896
|
|
|
14270
14897
|
|
|
14271
14898
|
|
|
14899
|
+
|
|
14900
|
+
|
|
14901
|
+
|
|
14902
|
+
|
|
14903
|
+
|
|
14904
|
+
|
|
14905
|
+
|
|
14906
|
+
|
|
14907
|
+
|
|
14908
|
+
|
|
14909
|
+
|
|
14910
|
+
|
|
14272
14911
|
|
|
14273
14912
|
|
|
14274
14913
|
|
|
@@ -14435,6 +15074,18 @@ var _TreeSet = class _TreeSet {
|
|
|
14435
15074
|
|
|
14436
15075
|
|
|
14437
15076
|
|
|
15077
|
+
|
|
15078
|
+
|
|
15079
|
+
|
|
15080
|
+
|
|
15081
|
+
|
|
15082
|
+
|
|
15083
|
+
|
|
15084
|
+
|
|
15085
|
+
|
|
15086
|
+
|
|
15087
|
+
|
|
15088
|
+
|
|
14438
15089
|
|
|
14439
15090
|
|
|
14440
15091
|
|
|
@@ -14528,6 +15179,12 @@ var _TreeSet = class _TreeSet {
|
|
|
14528
15179
|
|
|
14529
15180
|
|
|
14530
15181
|
|
|
15182
|
+
|
|
15183
|
+
|
|
15184
|
+
|
|
15185
|
+
|
|
15186
|
+
|
|
15187
|
+
|
|
14531
15188
|
* @example
|
|
14532
15189
|
* // Pagination by position in tree order
|
|
14533
15190
|
* const tree = new TreeSet<number>(
|
|
@@ -14720,6 +15377,145 @@ var _TreeSet = class _TreeSet {
|
|
|
14720
15377
|
|
|
14721
15378
|
|
|
14722
15379
|
|
|
15380
|
+
|
|
15381
|
+
|
|
15382
|
+
|
|
15383
|
+
|
|
15384
|
+
|
|
15385
|
+
|
|
15386
|
+
|
|
15387
|
+
|
|
15388
|
+
|
|
15389
|
+
|
|
15390
|
+
|
|
15391
|
+
|
|
15392
|
+
|
|
15393
|
+
* @example
|
|
15394
|
+
* // Deep clone
|
|
15395
|
+
* const ts = new TreeSet<number>([1, 2, 3]);
|
|
15396
|
+
* const copy = ts.clone();
|
|
15397
|
+
* copy.delete(1);
|
|
15398
|
+
* console.log(ts.has(1)); // true;
|
|
15399
|
+
*/
|
|
15400
|
+
// ---- ES2025 Set-like operations ----
|
|
15401
|
+
/**
|
|
15402
|
+
* Return a new TreeSet containing all elements from both sets.
|
|
15403
|
+
* @remarks When both sets share the same comparator, uses O(n+m) merge. Otherwise O(m log n).
|
|
15404
|
+
* @param other - Any iterable of keys.
|
|
15405
|
+
* @returns A new TreeSet.
|
|
15406
|
+
* @example
|
|
15407
|
+
* // Merge two sets
|
|
15408
|
+
* console.log([...a.union(b)]); // [1, 2, 3, 4, 5, 6, 7];
|
|
15409
|
+
*/
|
|
15410
|
+
union(other) {
|
|
15411
|
+
const result = this.clone();
|
|
15412
|
+
for (const key of other) result.add(key);
|
|
15413
|
+
return result;
|
|
15414
|
+
}
|
|
15415
|
+
/**
|
|
15416
|
+
* Return a new TreeSet containing only elements present in both sets.
|
|
15417
|
+
* @remarks Time O(n+m) with ordered merge when possible, otherwise O(n log m).
|
|
15418
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15419
|
+
* @returns A new TreeSet.
|
|
15420
|
+
* @example
|
|
15421
|
+
* // Find common elements
|
|
15422
|
+
* console.log([...a.intersection(b)]); // [3, 4, 5];
|
|
15423
|
+
*/
|
|
15424
|
+
intersection(other) {
|
|
15425
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15426
|
+
const result = new _TreeSet([], { comparator: __privateGet(this, _isDefaultComparator) ? void 0 : __privateGet(this, _userComparator) });
|
|
15427
|
+
for (const key of this) {
|
|
15428
|
+
if (otherSet.has(key)) result.add(key);
|
|
15429
|
+
}
|
|
15430
|
+
return result;
|
|
15431
|
+
}
|
|
15432
|
+
/**
|
|
15433
|
+
* Return a new TreeSet containing elements in this set but not in the other.
|
|
15434
|
+
* @remarks Time O(n+m) with ordered merge when possible, otherwise O(n log m).
|
|
15435
|
+
* @param other - Any iterable of keys.
|
|
15436
|
+
* @returns A new TreeSet.
|
|
15437
|
+
* @example
|
|
15438
|
+
* // Find exclusive elements
|
|
15439
|
+
* console.log([...a.difference(b)]); // [1, 2];
|
|
15440
|
+
*/
|
|
15441
|
+
difference(other) {
|
|
15442
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15443
|
+
const result = new _TreeSet([], { comparator: __privateGet(this, _isDefaultComparator) ? void 0 : __privateGet(this, _userComparator) });
|
|
15444
|
+
for (const key of this) {
|
|
15445
|
+
if (!otherSet.has(key)) result.add(key);
|
|
15446
|
+
}
|
|
15447
|
+
return result;
|
|
15448
|
+
}
|
|
15449
|
+
/**
|
|
15450
|
+
* Return a new TreeSet containing elements in either set but not both.
|
|
15451
|
+
* @remarks Time O(n+m).
|
|
15452
|
+
* @param other - Any iterable of keys.
|
|
15453
|
+
* @returns A new TreeSet.
|
|
15454
|
+
* @example
|
|
15455
|
+
* // Find symmetric difference
|
|
15456
|
+
* console.log([...a.symmetricDifference(b)]); // [1, 2, 6, 7];
|
|
15457
|
+
*/
|
|
15458
|
+
symmetricDifference(other) {
|
|
15459
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15460
|
+
const result = new _TreeSet([], { comparator: __privateGet(this, _isDefaultComparator) ? void 0 : __privateGet(this, _userComparator) });
|
|
15461
|
+
for (const key of this) {
|
|
15462
|
+
if (!otherSet.has(key)) result.add(key);
|
|
15463
|
+
}
|
|
15464
|
+
for (const key of otherSet) {
|
|
15465
|
+
if (!this.has(key)) result.add(key);
|
|
15466
|
+
}
|
|
15467
|
+
return result;
|
|
15468
|
+
}
|
|
15469
|
+
/**
|
|
15470
|
+
* Check whether every element in this set is also in the other.
|
|
15471
|
+
* @remarks Time O(n).
|
|
15472
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15473
|
+
* @returns `true` if this is a subset of other.
|
|
15474
|
+
* @example
|
|
15475
|
+
* // Check subset
|
|
15476
|
+
* console.log(new TreeSet([3, 4]).isSubsetOf(a)); // true;
|
|
15477
|
+
*/
|
|
15478
|
+
isSubsetOf(other) {
|
|
15479
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15480
|
+
for (const key of this) {
|
|
15481
|
+
if (!otherSet.has(key)) return false;
|
|
15482
|
+
}
|
|
15483
|
+
return true;
|
|
15484
|
+
}
|
|
15485
|
+
/**
|
|
15486
|
+
* Check whether every element in the other set is also in this set.
|
|
15487
|
+
* @remarks Time O(m).
|
|
15488
|
+
* @param other - Any iterable of keys.
|
|
15489
|
+
* @returns `true` if this is a superset of other.
|
|
15490
|
+
* @example
|
|
15491
|
+
* // Check superset
|
|
15492
|
+
* console.log(a.isSupersetOf(new TreeSet([2, 3]))); // true;
|
|
15493
|
+
*/
|
|
15494
|
+
isSupersetOf(other) {
|
|
15495
|
+
for (const key of other) {
|
|
15496
|
+
if (!this.has(key)) return false;
|
|
15497
|
+
}
|
|
15498
|
+
return true;
|
|
15499
|
+
}
|
|
15500
|
+
/**
|
|
15501
|
+
* Check whether this set and the other share no common elements.
|
|
15502
|
+
* @remarks Time O(min(n,m)), can short-circuit on first overlap.
|
|
15503
|
+
* @param other - Any iterable of keys (converted to Set for fast lookup if not a TreeSet).
|
|
15504
|
+
* @returns `true` if sets are disjoint.
|
|
15505
|
+
* @example
|
|
15506
|
+
* // Check disjoint
|
|
15507
|
+
* console.log(a.isDisjointFrom(new TreeSet([8, 9]))); // true;
|
|
15508
|
+
*/
|
|
15509
|
+
isDisjointFrom(other) {
|
|
15510
|
+
const otherSet = other instanceof _TreeSet || other instanceof Set ? other : new Set(other);
|
|
15511
|
+
for (const key of this) {
|
|
15512
|
+
if (otherSet.has(key)) return false;
|
|
15513
|
+
}
|
|
15514
|
+
return true;
|
|
15515
|
+
}
|
|
15516
|
+
/**
|
|
15517
|
+
* Deep copy
|
|
15518
|
+
|
|
14723
15519
|
|
|
14724
15520
|
|
|
14725
15521
|
|
|
@@ -14986,6 +15782,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
14986
15782
|
|
|
14987
15783
|
|
|
14988
15784
|
|
|
15785
|
+
|
|
15786
|
+
|
|
15787
|
+
|
|
15788
|
+
|
|
15789
|
+
|
|
15790
|
+
|
|
15791
|
+
|
|
15792
|
+
|
|
15793
|
+
|
|
15794
|
+
|
|
15795
|
+
|
|
15796
|
+
|
|
15797
|
+
|
|
15798
|
+
|
|
15799
|
+
|
|
14989
15800
|
|
|
14990
15801
|
|
|
14991
15802
|
|
|
@@ -15174,6 +15985,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15174
15985
|
|
|
15175
15986
|
|
|
15176
15987
|
|
|
15988
|
+
|
|
15989
|
+
|
|
15990
|
+
|
|
15991
|
+
|
|
15992
|
+
|
|
15993
|
+
|
|
15994
|
+
|
|
15995
|
+
|
|
15996
|
+
|
|
15997
|
+
|
|
15998
|
+
|
|
15999
|
+
|
|
16000
|
+
|
|
16001
|
+
|
|
16002
|
+
|
|
15177
16003
|
|
|
15178
16004
|
|
|
15179
16005
|
|
|
@@ -15229,6 +16055,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15229
16055
|
|
|
15230
16056
|
|
|
15231
16057
|
|
|
16058
|
+
|
|
16059
|
+
|
|
16060
|
+
|
|
15232
16061
|
|
|
15233
16062
|
|
|
15234
16063
|
|
|
@@ -15273,6 +16102,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15273
16102
|
|
|
15274
16103
|
|
|
15275
16104
|
|
|
16105
|
+
|
|
16106
|
+
|
|
16107
|
+
|
|
15276
16108
|
|
|
15277
16109
|
|
|
15278
16110
|
|
|
@@ -15494,6 +16326,24 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15494
16326
|
|
|
15495
16327
|
|
|
15496
16328
|
|
|
16329
|
+
|
|
16330
|
+
|
|
16331
|
+
|
|
16332
|
+
|
|
16333
|
+
|
|
16334
|
+
|
|
16335
|
+
|
|
16336
|
+
|
|
16337
|
+
|
|
16338
|
+
|
|
16339
|
+
|
|
16340
|
+
|
|
16341
|
+
|
|
16342
|
+
|
|
16343
|
+
|
|
16344
|
+
|
|
16345
|
+
|
|
16346
|
+
|
|
15497
16347
|
|
|
15498
16348
|
|
|
15499
16349
|
|
|
@@ -15728,6 +16578,24 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15728
16578
|
|
|
15729
16579
|
|
|
15730
16580
|
|
|
16581
|
+
|
|
16582
|
+
|
|
16583
|
+
|
|
16584
|
+
|
|
16585
|
+
|
|
16586
|
+
|
|
16587
|
+
|
|
16588
|
+
|
|
16589
|
+
|
|
16590
|
+
|
|
16591
|
+
|
|
16592
|
+
|
|
16593
|
+
|
|
16594
|
+
|
|
16595
|
+
|
|
16596
|
+
|
|
16597
|
+
|
|
16598
|
+
|
|
15731
16599
|
|
|
15732
16600
|
|
|
15733
16601
|
|
|
@@ -15917,6 +16785,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
15917
16785
|
|
|
15918
16786
|
|
|
15919
16787
|
|
|
16788
|
+
|
|
16789
|
+
|
|
16790
|
+
|
|
16791
|
+
|
|
16792
|
+
|
|
16793
|
+
|
|
16794
|
+
|
|
16795
|
+
|
|
16796
|
+
|
|
16797
|
+
|
|
16798
|
+
|
|
16799
|
+
|
|
16800
|
+
|
|
16801
|
+
|
|
16802
|
+
|
|
15920
16803
|
|
|
15921
16804
|
|
|
15922
16805
|
|
|
@@ -16173,6 +17056,24 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16173
17056
|
|
|
16174
17057
|
|
|
16175
17058
|
|
|
17059
|
+
|
|
17060
|
+
|
|
17061
|
+
|
|
17062
|
+
|
|
17063
|
+
|
|
17064
|
+
|
|
17065
|
+
|
|
17066
|
+
|
|
17067
|
+
|
|
17068
|
+
|
|
17069
|
+
|
|
17070
|
+
|
|
17071
|
+
|
|
17072
|
+
|
|
17073
|
+
|
|
17074
|
+
|
|
17075
|
+
|
|
17076
|
+
|
|
16176
17077
|
|
|
16177
17078
|
|
|
16178
17079
|
|
|
@@ -16233,6 +17134,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16233
17134
|
|
|
16234
17135
|
|
|
16235
17136
|
|
|
17137
|
+
|
|
17138
|
+
|
|
17139
|
+
|
|
16236
17140
|
|
|
16237
17141
|
|
|
16238
17142
|
|
|
@@ -16278,6 +17182,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16278
17182
|
|
|
16279
17183
|
|
|
16280
17184
|
|
|
17185
|
+
|
|
17186
|
+
|
|
17187
|
+
|
|
16281
17188
|
|
|
16282
17189
|
|
|
16283
17190
|
|
|
@@ -16328,6 +17235,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16328
17235
|
|
|
16329
17236
|
|
|
16330
17237
|
|
|
17238
|
+
|
|
17239
|
+
|
|
17240
|
+
|
|
16331
17241
|
|
|
16332
17242
|
|
|
16333
17243
|
|
|
@@ -16532,6 +17442,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16532
17442
|
|
|
16533
17443
|
|
|
16534
17444
|
|
|
17445
|
+
|
|
17446
|
+
|
|
17447
|
+
|
|
17448
|
+
|
|
17449
|
+
|
|
17450
|
+
|
|
17451
|
+
|
|
17452
|
+
|
|
17453
|
+
|
|
17454
|
+
|
|
17455
|
+
|
|
17456
|
+
|
|
17457
|
+
|
|
17458
|
+
|
|
17459
|
+
|
|
16535
17460
|
|
|
16536
17461
|
|
|
16537
17462
|
|
|
@@ -16723,6 +17648,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16723
17648
|
|
|
16724
17649
|
|
|
16725
17650
|
|
|
17651
|
+
|
|
17652
|
+
|
|
17653
|
+
|
|
17654
|
+
|
|
17655
|
+
|
|
17656
|
+
|
|
17657
|
+
|
|
17658
|
+
|
|
17659
|
+
|
|
17660
|
+
|
|
17661
|
+
|
|
17662
|
+
|
|
17663
|
+
|
|
17664
|
+
|
|
17665
|
+
|
|
16726
17666
|
|
|
16727
17667
|
|
|
16728
17668
|
|
|
@@ -16749,6 +17689,31 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16749
17689
|
*values() {
|
|
16750
17690
|
for (const [, bucket] of this) yield bucket;
|
|
16751
17691
|
}
|
|
17692
|
+
/**
|
|
17693
|
+
* Iterate over all `[key, values[]]` entries (Map-compatible).
|
|
17694
|
+
* @remarks Time O(n), Space O(1) per step.
|
|
17695
|
+
|
|
17696
|
+
|
|
17697
|
+
|
|
17698
|
+
|
|
17699
|
+
|
|
17700
|
+
|
|
17701
|
+
|
|
17702
|
+
|
|
17703
|
+
* @example
|
|
17704
|
+
* // Iterate over entries
|
|
17705
|
+
* const mm = new TreeMultiMap<number, string>();
|
|
17706
|
+
* mm.set(1, 'a');
|
|
17707
|
+
* mm.set(1, 'b');
|
|
17708
|
+
* mm.set(2, 'c');
|
|
17709
|
+
* console.log([...mm.entries()]); // [
|
|
17710
|
+
* // [1, ['a', 'b']],
|
|
17711
|
+
* // [2, ['c']]
|
|
17712
|
+
* // ];
|
|
17713
|
+
*/
|
|
17714
|
+
*entries() {
|
|
17715
|
+
yield* this;
|
|
17716
|
+
}
|
|
16752
17717
|
// ---- entry-flat views ----
|
|
16753
17718
|
/**
|
|
16754
17719
|
* Iterates over all entries for a specific key.
|
|
@@ -16779,6 +17744,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16779
17744
|
|
|
16780
17745
|
|
|
16781
17746
|
|
|
17747
|
+
|
|
17748
|
+
|
|
17749
|
+
|
|
16782
17750
|
|
|
16783
17751
|
|
|
16784
17752
|
|
|
@@ -16824,6 +17792,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16824
17792
|
|
|
16825
17793
|
|
|
16826
17794
|
|
|
17795
|
+
|
|
17796
|
+
|
|
17797
|
+
|
|
16827
17798
|
|
|
16828
17799
|
|
|
16829
17800
|
|
|
@@ -16869,6 +17840,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16869
17840
|
|
|
16870
17841
|
|
|
16871
17842
|
|
|
17843
|
+
|
|
17844
|
+
|
|
17845
|
+
|
|
16872
17846
|
|
|
16873
17847
|
|
|
16874
17848
|
|
|
@@ -16953,6 +17927,12 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
16953
17927
|
|
|
16954
17928
|
|
|
16955
17929
|
|
|
17930
|
+
|
|
17931
|
+
|
|
17932
|
+
|
|
17933
|
+
|
|
17934
|
+
|
|
17935
|
+
|
|
16956
17936
|
|
|
16957
17937
|
|
|
16958
17938
|
|
|
@@ -17042,6 +18022,12 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17042
18022
|
|
|
17043
18023
|
|
|
17044
18024
|
|
|
18025
|
+
|
|
18026
|
+
|
|
18027
|
+
|
|
18028
|
+
|
|
18029
|
+
|
|
18030
|
+
|
|
17045
18031
|
|
|
17046
18032
|
|
|
17047
18033
|
|
|
@@ -17095,6 +18081,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17095
18081
|
|
|
17096
18082
|
|
|
17097
18083
|
|
|
18084
|
+
|
|
18085
|
+
|
|
18086
|
+
|
|
17098
18087
|
|
|
17099
18088
|
|
|
17100
18089
|
|
|
@@ -17144,6 +18133,9 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17144
18133
|
|
|
17145
18134
|
|
|
17146
18135
|
|
|
18136
|
+
|
|
18137
|
+
|
|
18138
|
+
|
|
17147
18139
|
|
|
17148
18140
|
|
|
17149
18141
|
|
|
@@ -17330,6 +18322,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17330
18322
|
|
|
17331
18323
|
|
|
17332
18324
|
|
|
18325
|
+
|
|
18326
|
+
|
|
18327
|
+
|
|
18328
|
+
|
|
18329
|
+
|
|
18330
|
+
|
|
18331
|
+
|
|
18332
|
+
|
|
18333
|
+
|
|
18334
|
+
|
|
18335
|
+
|
|
18336
|
+
|
|
18337
|
+
|
|
18338
|
+
|
|
18339
|
+
|
|
17333
18340
|
|
|
17334
18341
|
|
|
17335
18342
|
|
|
@@ -17532,6 +18539,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17532
18539
|
|
|
17533
18540
|
|
|
17534
18541
|
|
|
18542
|
+
|
|
18543
|
+
|
|
18544
|
+
|
|
18545
|
+
|
|
18546
|
+
|
|
18547
|
+
|
|
18548
|
+
|
|
18549
|
+
|
|
18550
|
+
|
|
18551
|
+
|
|
18552
|
+
|
|
18553
|
+
|
|
18554
|
+
|
|
18555
|
+
|
|
18556
|
+
|
|
17535
18557
|
|
|
17536
18558
|
|
|
17537
18559
|
|
|
@@ -17698,6 +18720,18 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17698
18720
|
|
|
17699
18721
|
|
|
17700
18722
|
|
|
18723
|
+
|
|
18724
|
+
|
|
18725
|
+
|
|
18726
|
+
|
|
18727
|
+
|
|
18728
|
+
|
|
18729
|
+
|
|
18730
|
+
|
|
18731
|
+
|
|
18732
|
+
|
|
18733
|
+
|
|
18734
|
+
|
|
17701
18735
|
|
|
17702
18736
|
|
|
17703
18737
|
|
|
@@ -17860,6 +18894,18 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
17860
18894
|
|
|
17861
18895
|
|
|
17862
18896
|
|
|
18897
|
+
|
|
18898
|
+
|
|
18899
|
+
|
|
18900
|
+
|
|
18901
|
+
|
|
18902
|
+
|
|
18903
|
+
|
|
18904
|
+
|
|
18905
|
+
|
|
18906
|
+
|
|
18907
|
+
|
|
18908
|
+
|
|
17863
18909
|
|
|
17864
18910
|
|
|
17865
18911
|
|
|
@@ -18056,6 +19102,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18056
19102
|
|
|
18057
19103
|
|
|
18058
19104
|
|
|
19105
|
+
|
|
19106
|
+
|
|
19107
|
+
|
|
19108
|
+
|
|
19109
|
+
|
|
19110
|
+
|
|
19111
|
+
|
|
19112
|
+
|
|
19113
|
+
|
|
19114
|
+
|
|
19115
|
+
|
|
19116
|
+
|
|
19117
|
+
|
|
19118
|
+
|
|
19119
|
+
|
|
18059
19120
|
|
|
18060
19121
|
|
|
18061
19122
|
|
|
@@ -18246,6 +19307,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18246
19307
|
|
|
18247
19308
|
|
|
18248
19309
|
|
|
19310
|
+
|
|
19311
|
+
|
|
19312
|
+
|
|
19313
|
+
|
|
19314
|
+
|
|
19315
|
+
|
|
19316
|
+
|
|
19317
|
+
|
|
19318
|
+
|
|
19319
|
+
|
|
19320
|
+
|
|
19321
|
+
|
|
19322
|
+
|
|
19323
|
+
|
|
19324
|
+
|
|
18249
19325
|
|
|
18250
19326
|
|
|
18251
19327
|
|
|
@@ -18441,6 +19517,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18441
19517
|
|
|
18442
19518
|
|
|
18443
19519
|
|
|
19520
|
+
|
|
19521
|
+
|
|
19522
|
+
|
|
19523
|
+
|
|
19524
|
+
|
|
19525
|
+
|
|
19526
|
+
|
|
19527
|
+
|
|
19528
|
+
|
|
19529
|
+
|
|
19530
|
+
|
|
19531
|
+
|
|
19532
|
+
|
|
19533
|
+
|
|
19534
|
+
|
|
18444
19535
|
|
|
18445
19536
|
|
|
18446
19537
|
|
|
@@ -18638,6 +19729,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18638
19729
|
|
|
18639
19730
|
|
|
18640
19731
|
|
|
19732
|
+
|
|
19733
|
+
|
|
19734
|
+
|
|
19735
|
+
|
|
19736
|
+
|
|
19737
|
+
|
|
19738
|
+
|
|
19739
|
+
|
|
19740
|
+
|
|
19741
|
+
|
|
19742
|
+
|
|
19743
|
+
|
|
19744
|
+
|
|
19745
|
+
|
|
19746
|
+
|
|
18641
19747
|
|
|
18642
19748
|
|
|
18643
19749
|
|
|
@@ -18833,6 +19939,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
18833
19939
|
|
|
18834
19940
|
|
|
18835
19941
|
|
|
19942
|
+
|
|
19943
|
+
|
|
19944
|
+
|
|
19945
|
+
|
|
19946
|
+
|
|
19947
|
+
|
|
19948
|
+
|
|
19949
|
+
|
|
19950
|
+
|
|
19951
|
+
|
|
19952
|
+
|
|
19953
|
+
|
|
19954
|
+
|
|
19955
|
+
|
|
19956
|
+
|
|
18836
19957
|
|
|
18837
19958
|
|
|
18838
19959
|
|
|
@@ -19021,6 +20142,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19021
20142
|
|
|
19022
20143
|
|
|
19023
20144
|
|
|
20145
|
+
|
|
20146
|
+
|
|
20147
|
+
|
|
20148
|
+
|
|
20149
|
+
|
|
20150
|
+
|
|
20151
|
+
|
|
20152
|
+
|
|
20153
|
+
|
|
20154
|
+
|
|
20155
|
+
|
|
20156
|
+
|
|
20157
|
+
|
|
20158
|
+
|
|
20159
|
+
|
|
19024
20160
|
|
|
19025
20161
|
|
|
19026
20162
|
|
|
@@ -19182,6 +20318,18 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19182
20318
|
|
|
19183
20319
|
|
|
19184
20320
|
|
|
20321
|
+
|
|
20322
|
+
|
|
20323
|
+
|
|
20324
|
+
|
|
20325
|
+
|
|
20326
|
+
|
|
20327
|
+
|
|
20328
|
+
|
|
20329
|
+
|
|
20330
|
+
|
|
20331
|
+
|
|
20332
|
+
|
|
19185
20333
|
|
|
19186
20334
|
|
|
19187
20335
|
|
|
@@ -19407,6 +20555,12 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19407
20555
|
|
|
19408
20556
|
|
|
19409
20557
|
|
|
20558
|
+
|
|
20559
|
+
|
|
20560
|
+
|
|
20561
|
+
|
|
20562
|
+
|
|
20563
|
+
|
|
19410
20564
|
* @example
|
|
19411
20565
|
* // Pagination by position in tree order
|
|
19412
20566
|
* const tree = new TreeMultiMap<number>(
|
|
@@ -19449,6 +20603,21 @@ var _TreeMultiMap = class _TreeMultiMap {
|
|
|
19449
20603
|
|
|
19450
20604
|
|
|
19451
20605
|
|
|
20606
|
+
|
|
20607
|
+
|
|
20608
|
+
|
|
20609
|
+
|
|
20610
|
+
|
|
20611
|
+
|
|
20612
|
+
|
|
20613
|
+
|
|
20614
|
+
|
|
20615
|
+
|
|
20616
|
+
|
|
20617
|
+
|
|
20618
|
+
|
|
20619
|
+
|
|
20620
|
+
|
|
19452
20621
|
|
|
19453
20622
|
|
|
19454
20623
|
|
|
@@ -19735,6 +20904,21 @@ var _TreeMap = class _TreeMap {
|
|
|
19735
20904
|
|
|
19736
20905
|
|
|
19737
20906
|
|
|
20907
|
+
|
|
20908
|
+
|
|
20909
|
+
|
|
20910
|
+
|
|
20911
|
+
|
|
20912
|
+
|
|
20913
|
+
|
|
20914
|
+
|
|
20915
|
+
|
|
20916
|
+
|
|
20917
|
+
|
|
20918
|
+
|
|
20919
|
+
|
|
20920
|
+
|
|
20921
|
+
|
|
19738
20922
|
|
|
19739
20923
|
|
|
19740
20924
|
|
|
@@ -19932,6 +21116,21 @@ var _TreeMap = class _TreeMap {
|
|
|
19932
21116
|
|
|
19933
21117
|
|
|
19934
21118
|
|
|
21119
|
+
|
|
21120
|
+
|
|
21121
|
+
|
|
21122
|
+
|
|
21123
|
+
|
|
21124
|
+
|
|
21125
|
+
|
|
21126
|
+
|
|
21127
|
+
|
|
21128
|
+
|
|
21129
|
+
|
|
21130
|
+
|
|
21131
|
+
|
|
21132
|
+
|
|
21133
|
+
|
|
19935
21134
|
|
|
19936
21135
|
|
|
19937
21136
|
|
|
@@ -19986,6 +21185,18 @@ var _TreeMap = class _TreeMap {
|
|
|
19986
21185
|
|
|
19987
21186
|
|
|
19988
21187
|
|
|
21188
|
+
|
|
21189
|
+
|
|
21190
|
+
|
|
21191
|
+
|
|
21192
|
+
|
|
21193
|
+
|
|
21194
|
+
|
|
21195
|
+
|
|
21196
|
+
|
|
21197
|
+
|
|
21198
|
+
|
|
21199
|
+
|
|
19989
21200
|
|
|
19990
21201
|
|
|
19991
21202
|
|
|
@@ -20185,6 +21396,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20185
21396
|
|
|
20186
21397
|
|
|
20187
21398
|
|
|
21399
|
+
|
|
21400
|
+
|
|
21401
|
+
|
|
21402
|
+
|
|
21403
|
+
|
|
21404
|
+
|
|
21405
|
+
|
|
21406
|
+
|
|
21407
|
+
|
|
21408
|
+
|
|
21409
|
+
|
|
21410
|
+
|
|
21411
|
+
|
|
21412
|
+
|
|
21413
|
+
|
|
20188
21414
|
|
|
20189
21415
|
|
|
20190
21416
|
|
|
@@ -20393,6 +21619,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20393
21619
|
|
|
20394
21620
|
|
|
20395
21621
|
|
|
21622
|
+
|
|
21623
|
+
|
|
21624
|
+
|
|
21625
|
+
|
|
21626
|
+
|
|
21627
|
+
|
|
21628
|
+
|
|
21629
|
+
|
|
21630
|
+
|
|
21631
|
+
|
|
21632
|
+
|
|
21633
|
+
|
|
21634
|
+
|
|
21635
|
+
|
|
21636
|
+
|
|
20396
21637
|
|
|
20397
21638
|
|
|
20398
21639
|
|
|
@@ -20601,6 +21842,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20601
21842
|
|
|
20602
21843
|
|
|
20603
21844
|
|
|
21845
|
+
|
|
21846
|
+
|
|
21847
|
+
|
|
21848
|
+
|
|
21849
|
+
|
|
21850
|
+
|
|
21851
|
+
|
|
21852
|
+
|
|
21853
|
+
|
|
21854
|
+
|
|
21855
|
+
|
|
21856
|
+
|
|
21857
|
+
|
|
21858
|
+
|
|
21859
|
+
|
|
20604
21860
|
|
|
20605
21861
|
|
|
20606
21862
|
|
|
@@ -20815,6 +22071,21 @@ var _TreeMap = class _TreeMap {
|
|
|
20815
22071
|
|
|
20816
22072
|
|
|
20817
22073
|
|
|
22074
|
+
|
|
22075
|
+
|
|
22076
|
+
|
|
22077
|
+
|
|
22078
|
+
|
|
22079
|
+
|
|
22080
|
+
|
|
22081
|
+
|
|
22082
|
+
|
|
22083
|
+
|
|
22084
|
+
|
|
22085
|
+
|
|
22086
|
+
|
|
22087
|
+
|
|
22088
|
+
|
|
20818
22089
|
|
|
20819
22090
|
|
|
20820
22091
|
|
|
@@ -21004,6 +22275,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21004
22275
|
|
|
21005
22276
|
|
|
21006
22277
|
|
|
22278
|
+
|
|
22279
|
+
|
|
22280
|
+
|
|
22281
|
+
|
|
22282
|
+
|
|
22283
|
+
|
|
22284
|
+
|
|
22285
|
+
|
|
22286
|
+
|
|
22287
|
+
|
|
22288
|
+
|
|
22289
|
+
|
|
22290
|
+
|
|
22291
|
+
|
|
22292
|
+
|
|
21007
22293
|
|
|
21008
22294
|
|
|
21009
22295
|
|
|
@@ -21197,6 +22483,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21197
22483
|
|
|
21198
22484
|
|
|
21199
22485
|
|
|
22486
|
+
|
|
22487
|
+
|
|
22488
|
+
|
|
22489
|
+
|
|
22490
|
+
|
|
22491
|
+
|
|
22492
|
+
|
|
22493
|
+
|
|
22494
|
+
|
|
22495
|
+
|
|
22496
|
+
|
|
22497
|
+
|
|
22498
|
+
|
|
22499
|
+
|
|
22500
|
+
|
|
21200
22501
|
|
|
21201
22502
|
|
|
21202
22503
|
|
|
@@ -21387,6 +22688,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21387
22688
|
|
|
21388
22689
|
|
|
21389
22690
|
|
|
22691
|
+
|
|
22692
|
+
|
|
22693
|
+
|
|
22694
|
+
|
|
22695
|
+
|
|
22696
|
+
|
|
22697
|
+
|
|
22698
|
+
|
|
22699
|
+
|
|
22700
|
+
|
|
22701
|
+
|
|
22702
|
+
|
|
22703
|
+
|
|
22704
|
+
|
|
22705
|
+
|
|
21390
22706
|
|
|
21391
22707
|
|
|
21392
22708
|
|
|
@@ -21580,6 +22896,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21580
22896
|
|
|
21581
22897
|
|
|
21582
22898
|
|
|
22899
|
+
|
|
22900
|
+
|
|
22901
|
+
|
|
22902
|
+
|
|
22903
|
+
|
|
22904
|
+
|
|
22905
|
+
|
|
22906
|
+
|
|
22907
|
+
|
|
22908
|
+
|
|
22909
|
+
|
|
22910
|
+
|
|
22911
|
+
|
|
22912
|
+
|
|
22913
|
+
|
|
21583
22914
|
|
|
21584
22915
|
|
|
21585
22916
|
|
|
@@ -21773,6 +23104,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21773
23104
|
|
|
21774
23105
|
|
|
21775
23106
|
|
|
23107
|
+
|
|
23108
|
+
|
|
23109
|
+
|
|
23110
|
+
|
|
23111
|
+
|
|
23112
|
+
|
|
23113
|
+
|
|
23114
|
+
|
|
23115
|
+
|
|
23116
|
+
|
|
23117
|
+
|
|
23118
|
+
|
|
23119
|
+
|
|
23120
|
+
|
|
23121
|
+
|
|
21776
23122
|
|
|
21777
23123
|
|
|
21778
23124
|
|
|
@@ -21969,6 +23315,21 @@ var _TreeMap = class _TreeMap {
|
|
|
21969
23315
|
|
|
21970
23316
|
|
|
21971
23317
|
|
|
23318
|
+
|
|
23319
|
+
|
|
23320
|
+
|
|
23321
|
+
|
|
23322
|
+
|
|
23323
|
+
|
|
23324
|
+
|
|
23325
|
+
|
|
23326
|
+
|
|
23327
|
+
|
|
23328
|
+
|
|
23329
|
+
|
|
23330
|
+
|
|
23331
|
+
|
|
23332
|
+
|
|
21972
23333
|
|
|
21973
23334
|
|
|
21974
23335
|
|
|
@@ -22165,6 +23526,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22165
23526
|
|
|
22166
23527
|
|
|
22167
23528
|
|
|
23529
|
+
|
|
23530
|
+
|
|
23531
|
+
|
|
23532
|
+
|
|
23533
|
+
|
|
23534
|
+
|
|
23535
|
+
|
|
23536
|
+
|
|
23537
|
+
|
|
23538
|
+
|
|
23539
|
+
|
|
23540
|
+
|
|
23541
|
+
|
|
23542
|
+
|
|
23543
|
+
|
|
22168
23544
|
|
|
22169
23545
|
|
|
22170
23546
|
|
|
@@ -22355,6 +23731,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22355
23731
|
|
|
22356
23732
|
|
|
22357
23733
|
|
|
23734
|
+
|
|
23735
|
+
|
|
23736
|
+
|
|
23737
|
+
|
|
23738
|
+
|
|
23739
|
+
|
|
23740
|
+
|
|
23741
|
+
|
|
23742
|
+
|
|
23743
|
+
|
|
23744
|
+
|
|
23745
|
+
|
|
23746
|
+
|
|
23747
|
+
|
|
23748
|
+
|
|
22358
23749
|
|
|
22359
23750
|
|
|
22360
23751
|
|
|
@@ -22547,6 +23938,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22547
23938
|
|
|
22548
23939
|
|
|
22549
23940
|
|
|
23941
|
+
|
|
23942
|
+
|
|
23943
|
+
|
|
23944
|
+
|
|
23945
|
+
|
|
23946
|
+
|
|
23947
|
+
|
|
23948
|
+
|
|
23949
|
+
|
|
23950
|
+
|
|
23951
|
+
|
|
23952
|
+
|
|
23953
|
+
|
|
23954
|
+
|
|
23955
|
+
|
|
22550
23956
|
|
|
22551
23957
|
|
|
22552
23958
|
|
|
@@ -22740,6 +24146,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22740
24146
|
|
|
22741
24147
|
|
|
22742
24148
|
|
|
24149
|
+
|
|
24150
|
+
|
|
24151
|
+
|
|
24152
|
+
|
|
24153
|
+
|
|
24154
|
+
|
|
24155
|
+
|
|
24156
|
+
|
|
24157
|
+
|
|
24158
|
+
|
|
24159
|
+
|
|
24160
|
+
|
|
24161
|
+
|
|
24162
|
+
|
|
24163
|
+
|
|
22743
24164
|
|
|
22744
24165
|
|
|
22745
24166
|
|
|
@@ -22934,6 +24355,21 @@ var _TreeMap = class _TreeMap {
|
|
|
22934
24355
|
|
|
22935
24356
|
|
|
22936
24357
|
|
|
24358
|
+
|
|
24359
|
+
|
|
24360
|
+
|
|
24361
|
+
|
|
24362
|
+
|
|
24363
|
+
|
|
24364
|
+
|
|
24365
|
+
|
|
24366
|
+
|
|
24367
|
+
|
|
24368
|
+
|
|
24369
|
+
|
|
24370
|
+
|
|
24371
|
+
|
|
24372
|
+
|
|
22937
24373
|
|
|
22938
24374
|
|
|
22939
24375
|
|
|
@@ -23123,6 +24559,21 @@ var _TreeMap = class _TreeMap {
|
|
|
23123
24559
|
|
|
23124
24560
|
|
|
23125
24561
|
|
|
24562
|
+
|
|
24563
|
+
|
|
24564
|
+
|
|
24565
|
+
|
|
24566
|
+
|
|
24567
|
+
|
|
24568
|
+
|
|
24569
|
+
|
|
24570
|
+
|
|
24571
|
+
|
|
24572
|
+
|
|
24573
|
+
|
|
24574
|
+
|
|
24575
|
+
|
|
24576
|
+
|
|
23126
24577
|
|
|
23127
24578
|
|
|
23128
24579
|
|
|
@@ -23186,6 +24637,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23186
24637
|
|
|
23187
24638
|
|
|
23188
24639
|
|
|
24640
|
+
|
|
24641
|
+
|
|
24642
|
+
|
|
23189
24643
|
|
|
23190
24644
|
|
|
23191
24645
|
|
|
@@ -23258,6 +24712,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23258
24712
|
|
|
23259
24713
|
|
|
23260
24714
|
|
|
24715
|
+
|
|
24716
|
+
|
|
24717
|
+
|
|
23261
24718
|
|
|
23262
24719
|
|
|
23263
24720
|
|
|
@@ -23314,6 +24771,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23314
24771
|
|
|
23315
24772
|
|
|
23316
24773
|
|
|
24774
|
+
|
|
24775
|
+
|
|
24776
|
+
|
|
23317
24777
|
|
|
23318
24778
|
|
|
23319
24779
|
|
|
@@ -23374,6 +24834,9 @@ var _TreeMap = class _TreeMap {
|
|
|
23374
24834
|
|
|
23375
24835
|
|
|
23376
24836
|
|
|
24837
|
+
|
|
24838
|
+
|
|
24839
|
+
|
|
23377
24840
|
|
|
23378
24841
|
|
|
23379
24842
|
|
|
@@ -23536,6 +24999,18 @@ var _TreeMap = class _TreeMap {
|
|
|
23536
24999
|
|
|
23537
25000
|
|
|
23538
25001
|
|
|
25002
|
+
|
|
25003
|
+
|
|
25004
|
+
|
|
25005
|
+
|
|
25006
|
+
|
|
25007
|
+
|
|
25008
|
+
|
|
25009
|
+
|
|
25010
|
+
|
|
25011
|
+
|
|
25012
|
+
|
|
25013
|
+
|
|
23539
25014
|
|
|
23540
25015
|
|
|
23541
25016
|
|
|
@@ -23725,6 +25200,18 @@ var _TreeMap = class _TreeMap {
|
|
|
23725
25200
|
|
|
23726
25201
|
|
|
23727
25202
|
|
|
25203
|
+
|
|
25204
|
+
|
|
25205
|
+
|
|
25206
|
+
|
|
25207
|
+
|
|
25208
|
+
|
|
25209
|
+
|
|
25210
|
+
|
|
25211
|
+
|
|
25212
|
+
|
|
25213
|
+
|
|
25214
|
+
|
|
23728
25215
|
|
|
23729
25216
|
|
|
23730
25217
|
|
|
@@ -23898,6 +25385,18 @@ var _TreeMap = class _TreeMap {
|
|
|
23898
25385
|
|
|
23899
25386
|
|
|
23900
25387
|
|
|
25388
|
+
|
|
25389
|
+
|
|
25390
|
+
|
|
25391
|
+
|
|
25392
|
+
|
|
25393
|
+
|
|
25394
|
+
|
|
25395
|
+
|
|
25396
|
+
|
|
25397
|
+
|
|
25398
|
+
|
|
25399
|
+
|
|
23901
25400
|
|
|
23902
25401
|
|
|
23903
25402
|
|
|
@@ -24071,6 +25570,18 @@ var _TreeMap = class _TreeMap {
|
|
|
24071
25570
|
|
|
24072
25571
|
|
|
24073
25572
|
|
|
25573
|
+
|
|
25574
|
+
|
|
25575
|
+
|
|
25576
|
+
|
|
25577
|
+
|
|
25578
|
+
|
|
25579
|
+
|
|
25580
|
+
|
|
25581
|
+
|
|
25582
|
+
|
|
25583
|
+
|
|
25584
|
+
|
|
24074
25585
|
|
|
24075
25586
|
|
|
24076
25587
|
|
|
@@ -24245,6 +25756,18 @@ var _TreeMap = class _TreeMap {
|
|
|
24245
25756
|
|
|
24246
25757
|
|
|
24247
25758
|
|
|
25759
|
+
|
|
25760
|
+
|
|
25761
|
+
|
|
25762
|
+
|
|
25763
|
+
|
|
25764
|
+
|
|
25765
|
+
|
|
25766
|
+
|
|
25767
|
+
|
|
25768
|
+
|
|
25769
|
+
|
|
25770
|
+
|
|
24248
25771
|
|
|
24249
25772
|
|
|
24250
25773
|
|
|
@@ -24356,6 +25879,12 @@ var _TreeMap = class _TreeMap {
|
|
|
24356
25879
|
|
|
24357
25880
|
|
|
24358
25881
|
|
|
25882
|
+
|
|
25883
|
+
|
|
25884
|
+
|
|
25885
|
+
|
|
25886
|
+
|
|
25887
|
+
|
|
24359
25888
|
* @example
|
|
24360
25889
|
* // Pagination by position in tree order
|
|
24361
25890
|
* const tree = new TreeMap<number>(
|
|
@@ -24541,6 +26070,21 @@ var _TreeMap = class _TreeMap {
|
|
|
24541
26070
|
|
|
24542
26071
|
|
|
24543
26072
|
|
|
26073
|
+
|
|
26074
|
+
|
|
26075
|
+
|
|
26076
|
+
|
|
26077
|
+
|
|
26078
|
+
|
|
26079
|
+
|
|
26080
|
+
|
|
26081
|
+
|
|
26082
|
+
|
|
26083
|
+
|
|
26084
|
+
|
|
26085
|
+
|
|
26086
|
+
|
|
26087
|
+
|
|
24544
26088
|
|
|
24545
26089
|
|
|
24546
26090
|
|
|
@@ -24668,6 +26212,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
24668
26212
|
|
|
24669
26213
|
|
|
24670
26214
|
|
|
26215
|
+
|
|
26216
|
+
|
|
26217
|
+
|
|
24671
26218
|
|
|
24672
26219
|
|
|
24673
26220
|
|
|
@@ -24847,6 +26394,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
24847
26394
|
|
|
24848
26395
|
|
|
24849
26396
|
|
|
26397
|
+
|
|
26398
|
+
|
|
26399
|
+
|
|
26400
|
+
|
|
26401
|
+
|
|
26402
|
+
|
|
26403
|
+
|
|
26404
|
+
|
|
26405
|
+
|
|
26406
|
+
|
|
26407
|
+
|
|
26408
|
+
|
|
26409
|
+
|
|
26410
|
+
|
|
26411
|
+
|
|
24850
26412
|
|
|
24851
26413
|
|
|
24852
26414
|
|
|
@@ -25038,6 +26600,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25038
26600
|
|
|
25039
26601
|
|
|
25040
26602
|
|
|
26603
|
+
|
|
26604
|
+
|
|
26605
|
+
|
|
26606
|
+
|
|
26607
|
+
|
|
26608
|
+
|
|
26609
|
+
|
|
26610
|
+
|
|
26611
|
+
|
|
26612
|
+
|
|
26613
|
+
|
|
26614
|
+
|
|
26615
|
+
|
|
26616
|
+
|
|
26617
|
+
|
|
25041
26618
|
|
|
25042
26619
|
|
|
25043
26620
|
|
|
@@ -25094,6 +26671,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25094
26671
|
|
|
25095
26672
|
|
|
25096
26673
|
|
|
26674
|
+
|
|
26675
|
+
|
|
26676
|
+
|
|
25097
26677
|
|
|
25098
26678
|
|
|
25099
26679
|
|
|
@@ -25269,6 +26849,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25269
26849
|
|
|
25270
26850
|
|
|
25271
26851
|
|
|
26852
|
+
|
|
26853
|
+
|
|
26854
|
+
|
|
26855
|
+
|
|
26856
|
+
|
|
26857
|
+
|
|
26858
|
+
|
|
26859
|
+
|
|
26860
|
+
|
|
26861
|
+
|
|
26862
|
+
|
|
26863
|
+
|
|
26864
|
+
|
|
26865
|
+
|
|
26866
|
+
|
|
25272
26867
|
|
|
25273
26868
|
|
|
25274
26869
|
|
|
@@ -25335,6 +26930,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25335
26930
|
|
|
25336
26931
|
|
|
25337
26932
|
|
|
26933
|
+
|
|
26934
|
+
|
|
26935
|
+
|
|
25338
26936
|
|
|
25339
26937
|
|
|
25340
26938
|
|
|
@@ -25528,6 +27126,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25528
27126
|
|
|
25529
27127
|
|
|
25530
27128
|
|
|
27129
|
+
|
|
27130
|
+
|
|
27131
|
+
|
|
27132
|
+
|
|
27133
|
+
|
|
27134
|
+
|
|
27135
|
+
|
|
27136
|
+
|
|
27137
|
+
|
|
27138
|
+
|
|
27139
|
+
|
|
27140
|
+
|
|
27141
|
+
|
|
27142
|
+
|
|
27143
|
+
|
|
25531
27144
|
|
|
25532
27145
|
|
|
25533
27146
|
|
|
@@ -25595,6 +27208,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25595
27208
|
|
|
25596
27209
|
|
|
25597
27210
|
|
|
27211
|
+
|
|
27212
|
+
|
|
27213
|
+
|
|
25598
27214
|
|
|
25599
27215
|
|
|
25600
27216
|
|
|
@@ -25644,6 +27260,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25644
27260
|
|
|
25645
27261
|
|
|
25646
27262
|
|
|
27263
|
+
|
|
27264
|
+
|
|
27265
|
+
|
|
25647
27266
|
|
|
25648
27267
|
|
|
25649
27268
|
|
|
@@ -25823,6 +27442,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25823
27442
|
|
|
25824
27443
|
|
|
25825
27444
|
|
|
27445
|
+
|
|
27446
|
+
|
|
27447
|
+
|
|
27448
|
+
|
|
27449
|
+
|
|
27450
|
+
|
|
27451
|
+
|
|
27452
|
+
|
|
27453
|
+
|
|
27454
|
+
|
|
27455
|
+
|
|
27456
|
+
|
|
27457
|
+
|
|
27458
|
+
|
|
27459
|
+
|
|
25826
27460
|
|
|
25827
27461
|
|
|
25828
27462
|
|
|
@@ -25859,6 +27493,46 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
25859
27493
|
for (let i = 0; i < c; i++) yield k;
|
|
25860
27494
|
}
|
|
25861
27495
|
}
|
|
27496
|
+
/**
|
|
27497
|
+
* Iterate over all elements with multiplicity (Set-compatible, alias for `[Symbol.iterator]`).
|
|
27498
|
+
* @remarks Each key is yielded `count(key)` times. Time O(size), Space O(1) per step.
|
|
27499
|
+
|
|
27500
|
+
|
|
27501
|
+
|
|
27502
|
+
|
|
27503
|
+
|
|
27504
|
+
|
|
27505
|
+
|
|
27506
|
+
|
|
27507
|
+
* @example
|
|
27508
|
+
* // Iterate with multiplicity
|
|
27509
|
+
* const ms = new TreeMultiSet<number>();
|
|
27510
|
+
* ms.add(1); ms.add(1); ms.add(2); ms.add(3); ms.add(3); ms.add(3);
|
|
27511
|
+
* console.log([...ms.keys()]); // [1, 1, 2, 3, 3, 3];
|
|
27512
|
+
*/
|
|
27513
|
+
*keys() {
|
|
27514
|
+
yield* this;
|
|
27515
|
+
}
|
|
27516
|
+
/**
|
|
27517
|
+
* Iterate over all elements with multiplicity (Set-compatible, alias for `[Symbol.iterator]`).
|
|
27518
|
+
* @remarks Each key is yielded `count(key)` times. Time O(size), Space O(1) per step.
|
|
27519
|
+
|
|
27520
|
+
|
|
27521
|
+
|
|
27522
|
+
|
|
27523
|
+
|
|
27524
|
+
|
|
27525
|
+
|
|
27526
|
+
|
|
27527
|
+
* @example
|
|
27528
|
+
* // Iterate with multiplicity
|
|
27529
|
+
* const ms = new TreeMultiSet<number>();
|
|
27530
|
+
* ms.add(5); ms.add(5); ms.add(10);
|
|
27531
|
+
* console.log([...ms.values()]); // [5, 5, 10];
|
|
27532
|
+
*/
|
|
27533
|
+
*values() {
|
|
27534
|
+
yield* this;
|
|
27535
|
+
}
|
|
25862
27536
|
/**
|
|
25863
27537
|
* Returns an array with all elements (expanded).
|
|
25864
27538
|
* @remarks Time O(size), Space O(size)
|
|
@@ -26024,6 +27698,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26024
27698
|
|
|
26025
27699
|
|
|
26026
27700
|
|
|
27701
|
+
|
|
27702
|
+
|
|
27703
|
+
|
|
27704
|
+
|
|
27705
|
+
|
|
27706
|
+
|
|
27707
|
+
|
|
27708
|
+
|
|
27709
|
+
|
|
27710
|
+
|
|
27711
|
+
|
|
27712
|
+
|
|
27713
|
+
|
|
27714
|
+
|
|
27715
|
+
|
|
26027
27716
|
|
|
26028
27717
|
|
|
26029
27718
|
|
|
@@ -26079,6 +27768,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26079
27768
|
|
|
26080
27769
|
|
|
26081
27770
|
|
|
27771
|
+
|
|
27772
|
+
|
|
27773
|
+
|
|
26082
27774
|
|
|
26083
27775
|
|
|
26084
27776
|
|
|
@@ -26122,6 +27814,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26122
27814
|
|
|
26123
27815
|
|
|
26124
27816
|
|
|
27817
|
+
|
|
27818
|
+
|
|
27819
|
+
|
|
26125
27820
|
|
|
26126
27821
|
|
|
26127
27822
|
|
|
@@ -26310,6 +28005,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26310
28005
|
|
|
26311
28006
|
|
|
26312
28007
|
|
|
28008
|
+
|
|
28009
|
+
|
|
28010
|
+
|
|
28011
|
+
|
|
28012
|
+
|
|
28013
|
+
|
|
28014
|
+
|
|
28015
|
+
|
|
28016
|
+
|
|
28017
|
+
|
|
28018
|
+
|
|
28019
|
+
|
|
28020
|
+
|
|
28021
|
+
|
|
28022
|
+
|
|
26313
28023
|
|
|
26314
28024
|
|
|
26315
28025
|
|
|
@@ -26368,6 +28078,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26368
28078
|
|
|
26369
28079
|
|
|
26370
28080
|
|
|
28081
|
+
|
|
28082
|
+
|
|
28083
|
+
|
|
26371
28084
|
|
|
26372
28085
|
|
|
26373
28086
|
|
|
@@ -26412,6 +28125,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26412
28125
|
|
|
26413
28126
|
|
|
26414
28127
|
|
|
28128
|
+
|
|
28129
|
+
|
|
28130
|
+
|
|
26415
28131
|
|
|
26416
28132
|
|
|
26417
28133
|
|
|
@@ -26456,6 +28172,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26456
28172
|
|
|
26457
28173
|
|
|
26458
28174
|
|
|
28175
|
+
|
|
28176
|
+
|
|
28177
|
+
|
|
26459
28178
|
|
|
26460
28179
|
|
|
26461
28180
|
|
|
@@ -26504,6 +28223,9 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26504
28223
|
|
|
26505
28224
|
|
|
26506
28225
|
|
|
28226
|
+
|
|
28227
|
+
|
|
28228
|
+
|
|
26507
28229
|
|
|
26508
28230
|
|
|
26509
28231
|
|
|
@@ -26653,6 +28375,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26653
28375
|
|
|
26654
28376
|
|
|
26655
28377
|
|
|
28378
|
+
|
|
28379
|
+
|
|
28380
|
+
|
|
28381
|
+
|
|
28382
|
+
|
|
28383
|
+
|
|
28384
|
+
|
|
28385
|
+
|
|
28386
|
+
|
|
28387
|
+
|
|
28388
|
+
|
|
28389
|
+
|
|
26656
28390
|
|
|
26657
28391
|
|
|
26658
28392
|
|
|
@@ -26810,6 +28544,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26810
28544
|
|
|
26811
28545
|
|
|
26812
28546
|
|
|
28547
|
+
|
|
28548
|
+
|
|
28549
|
+
|
|
28550
|
+
|
|
28551
|
+
|
|
28552
|
+
|
|
28553
|
+
|
|
28554
|
+
|
|
28555
|
+
|
|
28556
|
+
|
|
28557
|
+
|
|
28558
|
+
|
|
26813
28559
|
|
|
26814
28560
|
|
|
26815
28561
|
|
|
@@ -26967,6 +28713,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
26967
28713
|
|
|
26968
28714
|
|
|
26969
28715
|
|
|
28716
|
+
|
|
28717
|
+
|
|
28718
|
+
|
|
28719
|
+
|
|
28720
|
+
|
|
28721
|
+
|
|
28722
|
+
|
|
28723
|
+
|
|
28724
|
+
|
|
28725
|
+
|
|
28726
|
+
|
|
28727
|
+
|
|
26970
28728
|
|
|
26971
28729
|
|
|
26972
28730
|
|
|
@@ -27123,6 +28881,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27123
28881
|
|
|
27124
28882
|
|
|
27125
28883
|
|
|
28884
|
+
|
|
28885
|
+
|
|
28886
|
+
|
|
28887
|
+
|
|
28888
|
+
|
|
28889
|
+
|
|
28890
|
+
|
|
28891
|
+
|
|
28892
|
+
|
|
28893
|
+
|
|
28894
|
+
|
|
28895
|
+
|
|
27126
28896
|
|
|
27127
28897
|
|
|
27128
28898
|
|
|
@@ -27314,6 +29084,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27314
29084
|
|
|
27315
29085
|
|
|
27316
29086
|
|
|
29087
|
+
|
|
29088
|
+
|
|
29089
|
+
|
|
29090
|
+
|
|
29091
|
+
|
|
29092
|
+
|
|
29093
|
+
|
|
29094
|
+
|
|
29095
|
+
|
|
29096
|
+
|
|
29097
|
+
|
|
29098
|
+
|
|
29099
|
+
|
|
29100
|
+
|
|
29101
|
+
|
|
27317
29102
|
|
|
27318
29103
|
|
|
27319
29104
|
|
|
@@ -27510,6 +29295,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27510
29295
|
|
|
27511
29296
|
|
|
27512
29297
|
|
|
29298
|
+
|
|
29299
|
+
|
|
29300
|
+
|
|
29301
|
+
|
|
29302
|
+
|
|
29303
|
+
|
|
29304
|
+
|
|
29305
|
+
|
|
29306
|
+
|
|
29307
|
+
|
|
29308
|
+
|
|
29309
|
+
|
|
29310
|
+
|
|
29311
|
+
|
|
29312
|
+
|
|
27513
29313
|
|
|
27514
29314
|
|
|
27515
29315
|
|
|
@@ -27713,6 +29513,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27713
29513
|
|
|
27714
29514
|
|
|
27715
29515
|
|
|
29516
|
+
|
|
29517
|
+
|
|
29518
|
+
|
|
29519
|
+
|
|
29520
|
+
|
|
29521
|
+
|
|
29522
|
+
|
|
29523
|
+
|
|
29524
|
+
|
|
29525
|
+
|
|
29526
|
+
|
|
29527
|
+
|
|
29528
|
+
|
|
29529
|
+
|
|
29530
|
+
|
|
27716
29531
|
|
|
27717
29532
|
|
|
27718
29533
|
|
|
@@ -27911,6 +29726,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
27911
29726
|
|
|
27912
29727
|
|
|
27913
29728
|
|
|
29729
|
+
|
|
29730
|
+
|
|
29731
|
+
|
|
29732
|
+
|
|
29733
|
+
|
|
29734
|
+
|
|
29735
|
+
|
|
29736
|
+
|
|
29737
|
+
|
|
29738
|
+
|
|
29739
|
+
|
|
29740
|
+
|
|
29741
|
+
|
|
29742
|
+
|
|
29743
|
+
|
|
27914
29744
|
|
|
27915
29745
|
|
|
27916
29746
|
|
|
@@ -28144,6 +29974,12 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28144
29974
|
|
|
28145
29975
|
|
|
28146
29976
|
|
|
29977
|
+
|
|
29978
|
+
|
|
29979
|
+
|
|
29980
|
+
|
|
29981
|
+
|
|
29982
|
+
|
|
28147
29983
|
* @example
|
|
28148
29984
|
* // Pagination by position in tree order
|
|
28149
29985
|
* const tree = new TreeMultiSet<number>(
|
|
@@ -28182,6 +30018,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28182
30018
|
|
|
28183
30019
|
|
|
28184
30020
|
|
|
30021
|
+
|
|
30022
|
+
|
|
30023
|
+
|
|
30024
|
+
|
|
30025
|
+
|
|
30026
|
+
|
|
30027
|
+
|
|
30028
|
+
|
|
30029
|
+
|
|
30030
|
+
|
|
30031
|
+
|
|
30032
|
+
|
|
30033
|
+
|
|
30034
|
+
|
|
30035
|
+
|
|
28185
30036
|
|
|
28186
30037
|
|
|
28187
30038
|
|
|
@@ -28339,6 +30190,18 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28339
30190
|
|
|
28340
30191
|
|
|
28341
30192
|
|
|
30193
|
+
|
|
30194
|
+
|
|
30195
|
+
|
|
30196
|
+
|
|
30197
|
+
|
|
30198
|
+
|
|
30199
|
+
|
|
30200
|
+
|
|
30201
|
+
|
|
30202
|
+
|
|
30203
|
+
|
|
30204
|
+
|
|
28342
30205
|
|
|
28343
30206
|
|
|
28344
30207
|
|
|
@@ -28531,6 +30394,21 @@ var _TreeMultiSet = class _TreeMultiSet {
|
|
|
28531
30394
|
|
|
28532
30395
|
|
|
28533
30396
|
|
|
30397
|
+
|
|
30398
|
+
|
|
30399
|
+
|
|
30400
|
+
|
|
30401
|
+
|
|
30402
|
+
|
|
30403
|
+
|
|
30404
|
+
|
|
30405
|
+
|
|
30406
|
+
|
|
30407
|
+
|
|
30408
|
+
|
|
30409
|
+
|
|
30410
|
+
|
|
30411
|
+
|
|
28534
30412
|
|
|
28535
30413
|
|
|
28536
30414
|
|