@live-change/flatten-interval-tree 0.8.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/.babelrc +8 -0
  2. package/.travis.yml +14 -0
  3. package/LICENSE +21 -0
  4. package/README.md +172 -0
  5. package/dist/main.cjs.js +799 -0
  6. package/dist/main.esm.js +794 -0
  7. package/dist/main.umd.js +805 -0
  8. package/docs/Interval.html +1609 -0
  9. package/docs/IntervalTree.html +1506 -0
  10. package/docs/classes_interval.js.html +173 -0
  11. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  12. package/docs/fonts/OpenSans-Bold-webfont.svg +1830 -0
  13. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  14. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  15. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  16. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  17. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  18. package/docs/fonts/OpenSans-Italic-webfont.svg +1830 -0
  19. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  20. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  21. package/docs/fonts/OpenSans-Light-webfont.svg +1831 -0
  22. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  23. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  24. package/docs/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  25. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  26. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  27. package/docs/fonts/OpenSans-Regular-webfont.svg +1831 -0
  28. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  29. package/docs/fonts/OpenSans-Semibold-webfont.eot +0 -0
  30. package/docs/fonts/OpenSans-Semibold-webfont.svg +1830 -0
  31. package/docs/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  32. package/docs/fonts/OpenSans-Semibold-webfont.woff +0 -0
  33. package/docs/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  34. package/docs/fonts/OpenSans-SemiboldItalic-webfont.svg +1830 -0
  35. package/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  36. package/docs/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  37. package/docs/index.html +197 -0
  38. package/docs/index.js.html +624 -0
  39. package/docs/interval.js.html +184 -0
  40. package/docs/intervalTree.js.html +624 -0
  41. package/docs/scripts/linenumber.js +25 -0
  42. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  43. package/docs/scripts/prettify/lang-css.js +2 -0
  44. package/docs/scripts/prettify/prettify.js +28 -0
  45. package/docs/styles/jsdoc-default.css +692 -0
  46. package/docs/styles/prettify-jsdoc.css +111 -0
  47. package/docs/styles/prettify-tomorrow.css +132 -0
  48. package/examples/browser/index.html +49 -0
  49. package/examples/create-react-app/package.json +15 -0
  50. package/examples/create-react-app/public/index.html +11 -0
  51. package/examples/create-react-app/src/App.js +38 -0
  52. package/examples/create-react-app/src/ComposersList.js +15 -0
  53. package/examples/create-react-app/src/index.js +5 -0
  54. package/examples/es6-module/index.html +50 -0
  55. package/examples/nodejs/index.js +23 -0
  56. package/index.d.ts +65 -0
  57. package/index.js +6 -0
  58. package/package.json +52 -0
  59. package/rollup.config.js +21 -0
  60. package/src/classes/interval.js +131 -0
  61. package/src/classes/intervalTree.js +564 -0
  62. package/src/classes/node.js +97 -0
  63. package/src/utils/constants.js +16 -0
  64. package/test/intervalTree.js +232 -0
  65. package/test/node.js +64 -0
