data-structure-typed 1.42.6 → 1.42.8
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/CHANGELOG.md +1 -1
- package/README.md +123 -123
- package/benchmark/report.html +12 -12
- package/benchmark/report.json +101 -101
- package/dist/cjs/src/data-structures/binary-tree/avl-tree.d.ts +5 -5
- package/dist/cjs/src/data-structures/binary-tree/avl-tree.js +19 -14
- package/dist/cjs/src/data-structures/binary-tree/avl-tree.js.map +1 -1
- package/dist/cjs/src/data-structures/binary-tree/binary-tree.d.ts +108 -60
- package/dist/cjs/src/data-structures/binary-tree/binary-tree.js +189 -89
- package/dist/cjs/src/data-structures/binary-tree/binary-tree.js.map +1 -1
- package/dist/cjs/src/data-structures/binary-tree/bst.d.ts +30 -8
- package/dist/cjs/src/data-structures/binary-tree/bst.js +77 -28
- package/dist/cjs/src/data-structures/binary-tree/bst.js.map +1 -1
- package/dist/cjs/src/data-structures/binary-tree/rb-tree.d.ts +35 -28
- package/dist/cjs/src/data-structures/binary-tree/rb-tree.js +44 -45
- package/dist/cjs/src/data-structures/binary-tree/rb-tree.js.map +1 -1
- package/dist/cjs/src/data-structures/binary-tree/tree-multimap.d.ts +7 -12
- package/dist/cjs/src/data-structures/binary-tree/tree-multimap.js +38 -37
- package/dist/cjs/src/data-structures/binary-tree/tree-multimap.js.map +1 -1
- package/dist/cjs/src/interfaces/binary-tree.d.ts +2 -2
- package/dist/cjs/src/types/data-structures/binary-tree/binary-tree.d.ts +1 -1
- package/dist/cjs/src/types/data-structures/binary-tree/binary-tree.js +6 -0
- package/dist/cjs/src/types/data-structures/binary-tree/binary-tree.js.map +1 -1
- package/dist/cjs/src/types/data-structures/binary-tree/rb-tree.d.ts +2 -2
- package/dist/mjs/src/data-structures/binary-tree/avl-tree.d.ts +5 -5
- package/dist/mjs/src/data-structures/binary-tree/avl-tree.js +19 -14
- package/dist/mjs/src/data-structures/binary-tree/binary-tree.d.ts +108 -60
- package/dist/mjs/src/data-structures/binary-tree/binary-tree.js +191 -89
- package/dist/mjs/src/data-structures/binary-tree/bst.d.ts +30 -8
- package/dist/mjs/src/data-structures/binary-tree/bst.js +78 -27
- package/dist/mjs/src/data-structures/binary-tree/rb-tree.d.ts +35 -28
- package/dist/mjs/src/data-structures/binary-tree/rb-tree.js +43 -45
- package/dist/mjs/src/data-structures/binary-tree/tree-multimap.d.ts +7 -12
- package/dist/mjs/src/data-structures/binary-tree/tree-multimap.js +38 -37
- package/dist/mjs/src/interfaces/binary-tree.d.ts +2 -2
- package/dist/mjs/src/types/data-structures/binary-tree/binary-tree.d.ts +1 -1
- package/dist/mjs/src/types/data-structures/binary-tree/binary-tree.js +6 -0
- package/dist/mjs/src/types/data-structures/binary-tree/rb-tree.d.ts +2 -2
- package/dist/umd/data-structure-typed.min.js +1 -1
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/package.json +1 -1
- package/src/data-structures/binary-tree/avl-tree.ts +24 -18
- package/src/data-structures/binary-tree/binary-tree.ts +248 -142
- package/src/data-structures/binary-tree/bst.ts +88 -38
- package/src/data-structures/binary-tree/rb-tree.ts +52 -58
- package/src/data-structures/binary-tree/tree-multimap.ts +50 -54
- package/src/interfaces/binary-tree.ts +2 -2
- package/src/types/data-structures/binary-tree/binary-tree.ts +7 -1
- package/src/types/data-structures/binary-tree/rb-tree.ts +2 -2
- package/test/unit/data-structures/binary-tree/rb-tree.test.ts +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
9
9
|
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
|
|
10
10
|
|
|
11
|
-
## [v1.42.
|
|
11
|
+
## [v1.42.8](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
|
|
12
12
|
|
|
13
13
|
### Changes
|
|
14
14
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
|
-