@@ -0,0 +1,1506 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <title>IntervalTree - Documentation</title>
7
+
8
+ <script src="scripts/prettify/prettify.js"></script>
9
+ <script src="scripts/prettify/lang-css.js"></script>
10
+ <!--[if lt IE 9]>
11
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
12
+ <![endif]-->
13
+ <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
16
+ </head>
17
+ <body>
18
+
19
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
20
+ <label for="nav-trigger" class="navicon-button x">
21
+ <div class="navicon"></div>
22
+ </label>
23
+
24
+ <label for="nav-trigger" class="overlay"></label>
25
+
26
+ <nav>
27
+ <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Interval.html">Interval</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#.comparable_less_than">comparable_less_than</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#.comparable_max">comparable_max</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#clone">clone</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#equal_to">equal_to</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#intersect">intersect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#less_than">less_than</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#merge">merge</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#not_intersect">not_intersect</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Interval.html#output">output</a></span></li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="IntervalTree.html">IntervalTree</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IntervalTree.html#exist">exist</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IntervalTree.html#forEach">forEach</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IntervalTree.html#insert">insert</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IntervalTree.html#isEmpty">isEmpty</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IntervalTree.html#map">map</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IntervalTree.html#remove">remove</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="IntervalTree.html#search">search</a></span></li>
28
+ </nav>
29
+
30
+ <div id="main">
31
+
32
+ <h1 class="page-title">IntervalTree</h1>
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+ <section>
41
+
42
+ <header>
43
+
44
+ <h2>
45
+ IntervalTree
46
+ </h2>
47
+
48
+ <div class="class-description">Implementation of interval binary search tree <br/>
49
+
50
+
51
+ </header>
52
+
53
+ <article>
54
+ <div class="container-overview">
55
+
56
+
57
+ <div class="section-method">
58
+
59
+
60
+ <h2>Constructor</h2>
61
+
62
+
63
+ <h4 class="name" id="IntervalTree"><span class="type-signature"></span>new IntervalTree<span class="signature">()</span><span class="type-signature"></span></h4>
64
+
65
+
66
+
67
+
68
+
69
+ <div class="description">
70
+ Construct new empty instance of IntervalTree
71
+ </div>
72
+
73
+
74
+
75
+
76
+
77
+ <dl class="details">
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ <dt class="tag-source">Source:</dt>
105
+ <dd class="tag-source"><ul class="dummy"><li>
106
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line21">line 21</a>
107
+ </li></ul></dd>
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ </dl>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+ </div>
140
+
141
+ </div>
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ <h3 class="subsection-title">Members</h3>
155
+
156
+
157
+
158
+ <div class="section-members">
159
+ <h4 class="name" id="items"><span class="type-signature"></span>items<span class="type-signature"></span></h4>
160
+
161
+
162
+
163
+
164
+ <div class="description">
165
+ Returns array of items (<key,value> pairs) in the ascended keys order
166
+ </div>
167
+
168
+
169
+
170
+
171
+
172
+ <dl class="details">
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+ <dt class="tag-source">Source:</dt>
200
+ <dd class="tag-source"><ul class="dummy"><li>
201
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line62">line 62</a>
202
+ </li></ul></dd>
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+ </dl>
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ </div>
219
+
220
+
221
+
222
+ <div class="section-members">
223
+ <h4 class="name" id="keys"><span class="type-signature"></span>keys<span class="type-signature"></span></h4>
224
+
225
+
226
+
227
+
228
+ <div class="description">
229
+ Returns array of sorted keys in the ascending order
230
+ </div>
231
+
232
+
233
+
234
+
235
+
236
+ <dl class="details">
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+ <dt class="tag-source">Source:</dt>
264
+ <dd class="tag-source"><ul class="dummy"><li>
265
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line40">line 40</a>
266
+ </li></ul></dd>
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+ </dl>
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+ </div>
283
+
284
+
285
+
286
+ <div class="section-members">
287
+ <h4 class="name" id="size"><span class="type-signature"></span>size<span class="type-signature"></span></h4>
288
+
289
+
290
+
291
+
292
+ <div class="description">
293
+ Returns number of items stored in the interval tree
294
+ </div>
295
+
296
+
297
+
298
+
299
+
300
+ <dl class="details">
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <dt class="tag-source">Source:</dt>
328
+ <dd class="tag-source"><ul class="dummy"><li>
329
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line30">line 30</a>
330
+ </li></ul></dd>
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ </dl>
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+ </div>
347
+
348
+
349
+
350
+ <div class="section-members">
351
+ <h4 class="name" id="values"><span class="type-signature"></span>values<span class="type-signature"></span></h4>
352
+
353
+
354
+
355
+
356
+ <div class="description">
357
+ Return array of values in the ascending keys order
358
+ </div>
359
+
360
+
361
+
362
+
363
+
364
+ <dl class="details">
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+ <dt class="tag-source">Source:</dt>
392
+ <dd class="tag-source"><ul class="dummy"><li>
393
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line52">line 52</a>
394
+ </li></ul></dd>
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+ </dl>
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+ </div>
411
+
412
+
413
+
414
+
415
+
416
+ <h3 class="subsection-title">Methods</h3>
417
+
418
+
419
+
420
+ <div class="section-method">
421
+
422
+
423
+
424
+ <h4 class="name" id="exist"><span class="type-signature"></span>exist<span class="signature">(key, value)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
425
+
426
+
427
+
428
+
429
+
430
+ <div class="description">
431
+ Returns true if item {key,value} exist in the tree
432
+ </div>
433
+
434
+
435
+
436
+
437
+
438
+ <dl class="details">
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+ <dt class="tag-source">Source:</dt>
466
+ <dd class="tag-source"><ul class="dummy"><li>
467
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line99">line 99</a>
468
+ </li></ul></dd>
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+ </dl>
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+ <h5>Parameters:</h5>
487
+
488
+
489
+ <table class="params">
490
+ <thead>
491
+ <tr>
492
+
493
+ <th>Name</th>
494
+
495
+
496
+ <th>Type</th>
497
+
498
+
499
+
500
+
501
+
502
+ <th class="last">Description</th>
503
+ </tr>
504
+ </thead>
505
+
506
+ <tbody>
507
+
508
+
509
+ <tr>
510
+
511
+ <td class="name"><code>key</code></td>
512
+
513
+
514
+ <td class="type">
515
+
516
+ </td>
517
+
518
+
519
+
520
+
521
+
522
+ <td class="description last">
523
+ interval correspondent to keys stored in the tree
524
+
525
+ </td>
526
+ </tr>
527
+
528
+
529
+
530
+ <tr>
531
+
532
+ <td class="name"><code>value</code></td>
533
+
534
+
535
+ <td class="type">
536
+
537
+ </td>
538
+
539
+
540
+
541
+
542
+
543
+ <td class="description last">
544
+ value object to be checked
545
+
546
+ </td>
547
+ </tr>
548
+
549
+
550
+ </tbody>
551
+ </table>
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+ <div class="section-returns">
567
+ <h5>Returns:</h5>
568
+
569
+
570
+
571
+ <dl class="param-type">
572
+ <dt>
573
+ Type:
574
+ </dt>
575
+ <dd>
576
+
577
+ <span class="param-type"><code>boolean</code></span>
578
+
579
+
580
+ </dd>
581
+ </dl>
582
+
583
+
584
+ <div class="param-desc">
585
+ - true if item {key, value} exist in the tree, false otherwise
586
+ </div>
587
+
588
+
589
+ </div>
590
+
591
+
592
+
593
+ </div>
594
+
595
+
596
+ <div class="section-method">
597
+
598
+
599
+
600
+ <h4 class="name" id="forEach"><span class="type-signature"></span>forEach<span class="signature">(visitor(key,value))</span><span class="type-signature"></span></h4>
601
+
602
+
603
+
604
+
605
+
606
+ <div class="description">
607
+ Tree visitor. For each node implement a callback function. <br/>
608
+ </div>
609
+
610
+
611
+
612
+
613
+
614
+ <dl class="details">
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+ <dt class="tag-source">Source:</dt>
642
+ <dd class="tag-source"><ul class="dummy"><li>
643
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line138">line 138</a>
644
+ </li></ul></dd>
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+ </dl>
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+ <h5>Parameters:</h5>
663
+
664
+
665
+ <table class="params">
666
+ <thead>
667
+ <tr>
668
+
669
+ <th>Name</th>
670
+
671
+
672
+ <th>Type</th>
673
+
674
+
675
+
676
+
677
+
678
+ <th class="last">Description</th>
679
+ </tr>
680
+ </thead>
681
+
682
+ <tbody>
683
+
684
+
685
+ <tr>
686
+
687
+ <td class="name"><code>visitor(key,value)</code></td>
688
+
689
+
690
+ <td class="type">
691
+
692
+ </td>
693
+
694
+
695
+
696
+
697
+
698
+ <td class="description last">
699
+ function to be called for each tree item
700
+
701
+ </td>
702
+ </tr>
703
+
704
+
705
+ </tbody>
706
+ </table>
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+ </div>
724
+
725
+
726
+ <div class="section-method">
727
+
728
+
729
+
730
+ <h4 class="name" id="insert"><span class="type-signature"></span>insert<span class="signature">(key, value)</span><span class="type-signature"> &rarr; {Node}</span></h4>
731
+
732
+
733
+
734
+
735
+
736
+ <div class="description">
737
+ Insert new item into interval tree
738
+ </div>
739
+
740
+
741
+
742
+
743
+
744
+ <dl class="details">
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+
760
+
761
+
762
+
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
771
+ <dt class="tag-source">Source:</dt>
772
+ <dd class="tag-source"><ul class="dummy"><li>
773
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line85">line 85</a>
774
+ </li></ul></dd>
775
+
776
+
777
+
778
+
779
+
780
+
781
+
782
+ </dl>
783
+
784
+
785
+
786
+
787
+
788
+
789
+
790
+
791
+
792
+ <h5>Parameters:</h5>
793
+
794
+
795
+ <table class="params">
796
+ <thead>
797
+ <tr>
798
+
799
+ <th>Name</th>
800
+
801
+
802
+ <th>Type</th>
803
+
804
+
805
+
806
+
807
+
808
+ <th class="last">Description</th>
809
+ </tr>
810
+ </thead>
811
+
812
+ <tbody>
813
+
814
+
815
+ <tr>
816
+
817
+ <td class="name"><code>key</code></td>
818
+
819
+
820
+ <td class="type">
821
+
822
+ </td>
823
+
824
+
825
+
826
+
827
+
828
+ <td class="description last">
829
+ interval object or array of two numbers [low, high]
830
+
831
+ </td>
832
+ </tr>
833
+
834
+
835
+
836
+ <tr>
837
+
838
+ <td class="name"><code>value</code></td>
839
+
840
+
841
+ <td class="type">
842
+
843
+ </td>
844
+
845
+
846
+
847
+
848
+
849
+ <td class="description last">
850
+ value representing any object (optional)
851
+
852
+ </td>
853
+ </tr>
854
+
855
+
856
+ </tbody>
857
+ </table>
858
+
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+
869
+
870
+
871
+
872
+ <div class="section-returns">
873
+ <h5>Returns:</h5>
874
+
875
+
876
+
877
+ <dl class="param-type">
878
+ <dt>
879
+ Type:
880
+ </dt>
881
+ <dd>
882
+
883
+ <span class="param-type"><code>Node</code></span>
884
+
885
+
886
+ </dd>
887
+ </dl>
888
+
889
+
890
+ <div class="param-desc">
891
+ - returns reference to inserted node as an object {key:interval, value: value}
892
+ </div>
893
+
894
+
895
+ </div>
896
+
897
+
898
+
899
+ </div>
900
+
901
+
902
+ <div class="section-method">
903
+
904
+
905
+
906
+ <h4 class="name" id="isEmpty"><span class="type-signature"></span>isEmpty<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
907
+
908
+
909
+
910
+
911
+
912
+ <div class="description">
913
+ Returns true if tree is empty
914
+ </div>
915
+
916
+
917
+
918
+
919
+
920
+ <dl class="details">
921
+
922
+
923
+
924
+
925
+
926
+
927
+
928
+
929
+
930
+
931
+
932
+
933
+
934
+
935
+
936
+
937
+
938
+
939
+
940
+
941
+
942
+
943
+
944
+
945
+
946
+
947
+ <dt class="tag-source">Source:</dt>
948
+ <dd class="tag-source"><ul class="dummy"><li>
949
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line75">line 75</a>
950
+ </li></ul></dd>
951
+
952
+
953
+
954
+
955
+
956
+
957
+
958
+ </dl>
959
+
960
+
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+
971
+
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+ <div class="section-returns">
981
+ <h5>Returns:</h5>
982
+
983
+
984
+
985
+ <dl class="param-type">
986
+ <dt>
987
+ Type:
988
+ </dt>
989
+ <dd>
990
+
991
+ <span class="param-type"><code>boolean</code></span>
992
+
993
+
994
+ </dd>
995
+ </dl>
996
+
997
+
998
+
999
+ </div>
1000
+
1001
+
1002
+
1003
+ </div>
1004
+
1005
+
1006
+ <div class="section-method">
1007
+
1008
+
1009
+
1010
+ <h4 class="name" id="map"><span class="type-signature"></span>map<span class="signature">(callback(value,)</span><span class="type-signature"></span></h4>
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+ <div class="description">
1017
+ Value Mapper. Walk through every node and map node value to another value
1018
+ </div>
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+ <dl class="details">
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+
1049
+
1050
+
1051
+ <dt class="tag-source">Source:</dt>
1052
+ <dd class="tag-source"><ul class="dummy"><li>
1053
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line145">line 145</a>
1054
+ </li></ul></dd>
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+ </dl>
1063
+
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+ <h5>Parameters:</h5>
1073
+
1074
+
1075
+ <table class="params">
1076
+ <thead>
1077
+ <tr>
1078
+
1079
+ <th>Name</th>
1080
+
1081
+
1082
+ <th>Type</th>
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+ <th class="last">Description</th>
1089
+ </tr>
1090
+ </thead>
1091
+
1092
+ <tbody>
1093
+
1094
+
1095
+ <tr>
1096
+
1097
+ <td class="name"><code>callback(value,</code></td>
1098
+
1099
+
1100
+ <td class="type">
1101
+
1102
+ </td>
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+ <td class="description last">
1109
+ key) - function to be called for each tree item
1110
+
1111
+ </td>
1112
+ </tr>
1113
+
1114
+
1115
+ </tbody>
1116
+ </table>
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+ </div>
1134
+
1135
+
1136
+ <div class="section-method">
1137
+
1138
+
1139
+
1140
+ <h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">(key, value)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+ <div class="description">
1147
+ Remove entry {key, value} from the tree
1148
+ </div>
1149
+
1150
+
1151
+
1152
+
1153
+
1154
+ <dl class="details">
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+ <dt class="tag-source">Source:</dt>
1182
+ <dd class="tag-source"><ul class="dummy"><li>
1183
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line110">line 110</a>
1184
+ </li></ul></dd>
1185
+
1186
+
1187
+
1188
+
1189
+
1190
+
1191
+
1192
+ </dl>
1193
+
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+
1202
+ <h5>Parameters:</h5>
1203
+
1204
+
1205
+ <table class="params">
1206
+ <thead>
1207
+ <tr>
1208
+
1209
+ <th>Name</th>
1210
+
1211
+
1212
+ <th>Type</th>
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+ <th class="last">Description</th>
1219
+ </tr>
1220
+ </thead>
1221
+
1222
+ <tbody>
1223
+
1224
+
1225
+ <tr>
1226
+
1227
+ <td class="name"><code>key</code></td>
1228
+
1229
+
1230
+ <td class="type">
1231
+
1232
+ </td>
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+ <td class="description last">
1239
+ interval correspondent to keys stored in the tree
1240
+
1241
+ </td>
1242
+ </tr>
1243
+
1244
+
1245
+
1246
+ <tr>
1247
+
1248
+ <td class="name"><code>value</code></td>
1249
+
1250
+
1251
+ <td class="type">
1252
+
1253
+ </td>
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+ <td class="description last">
1260
+ - value object
1261
+
1262
+ </td>
1263
+ </tr>
1264
+
1265
+
1266
+ </tbody>
1267
+ </table>
1268
+
1269
+
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+ <div class="section-returns">
1283
+ <h5>Returns:</h5>
1284
+
1285
+
1286
+
1287
+ <dl class="param-type">
1288
+ <dt>
1289
+ Type:
1290
+ </dt>
1291
+ <dd>
1292
+
1293
+ <span class="param-type"><code>boolean</code></span>
1294
+
1295
+
1296
+ </dd>
1297
+ </dl>
1298
+
1299
+
1300
+ <div class="param-desc">
1301
+ - true if item {key, value} deleted, false if not found
1302
+ </div>
1303
+
1304
+
1305
+ </div>
1306
+
1307
+
1308
+
1309
+ </div>
1310
+
1311
+
1312
+ <div class="section-method">
1313
+
1314
+
1315
+
1316
+ <h4 class="name" id="search"><span class="type-signature"></span>search<span class="signature">(interval, outputMapperFn(value,key))</span><span class="type-signature"> &rarr; {Array}</span></h4>
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+ <div class="description">
1323
+ Returns array of entry values which keys intersect with given interval <br/>
1324
+ </div>
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+ <dl class="details">
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+ <dt class="tag-source">Source:</dt>
1358
+ <dd class="tag-source"><ul class="dummy"><li>
1359
+ <a href="intervalTree.js.html">intervalTree.js</a>, <a href="intervalTree.js.html#line126">line 126</a>
1360
+ </li></ul></dd>
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+ </dl>
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+ <h5>Parameters:</h5>
1379
+
1380
+
1381
+ <table class="params">
1382
+ <thead>
1383
+ <tr>
1384
+
1385
+ <th>Name</th>
1386
+
1387
+
1388
+ <th>Type</th>
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+ <th class="last">Description</th>
1395
+ </tr>
1396
+ </thead>
1397
+
1398
+ <tbody>
1399
+
1400
+
1401
+ <tr>
1402
+
1403
+ <td class="name"><code>interval</code></td>
1404
+
1405
+
1406
+ <td class="type">
1407
+
1408
+ </td>
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+ <td class="description last">
1415
+ search interval, or array [low, high]
1416
+
1417
+ </td>
1418
+ </tr>
1419
+
1420
+
1421
+
1422
+ <tr>
1423
+
1424
+ <td class="name"><code>outputMapperFn(value,key)</code></td>
1425
+
1426
+
1427
+ <td class="type">
1428
+
1429
+ </td>
1430
+
1431
+
1432
+
1433
+
1434
+
1435
+ <td class="description last">
1436
+ optional function that maps (value, key) to custom output
1437
+
1438
+ </td>
1439
+ </tr>
1440
+
1441
+
1442
+ </tbody>
1443
+ </table>
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+ <div class="section-returns">
1459
+ <h5>Returns:</h5>
1460
+
1461
+
1462
+
1463
+ <dl class="param-type">
1464
+ <dt>
1465
+ Type:
1466
+ </dt>
1467
+ <dd>
1468
+
1469
+ <span class="param-type"><code>Array</code></span>
1470
+
1471
+
1472
+ </dd>
1473
+ </dl>
1474
+
1475
+
1476
+
1477
+ </div>
1478
+
1479
+
1480
+
1481
+ </div>
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+
1488
+ </article>
1489
+
1490
+ </section>
1491
+
1492
+
1493
+
1494
+
1495
+ </div>
1496
+
1497
+ <br class="clear">
1498
+
1499
+ <footer>
1500
+ Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.2</a> on Thu Jul 04 2019 20:41:00 GMT+0300 (Israel Daylight Time) using the Minami theme.
1501
+ </footer>
1502
+
1503
+ <script>prettyPrint();</script>
1504
+ <script src="scripts/linenumber.js"></script>
1505
+ </body>
1506
+ </html>