|
|
6
6
|

|
|
7
7
|

|
|
8
8
|

|
|
@@ -25,108 +25,6 @@ Now you can use this library in Node.js and browser environments in CommonJS(req
|
|
|
25
25
|
[//]: # ()
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
## Built-in classic algorithms
|
|
29
|
-
|
|
30
|
-
<table>
|
|
31
|
-
<thead>
|
|
32
|
-
<tr>
|
|
33
|
-
<th>Algorithm</th>
|
|
34
|
-
<th>Function Description</th>
|
|
35
|
-
<th>Iteration Type</th>
|
|
36
|
-
</tr>
|
|
37
|
-
</thead>
|
|
38
|
-
<tbody>
|
|
39
|
-
<tr>
|
|
40
|
-
<td>Binary Tree DFS</td>
|
|
41
|
-
<td>Traverse a binary tree in a depth-first manner, starting from the root node, first visiting the left subtree,
|
|
42
|
-
and then the right subtree, using recursion.
|
|
43
|
-
</td>
|
|
44
|
-
<td>Recursion + Iteration</td>
|
|
45
|
-
</tr>
|
|
46
|
-
<tr>
|
|
47
|
-
<td>Binary Tree BFS</td>
|
|
48
|
-
<td>Traverse a binary tree in a breadth-first manner, starting from the root node, visiting nodes level by level
|
|
49
|
-
from left to right.
|
|
50
|
-
</td>
|
|
51
|
-
<td>Iteration</td>
|
|
52
|
-
</tr>
|
|
53
|
-
<tr>
|
|
54
|
-
<td>Graph DFS</td>
|
|
55
|
-
<td>Traverse a graph in a depth-first manner, starting from a given node, exploring along one path as deeply as
|
|
56
|
-
possible, and backtracking to explore other paths. Used for finding connected components, paths, etc.
|
|
57
|
-
</td>
|
|
58
|
-
<td>Recursion + Iteration</td>
|
|
59
|
-
</tr>
|
|
60
|
-
<tr>
|
|
61
|
-
<td>Binary Tree Morris</td>
|
|
62
|
-
<td>Morris traversal is an in-order traversal algorithm for binary trees with O(1) space complexity. It allows tree
|
|
63
|
-
traversal without additional stack or recursion.
|
|
64
|
-
</td>
|
|
65
|
-
<td>Iteration</td>
|
|
66
|
-
</tr>
|
|
67
|
-
<tr>
|
|
68
|
-
<td>Graph BFS</td>
|
|
69
|
-
<td>Traverse a graph in a breadth-first manner, starting from a given node, first visiting nodes directly connected
|
|
70
|
-
to the starting node, and then expanding level by level. Used for finding shortest paths, etc.
|
|
71
|
-
</td>
|
|
72
|
-
<td>Recursion + Iteration</td>
|
|
73
|
-
</tr>
|
|
74
|
-
<tr>
|
|
75
|
-
<td>Graph Tarjan's Algorithm</td>
|
|
76
|
-
<td>Find strongly connected components in a graph, typically implemented using depth-first search.</td>
|
|
77
|
-
<td>Recursion</td>
|
|
78
|
-
</tr>
|
|
79
|
-
<tr>
|
|
80
|
-
<td>Graph Bellman-Ford Algorithm</td>
|
|
81
|
-
<td>Finding the shortest paths from a single source, can handle negative weight edges</td>
|
|
82
|
-
<td>Iteration</td>
|
|
83
|
-
</tr>
|
|
84
|
-
<tr>
|
|
85
|
-
<td>Graph Dijkstra's Algorithm</td>
|
|
86
|
-
<td>Finding the shortest paths from a single source, cannot handle negative weight edges</td>
|
|
87
|
-
<td>Iteration</td>
|
|
88
|
-
</tr>
|
|
89
|
-
<tr>
|
|
90
|
-
<td>Graph Floyd-Warshall Algorithm</td>
|
|
91
|
-
<td>Finding the shortest paths between all pairs of nodes</td>
|
|
92
|
-
<td>Iteration</td>
|
|
93
|
-
</tr>
|
|
94
|
-
<tr>
|
|
95
|
-
<td>Graph getCycles</td>
|
|
96
|
-
<td>Find all cycles in a graph or detect the presence of cycles.</td>
|
|
97
|
-
<td>Recursion</td>
|
|
98
|
-
</tr>
|
|
99
|
-
<tr>
|
|
100
|
-
<td>Graph getCutVertexes</td>
|
|
101
|
-
<td>Find cut vertices in a graph, which are nodes that, when removed, increase the number of connected components in
|
|
102
|
-
the graph.
|
|
103
|
-
</td>
|
|
104
|
-
<td>Recursion</td>
|
|
105
|
-
</tr>
|
|
106
|
-
<tr>
|
|
107
|
-
<td>Graph getSCCs</td>
|
|
108
|
-
<td>Find strongly connected components in a graph, which are subgraphs where any two nodes can reach each other.
|
|
109
|
-
</td>
|
|
110
|
-
<td>Recursion</td>
|
|
111
|
-
</tr>
|
|
112
|
-
<tr>
|
|
113
|
-
<td>Graph getBridges</td>
|
|
114
|
-
<td>Find bridges in a graph, which are edges that, when removed, increase the number of connected components in the
|
|
115
|
-
graph.
|
|
116
|
-
</td>
|
|
117
|
-
<td>Recursion</td>
|
|
118
|
-
</tr>
|
|
119
|
-
<tr>
|
|
120
|
-
<td>Graph topologicalSort</td>
|
|
121
|
-
<td>Perform topological sorting on a directed acyclic graph (DAG) to find a linear order of nodes such that all
|
|
122
|
-
directed edges go from earlier nodes to later nodes.
|
|
123
|
-
</td>
|
|
124
|
-
<td>Recursion</td>
|
|
125
|
-
</tr>
|
|
126
|
-
</tbody>
|
|
127
|
-
</table>
|
|
128
|
-
|
|
129
|
-
|
|
130
28
|
## Installation and Usage
|
|
131
29
|
|
|
132
30
|
### npm
|
|
@@ -174,13 +72,6 @@ const {
|
|
|
174
72
|

|
|
175
73
|

|
|
176
74
|
|
|
177
|
-
## API docs & Examples
|
|
178
|
-
|
|
179
|
-
[API Docs](https://data-structure-typed-docs.vercel.app)
|
|
180
|
-
|
|
181
|
-
[Live Examples](https://vivid-algorithm.vercel.app)
|
|
182
|
-
|
|
183
|
-
<a href="https://github.com/zrwusa/vivid-algorithm" target="_blank">Examples Repository</a>
|
|
184
75
|
|
|
185
76
|
## Code Snippets
|
|
186
77
|
|
|
@@ -338,6 +229,115 @@ const dijkstraResult = graph.dijkstra('A');
|
|
|
338
229
|
Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.key) // ['A', 'B', 'D']
|
|
339
230
|
```
|
|
340
231
|
|
|
232
|
+
## Built-in classic algorithms
|
|
233
|
+
|
|
234
|
+
<table>
|
|
235
|
+
<thead>
|
|
236
|
+
<tr>
|
|
237
|
+
<th>Algorithm</th>
|
|
238
|
+
<th>Function Description</th>
|
|
239
|
+
<th>Iteration Type</th>
|
|
240
|
+
</tr>
|
|
241
|
+
</thead>
|
|
242
|
+
<tbody>
|
|
243
|
+
<tr>
|
|
244
|
+
<td>Binary Tree DFS</td>
|
|
245
|
+
<td>Traverse a binary tree in a depth-first manner, starting from the root node, first visiting the left subtree,
|
|
246
|
+
and then the right subtree, using recursion.
|
|
247
|
+
</td>
|
|
248
|
+
<td>Recursion + Iteration</td>
|
|
249
|
+
</tr>
|
|
250
|
+
<tr>
|
|
251
|
+
<td>Binary Tree BFS</td>
|
|
252
|
+
<td>Traverse a binary tree in a breadth-first manner, starting from the root node, visiting nodes level by level
|
|
253
|
+
from left to right.
|
|
254
|
+
</td>
|
|
255
|
+
<td>Iteration</td>
|
|
256
|
+
</tr>
|
|
257
|
+
<tr>
|
|
258
|
+
<td>Graph DFS</td>
|
|
259
|
+
<td>Traverse a graph in a depth-first manner, starting from a given node, exploring along one path as deeply as
|
|
260
|
+
possible, and backtracking to explore other paths. Used for finding connected components, paths, etc.
|
|
261
|
+
</td>
|
|
262
|
+
<td>Recursion + Iteration</td>
|
|
263
|
+
</tr>
|
|
264
|
+
<tr>
|
|
265
|
+
<td>Binary Tree Morris</td>
|
|
266
|
+
<td>Morris traversal is an in-order traversal algorithm for binary trees with O(1) space complexity. It allows tree
|
|
267
|
+
traversal without additional stack or recursion.
|
|
268
|
+
</td>
|
|
269
|
+
<td>Iteration</td>
|
|
270
|
+
</tr>
|
|
271
|
+
<tr>
|
|
272
|
+
<td>Graph BFS</td>
|
|
273
|
+
<td>Traverse a graph in a breadth-first manner, starting from a given node, first visiting nodes directly connected
|
|
274
|
+
to the starting node, and then expanding level by level. Used for finding shortest paths, etc.
|
|
275
|
+
</td>
|
|
276
|
+
<td>Recursion + Iteration</td>
|
|
277
|
+
</tr>
|
|
278
|
+
<tr>
|
|
279
|
+
<td>Graph Tarjan's Algorithm</td>
|
|
280
|
+
<td>Find strongly connected components in a graph, typically implemented using depth-first search.</td>
|
|
281
|
+
<td>Recursion</td>
|
|
282
|
+
</tr>
|
|
283
|
+
<tr>
|
|
284
|
+
<td>Graph Bellman-Ford Algorithm</td>
|
|
285
|
+
<td>Finding the shortest paths from a single source, can handle negative weight edges</td>
|
|
286
|
+
<td>Iteration</td>
|
|
287
|
+
</tr>
|
|
288
|
+
<tr>
|
|
289
|
+
<td>Graph Dijkstra's Algorithm</td>
|
|
290
|
+
<td>Finding the shortest paths from a single source, cannot handle negative weight edges</td>
|
|
291
|
+
<td>Iteration</td>
|
|
292
|
+
</tr>
|
|
293
|
+
<tr>
|
|
294
|
+
<td>Graph Floyd-Warshall Algorithm</td>
|
|
295
|
+
<td>Finding the shortest paths between all pairs of nodes</td>
|
|
296
|
+
<td>Iteration</td>
|
|
297
|
+
</tr>
|
|
298
|
+
<tr>
|
|
299
|
+
<td>Graph getCycles</td>
|
|
300
|
+
<td>Find all cycles in a graph or detect the presence of cycles.</td>
|
|
301
|
+
<td>Recursion</td>
|
|
302
|
+
</tr>
|
|
303
|
+
<tr>
|
|
304
|
+
<td>Graph getCutVertexes</td>
|
|
305
|
+
<td>Find cut vertices in a graph, which are nodes that, when removed, increase the number of connected components in
|
|
306
|
+
the graph.
|
|
307
|
+
</td>
|
|
308
|
+
<td>Recursion</td>
|
|
309
|
+
</tr>
|
|
310
|
+
<tr>
|
|
311
|
+
<td>Graph getSCCs</td>
|
|
312
|
+
<td>Find strongly connected components in a graph, which are subgraphs where any two nodes can reach each other.
|
|
313
|
+
</td>
|
|
314
|
+
<td>Recursion</td>
|
|
315
|
+
</tr>
|
|
316
|
+
<tr>
|
|
317
|
+
<td>Graph getBridges</td>
|
|
318
|
+
<td>Find bridges in a graph, which are edges that, when removed, increase the number of connected components in the
|
|
319
|
+
graph.
|
|
320
|
+
</td>
|
|
321
|
+
<td>Recursion</td>
|
|
322
|
+
</tr>
|
|
323
|
+
<tr>
|
|
324
|
+
<td>Graph topologicalSort</td>
|
|
325
|
+
<td>Perform topological sorting on a directed acyclic graph (DAG) to find a linear order of nodes such that all
|
|
326
|
+
directed edges go from earlier nodes to later nodes.
|
|
327
|
+
</td>
|
|
328
|
+
<td>Recursion</td>
|
|
329
|
+
</tr>
|
|
330
|
+
</tbody>
|
|
331
|
+
</table>
|
|
332
|
+
|
|
333
|
+
## API docs & Examples
|
|
334
|
+
|
|
335
|
+
[API Docs](https://data-structure-typed-docs.vercel.app)
|
|
336
|
+
|
|
337
|
+
[Live Examples](https://vivid-algorithm.vercel.app)
|
|
338
|
+
|
|
339
|
+
<a href="https://github.com/zrwusa/vivid-algorithm" target="_blank">Examples Repository</a>
|
|
340
|
+
|
|
341
341
|
## Data Structures
|
|
342
342
|
|
|
343
343
|
<table>
|
|
@@ -376,7 +376,7 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.key) // ['A', 'B', '
|
|
|
376
376
|
<td>Red Black Tree</td>
|
|
377
377
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
378
378
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
379
|
-
<td><a href="https://data-structure-typed-docs.vercel.app/classes/RedBlackTree.html"><span>
|
|
379
|
+
<td><a href="https://data-structure-typed-docs.vercel.app/classes/RedBlackTree.html"><span>RedBlackTree</span></a></td>
|
|
380
380
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
381
381
|
</tr>
|
|
382
382
|
<tr>
|
|
@@ -728,40 +728,40 @@ optimal approach to data structure design.
|
|
|
728
728
|
[//]: # (No deletion!!! Start of Replace Section)
|
|
729
729
|
<div class="json-to-html-collapse clearfix 0">
|
|
730
730
|
<div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
|
|
731
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
731
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>45.48</td><td>21.99</td><td>0.04</td></tr><tr><td>10,000 add & delete randomly</td><td>132.35</td><td>7.56</td><td>0.10</td></tr><tr><td>10,000 addMany</td><td>79.22</td><td>12.62</td><td>0.07</td></tr><tr><td>10,000 get</td><td>93.13</td><td>10.74</td><td>0.06</td></tr></table></div>
|
|
732
732
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
733
733
|
<div class='collapsible level0' ><span class='json-to-html-label'>binary-tree</span></div>
|
|
734
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>
|
|
734
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>23.89</td><td>41.85</td><td>0.01</td></tr><tr><td>1,000 add & delete randomly</td><td>22.84</td><td>43.78</td><td>0.01</td></tr><tr><td>1,000 addMany</td><td>10.61</td><td>94.22</td><td>4.91e-4</td></tr><tr><td>1,000 get</td><td>18.56</td><td>53.87</td><td>8.86e-4</td></tr><tr><td>1,000 dfs</td><td>158.90</td><td>6.29</td><td>0.00</td></tr><tr><td>1,000 bfs</td><td>58.59</td><td>17.07</td><td>0.00</td></tr><tr><td>1,000 morris</td><td>269.91</td><td>3.70</td><td>0.01</td></tr></table></div>
|
|
735
735
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
736
736
|
<div class='collapsible level0' ><span class='json-to-html-label'>bst</span></div>
|
|
737
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
737
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>31.66</td><td>31.59</td><td>8.90e-4</td></tr><tr><td>10,000 add & delete randomly</td><td>73.97</td><td>13.52</td><td>0.00</td></tr><tr><td>10,000 addMany</td><td>31.66</td><td>31.58</td><td>0.00</td></tr><tr><td>10,000 get</td><td>29.75</td><td>33.61</td><td>5.49e-4</td></tr></table></div>
|
|
738
738
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
739
739
|
<div class='collapsible level0' ><span class='json-to-html-label'>rb-tree</span></div>
|
|
740
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>87.
|
|
740
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>87.24</td><td>11.46</td><td>0.00</td></tr><tr><td>100,000 add & delete randomly</td><td>218.78</td><td>4.57</td><td>0.01</td></tr><tr><td>100,000 getNode</td><td>91.39</td><td>10.94</td><td>0.00</td></tr></table></div>
|
|
741
741
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
742
742
|
<div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
|
|
743
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.10</td><td>
|
|
743
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.10</td><td>9631.84</td><td>5.21e-6</td></tr><tr><td>1,000 addEdge</td><td>6.25</td><td>160.06</td><td>3.97e-4</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.13e+4</td><td>1.05e-6</td></tr><tr><td>1,000 getEdge</td><td>23.83</td><td>41.97</td><td>0.00</td></tr><tr><td>tarjan</td><td>217.69</td><td>4.59</td><td>0.01</td></tr><tr><td>tarjan all</td><td>226.43</td><td>4.42</td><td>0.01</td></tr><tr><td>topologicalSort</td><td>180.71</td><td>5.53</td><td>0.01</td></tr></table></div>
|
|
744
744
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
745
745
|
<div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
|
|
746
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>4.
|
|
746
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>4.69</td><td>213.13</td><td>1.63e-4</td></tr><tr><td>10,000 fib add & pop</td><td>367.49</td><td>2.72</td><td>0.01</td></tr></table></div>
|
|
747
747
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
748
748
|
<div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
|
|
749
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>
|
|
749
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>221.10</td><td>4.52</td><td>0.06</td></tr><tr><td>1,000,000 unshift & shift</td><td>179.99</td><td>5.56</td><td>0.03</td></tr><tr><td>1,000,000 insertBefore</td><td>331.29</td><td>3.02</td><td>0.06</td></tr></table></div>
|
|
750
750
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
751
751
|
<div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
|
|
752
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>
|
|
752
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>216.59</td><td>4.62</td><td>0.01</td></tr><tr><td>10,000 insertBefore</td><td>255.08</td><td>3.92</td><td>0.01</td></tr></table></div>
|
|
753
753
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
754
754
|
<div class='collapsible level0' ><span class='json-to-html-label'>max-priority-queue</span></div>
|
|
755
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>
|
|
755
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>12.00</td><td>83.34</td><td>6.62e-4</td></tr></table></div>
|
|
756
756
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
757
757
|
<div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
|
|
758
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>
|
|
758
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>222.01</td><td>4.50</td><td>0.05</td></tr><tr><td>1,000,000 shift</td><td>25.35</td><td>39.45</td><td>0.00</td></tr></table></div>
|
|
759
759
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
760
760
|
<div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
|
|
761
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>45.
|
|
761
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>45.31</td><td>22.07</td><td>0.01</td></tr><tr><td>1,000,000 push & shift</td><td>83.92</td><td>11.92</td><td>0.01</td></tr></table></div>
|
|
762
762
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
763
763
|
<div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
|
|
764
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>59.
|
|
764
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>59.08</td><td>16.92</td><td>0.01</td></tr><tr><td>100,000 getWords</td><td>95.74</td><td>10.44</td><td>0.01</td></tr></table></div>
|
|
765
765
|
</div>
|
|
766
766
|
|
|
767
767
|
[//]: # (No deletion!!! End of Replace Section)
|
package/benchmark/report.html
CHANGED
|
@@ -43,40 +43,40 @@
|
|
|
43
43
|
<body>
|
|
44
44
|
<div id="json-to-html"><div class="json-to-html-collapse clearfix 0">
|
|
45
45
|
<div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
|
|
46
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
46
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>45.48</td><td>21.99</td><td>0.04</td></tr><tr><td>10,000 add & delete randomly</td><td>132.35</td><td>7.56</td><td>0.10</td></tr><tr><td>10,000 addMany</td><td>79.22</td><td>12.62</td><td>0.07</td></tr><tr><td>10,000 get</td><td>93.13</td><td>10.74</td><td>0.06</td></tr></table></div>
|
|
47
47
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
48
48
|
<div class='collapsible level0' ><span class='json-to-html-label'>binary-tree</span></div>
|
|
49
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>
|
|
49
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>23.89</td><td>41.85</td><td>0.01</td></tr><tr><td>1,000 add & delete randomly</td><td>22.84</td><td>43.78</td><td>0.01</td></tr><tr><td>1,000 addMany</td><td>10.61</td><td>94.22</td><td>4.91e-4</td></tr><tr><td>1,000 get</td><td>18.56</td><td>53.87</td><td>8.86e-4</td></tr><tr><td>1,000 dfs</td><td>158.90</td><td>6.29</td><td>0.00</td></tr><tr><td>1,000 bfs</td><td>58.59</td><td>17.07</td><td>0.00</td></tr><tr><td>1,000 morris</td><td>269.91</td><td>3.70</td><td>0.01</td></tr></table></div>
|
|
50
50
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
51
51
|
<div class='collapsible level0' ><span class='json-to-html-label'>bst</span></div>
|
|
52
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
52
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>31.66</td><td>31.59</td><td>8.90e-4</td></tr><tr><td>10,000 add & delete randomly</td><td>73.97</td><td>13.52</td><td>0.00</td></tr><tr><td>10,000 addMany</td><td>31.66</td><td>31.58</td><td>0.00</td></tr><tr><td>10,000 get</td><td>29.75</td><td>33.61</td><td>5.49e-4</td></tr></table></div>
|
|
53
53
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
54
54
|
<div class='collapsible level0' ><span class='json-to-html-label'>rb-tree</span></div>
|
|
55
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>87.
|
|
55
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>87.24</td><td>11.46</td><td>0.00</td></tr><tr><td>100,000 add & delete randomly</td><td>218.78</td><td>4.57</td><td>0.01</td></tr><tr><td>100,000 getNode</td><td>91.39</td><td>10.94</td><td>0.00</td></tr></table></div>
|
|
56
56
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
57
57
|
<div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
|
|
58
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.10</td><td>
|
|
58
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.10</td><td>9631.84</td><td>5.21e-6</td></tr><tr><td>1,000 addEdge</td><td>6.25</td><td>160.06</td><td>3.97e-4</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.13e+4</td><td>1.05e-6</td></tr><tr><td>1,000 getEdge</td><td>23.83</td><td>41.97</td><td>0.00</td></tr><tr><td>tarjan</td><td>217.69</td><td>4.59</td><td>0.01</td></tr><tr><td>tarjan all</td><td>226.43</td><td>4.42</td><td>0.01</td></tr><tr><td>topologicalSort</td><td>180.71</td><td>5.53</td><td>0.01</td></tr></table></div>
|
|
59
59
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
60
60
|
<div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
|
|
61
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>4.
|
|
61
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>4.69</td><td>213.13</td><td>1.63e-4</td></tr><tr><td>10,000 fib add & pop</td><td>367.49</td><td>2.72</td><td>0.01</td></tr></table></div>
|
|
62
62
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
63
63
|
<div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
|
|
64
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>
|
|
64
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>221.10</td><td>4.52</td><td>0.06</td></tr><tr><td>1,000,000 unshift & shift</td><td>179.99</td><td>5.56</td><td>0.03</td></tr><tr><td>1,000,000 insertBefore</td><td>331.29</td><td>3.02</td><td>0.06</td></tr></table></div>
|
|
65
65
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
66
66
|
<div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
|
|
67
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>
|
|
67
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>216.59</td><td>4.62</td><td>0.01</td></tr><tr><td>10,000 insertBefore</td><td>255.08</td><td>3.92</td><td>0.01</td></tr></table></div>
|
|
68
68
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
69
69
|
<div class='collapsible level0' ><span class='json-to-html-label'>max-priority-queue</span></div>
|
|
70
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>
|
|
70
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>12.00</td><td>83.34</td><td>6.62e-4</td></tr></table></div>
|
|
71
71
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
72
72
|
<div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
|
|
73
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>
|
|
73
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>222.01</td><td>4.50</td><td>0.05</td></tr><tr><td>1,000,000 shift</td><td>25.35</td><td>39.45</td><td>0.00</td></tr></table></div>
|
|
74
74
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
75
75
|
<div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
|
|
76
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>45.
|
|
76
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>45.31</td><td>22.07</td><td>0.01</td></tr><tr><td>1,000,000 push & shift</td><td>83.92</td><td>11.92</td><td>0.01</td></tr></table></div>
|
|
77
77
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
78
78
|
<div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
|
|
79
|
-
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>59.
|
|
79
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>59.08</td><td>16.92</td><td>0.01</td></tr><tr><td>100,000 getWords</td><td>95.74</td><td>10.44</td><td>0.01</td></tr></table></div>
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
82
|
</div>
|