tree-multimap-typed 1.42.5

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 (366) hide show
  1. package/.dependency-cruiser.js +449 -0
  2. package/.eslintrc.js +65 -0
  3. package/.prettierignore +6 -0
  4. package/.prettierrc.js +16 -0
  5. package/LICENSE +21 -0
  6. package/README.md +527 -0
  7. package/coverage/clover.xml +14 -0
  8. package/coverage/coverage-final.json +96 -0
  9. package/coverage/coverage-summary.json +60 -0
  10. package/coverage/lcov-report/base.css +403 -0
  11. package/coverage/lcov-report/block-navigation.js +87 -0
  12. package/coverage/lcov-report/favicon.png +0 -0
  13. package/coverage/lcov-report/index.html +120 -0
  14. package/coverage/lcov-report/index.ts.html +110 -0
  15. package/coverage/lcov-report/prettify.css +1 -0
  16. package/coverage/lcov-report/prettify.js +2 -0
  17. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  18. package/coverage/lcov-report/sorter.js +206 -0
  19. package/coverage/lcov.info +14 -0
  20. package/dist/data-structures/binary-tree/avl-tree.d.ts +106 -0
  21. package/dist/data-structures/binary-tree/avl-tree.js +349 -0
  22. package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +149 -0
  23. package/dist/data-structures/binary-tree/binary-indexed-tree.js +269 -0
  24. package/dist/data-structures/binary-tree/binary-tree.d.ts +322 -0
  25. package/dist/data-structures/binary-tree/binary-tree.js +1305 -0
  26. package/dist/data-structures/binary-tree/bst.d.ts +175 -0
  27. package/dist/data-structures/binary-tree/bst.js +546 -0
  28. package/dist/data-structures/binary-tree/index.d.ts +7 -0
  29. package/dist/data-structures/binary-tree/index.js +23 -0
  30. package/dist/data-structures/binary-tree/rb-tree.d.ts +93 -0
  31. package/dist/data-structures/binary-tree/rb-tree.js +434 -0
  32. package/dist/data-structures/binary-tree/segment-tree.d.ts +67 -0
  33. package/dist/data-structures/binary-tree/segment-tree.js +180 -0
  34. package/dist/data-structures/binary-tree/tree-multimap.d.ts +126 -0
  35. package/dist/data-structures/binary-tree/tree-multimap.js +358 -0
  36. package/dist/data-structures/graph/abstract-graph.d.ts +347 -0
  37. package/dist/data-structures/graph/abstract-graph.js +936 -0
  38. package/dist/data-structures/graph/directed-graph.d.ts +194 -0
  39. package/dist/data-structures/graph/directed-graph.js +404 -0
  40. package/dist/data-structures/graph/index.d.ts +4 -0
  41. package/dist/data-structures/graph/index.js +20 -0
  42. package/dist/data-structures/graph/map-graph.d.ts +73 -0
  43. package/dist/data-structures/graph/map-graph.js +93 -0
  44. package/dist/data-structures/graph/undirected-graph.d.ts +120 -0
  45. package/dist/data-structures/graph/undirected-graph.js +239 -0
  46. package/dist/data-structures/hash/coordinate-map.d.ts +44 -0
  47. package/dist/data-structures/hash/coordinate-map.js +62 -0
  48. package/dist/data-structures/hash/coordinate-set.d.ts +36 -0
  49. package/dist/data-structures/hash/coordinate-set.js +52 -0
  50. package/dist/data-structures/hash/hash-map.d.ts +50 -0
  51. package/dist/data-structures/hash/hash-map.js +153 -0
  52. package/dist/data-structures/hash/hash-table.d.ts +103 -0
  53. package/dist/data-structures/hash/hash-table.js +236 -0
  54. package/dist/data-structures/hash/index.d.ts +6 -0
  55. package/dist/data-structures/hash/index.js +22 -0
  56. package/dist/data-structures/hash/tree-map.d.ts +2 -0
  57. package/dist/data-structures/hash/tree-map.js +6 -0
  58. package/dist/data-structures/hash/tree-set.d.ts +2 -0
  59. package/dist/data-structures/hash/tree-set.js +6 -0
  60. package/dist/data-structures/heap/heap.d.ts +235 -0
  61. package/dist/data-structures/heap/heap.js +515 -0
  62. package/dist/data-structures/heap/index.d.ts +3 -0
  63. package/dist/data-structures/heap/index.js +19 -0
  64. package/dist/data-structures/heap/max-heap.d.ts +15 -0
  65. package/dist/data-structures/heap/max-heap.js +26 -0
  66. package/dist/data-structures/heap/min-heap.d.ts +15 -0
  67. package/dist/data-structures/heap/min-heap.js +26 -0
  68. package/dist/data-structures/index.d.ts +11 -0
  69. package/dist/data-structures/index.js +27 -0
  70. package/dist/data-structures/linked-list/doubly-linked-list.d.ts +253 -0
  71. package/dist/data-structures/linked-list/doubly-linked-list.js +569 -0
  72. package/dist/data-structures/linked-list/index.d.ts +3 -0
  73. package/dist/data-structures/linked-list/index.js +19 -0
  74. package/dist/data-structures/linked-list/singly-linked-list.d.ts +232 -0
  75. package/dist/data-structures/linked-list/singly-linked-list.js +533 -0
  76. package/dist/data-structures/linked-list/skip-linked-list.d.ts +80 -0
  77. package/dist/data-structures/linked-list/skip-linked-list.js +187 -0
  78. package/dist/data-structures/matrix/index.d.ts +4 -0
  79. package/dist/data-structures/matrix/index.js +20 -0
  80. package/dist/data-structures/matrix/matrix.d.ts +21 -0
  81. package/dist/data-structures/matrix/matrix.js +28 -0
  82. package/dist/data-structures/matrix/matrix2d.d.ts +107 -0
  83. package/dist/data-structures/matrix/matrix2d.js +199 -0
  84. package/dist/data-structures/matrix/navigator.d.ts +52 -0
  85. package/dist/data-structures/matrix/navigator.js +106 -0
  86. package/dist/data-structures/matrix/vector2d.d.ts +200 -0
  87. package/dist/data-structures/matrix/vector2d.js +290 -0
  88. package/dist/data-structures/priority-queue/index.d.ts +3 -0
  89. package/dist/data-structures/priority-queue/index.js +19 -0
  90. package/dist/data-structures/priority-queue/max-priority-queue.d.ts +15 -0
  91. package/dist/data-structures/priority-queue/max-priority-queue.js +26 -0
  92. package/dist/data-structures/priority-queue/min-priority-queue.d.ts +15 -0
  93. package/dist/data-structures/priority-queue/min-priority-queue.js +26 -0
  94. package/dist/data-structures/priority-queue/priority-queue.d.ts +15 -0
  95. package/dist/data-structures/priority-queue/priority-queue.js +17 -0
  96. package/dist/data-structures/queue/deque.d.ts +161 -0
  97. package/dist/data-structures/queue/deque.js +264 -0
  98. package/dist/data-structures/queue/index.d.ts +2 -0
  99. package/dist/data-structures/queue/index.js +18 -0
  100. package/dist/data-structures/queue/queue.d.ts +122 -0
  101. package/dist/data-structures/queue/queue.js +187 -0
  102. package/dist/data-structures/stack/index.d.ts +1 -0
  103. package/dist/data-structures/stack/index.js +17 -0
  104. package/dist/data-structures/stack/stack.d.ts +64 -0
  105. package/dist/data-structures/stack/stack.js +94 -0
  106. package/dist/data-structures/tree/index.d.ts +1 -0
  107. package/dist/data-structures/tree/index.js +17 -0
  108. package/dist/data-structures/tree/tree.d.ts +8 -0
  109. package/dist/data-structures/tree/tree.js +40 -0
  110. package/dist/data-structures/trie/index.d.ts +1 -0
  111. package/dist/data-structures/trie/index.js +17 -0
  112. package/dist/data-structures/trie/trie.d.ts +79 -0
  113. package/dist/data-structures/trie/trie.js +251 -0
  114. package/dist/index.d.ts +10 -0
  115. package/dist/index.js +27 -0
  116. package/dist/interfaces/binary-tree.d.ts +7 -0
  117. package/dist/interfaces/binary-tree.js +2 -0
  118. package/dist/interfaces/doubly-linked-list.d.ts +1 -0
  119. package/dist/interfaces/doubly-linked-list.js +2 -0
  120. package/dist/interfaces/graph.d.ts +5 -0
  121. package/dist/interfaces/graph.js +2 -0
  122. package/dist/interfaces/heap.d.ts +1 -0
  123. package/dist/interfaces/heap.js +2 -0
  124. package/dist/interfaces/index.d.ts +8 -0
  125. package/dist/interfaces/index.js +24 -0
  126. package/dist/interfaces/navigator.d.ts +1 -0
  127. package/dist/interfaces/navigator.js +2 -0
  128. package/dist/interfaces/priority-queue.d.ts +1 -0
  129. package/dist/interfaces/priority-queue.js +2 -0
  130. package/dist/interfaces/segment-tree.d.ts +1 -0
  131. package/dist/interfaces/segment-tree.js +2 -0
  132. package/dist/interfaces/singly-linked-list.d.ts +1 -0
  133. package/dist/interfaces/singly-linked-list.js +2 -0
  134. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +4 -0
  135. package/dist/types/data-structures/binary-tree/avl-tree.js +2 -0
  136. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +1 -0
  137. package/dist/types/data-structures/binary-tree/binary-indexed-tree.js +2 -0
  138. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +29 -0
  139. package/dist/types/data-structures/binary-tree/binary-tree.js +24 -0
  140. package/dist/types/data-structures/binary-tree/bst.d.ts +7 -0
  141. package/dist/types/data-structures/binary-tree/bst.js +2 -0
  142. package/dist/types/data-structures/binary-tree/index.d.ts +6 -0
  143. package/dist/types/data-structures/binary-tree/index.js +22 -0
  144. package/dist/types/data-structures/binary-tree/rb-tree.d.ts +8 -0
  145. package/dist/types/data-structures/binary-tree/rb-tree.js +8 -0
  146. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +1 -0
  147. package/dist/types/data-structures/binary-tree/segment-tree.js +2 -0
  148. package/dist/types/data-structures/binary-tree/tree-multimap.d.ts +4 -0
  149. package/dist/types/data-structures/binary-tree/tree-multimap.js +2 -0
  150. package/dist/types/data-structures/graph/abstract-graph.d.ts +10 -0
  151. package/dist/types/data-structures/graph/abstract-graph.js +2 -0
  152. package/dist/types/data-structures/graph/directed-graph.d.ts +6 -0
  153. package/dist/types/data-structures/graph/directed-graph.js +9 -0
  154. package/dist/types/data-structures/graph/index.d.ts +3 -0
  155. package/dist/types/data-structures/graph/index.js +19 -0
  156. package/dist/types/data-structures/graph/map-graph.d.ts +1 -0
  157. package/dist/types/data-structures/graph/map-graph.js +2 -0
  158. package/dist/types/data-structures/graph/undirected-graph.d.ts +1 -0
  159. package/dist/types/data-structures/graph/undirected-graph.js +2 -0
  160. package/dist/types/data-structures/hash/coordinate-map.d.ts +1 -0
  161. package/dist/types/data-structures/hash/coordinate-map.js +2 -0
  162. package/dist/types/data-structures/hash/coordinate-set.d.ts +1 -0
  163. package/dist/types/data-structures/hash/coordinate-set.js +2 -0
  164. package/dist/types/data-structures/hash/hash-map.d.ts +1 -0
  165. package/dist/types/data-structures/hash/hash-map.js +2 -0
  166. package/dist/types/data-structures/hash/hash-table.d.ts +1 -0
  167. package/dist/types/data-structures/hash/hash-table.js +2 -0
  168. package/dist/types/data-structures/hash/index.d.ts +1 -0
  169. package/dist/types/data-structures/hash/index.js +2 -0
  170. package/dist/types/data-structures/hash/tree-map.d.ts +1 -0
  171. package/dist/types/data-structures/hash/tree-map.js +2 -0
  172. package/dist/types/data-structures/hash/tree-set.d.ts +1 -0
  173. package/dist/types/data-structures/hash/tree-set.js +2 -0
  174. package/dist/types/data-structures/heap/heap.d.ts +1 -0
  175. package/dist/types/data-structures/heap/heap.js +2 -0
  176. package/dist/types/data-structures/heap/index.d.ts +1 -0
  177. package/dist/types/data-structures/heap/index.js +17 -0
  178. package/dist/types/data-structures/heap/max-heap.d.ts +1 -0
  179. package/dist/types/data-structures/heap/max-heap.js +2 -0
  180. package/dist/types/data-structures/heap/min-heap.d.ts +1 -0
  181. package/dist/types/data-structures/heap/min-heap.js +2 -0
  182. package/dist/types/data-structures/index.d.ts +11 -0
  183. package/dist/types/data-structures/index.js +27 -0
  184. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +1 -0
  185. package/dist/types/data-structures/linked-list/doubly-linked-list.js +2 -0
  186. package/dist/types/data-structures/linked-list/index.d.ts +2 -0
  187. package/dist/types/data-structures/linked-list/index.js +18 -0
  188. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +1 -0
  189. package/dist/types/data-structures/linked-list/singly-linked-list.js +2 -0
  190. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +1 -0
  191. package/dist/types/data-structures/linked-list/skip-linked-list.js +2 -0
  192. package/dist/types/data-structures/matrix/index.d.ts +1 -0
  193. package/dist/types/data-structures/matrix/index.js +17 -0
  194. package/dist/types/data-structures/matrix/matrix.d.ts +1 -0
  195. package/dist/types/data-structures/matrix/matrix.js +2 -0
  196. package/dist/types/data-structures/matrix/matrix2d.d.ts +1 -0
  197. package/dist/types/data-structures/matrix/matrix2d.js +2 -0
  198. package/dist/types/data-structures/matrix/navigator.d.ts +14 -0
  199. package/dist/types/data-structures/matrix/navigator.js +2 -0
  200. package/dist/types/data-structures/matrix/vector2d.d.ts +1 -0
  201. package/dist/types/data-structures/matrix/vector2d.js +2 -0
  202. package/dist/types/data-structures/priority-queue/index.d.ts +3 -0
  203. package/dist/types/data-structures/priority-queue/index.js +19 -0
  204. package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +1 -0
  205. package/dist/types/data-structures/priority-queue/max-priority-queue.js +2 -0
  206. package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +1 -0
  207. package/dist/types/data-structures/priority-queue/min-priority-queue.js +2 -0
  208. package/dist/types/data-structures/priority-queue/priority-queue.d.ts +1 -0
  209. package/dist/types/data-structures/priority-queue/priority-queue.js +2 -0
  210. package/dist/types/data-structures/queue/deque.d.ts +1 -0
  211. package/dist/types/data-structures/queue/deque.js +2 -0
  212. package/dist/types/data-structures/queue/index.d.ts +2 -0
  213. package/dist/types/data-structures/queue/index.js +18 -0
  214. package/dist/types/data-structures/queue/queue.d.ts +1 -0
  215. package/dist/types/data-structures/queue/queue.js +2 -0
  216. package/dist/types/data-structures/stack/index.d.ts +1 -0
  217. package/dist/types/data-structures/stack/index.js +17 -0
  218. package/dist/types/data-structures/stack/stack.d.ts +1 -0
  219. package/dist/types/data-structures/stack/stack.js +2 -0
  220. package/dist/types/data-structures/tree/index.d.ts +1 -0
  221. package/dist/types/data-structures/tree/index.js +17 -0
  222. package/dist/types/data-structures/tree/tree.d.ts +1 -0
  223. package/dist/types/data-structures/tree/tree.js +2 -0
  224. package/dist/types/data-structures/trie/index.d.ts +1 -0
  225. package/dist/types/data-structures/trie/index.js +17 -0
  226. package/dist/types/data-structures/trie/trie.d.ts +1 -0
  227. package/dist/types/data-structures/trie/trie.js +2 -0
  228. package/dist/types/helpers.d.ts +8 -0
  229. package/dist/types/helpers.js +9 -0
  230. package/dist/types/index.d.ts +3 -0
  231. package/dist/types/index.js +19 -0
  232. package/dist/types/utils/index.d.ts +2 -0
  233. package/dist/types/utils/index.js +18 -0
  234. package/dist/types/utils/utils.d.ts +7 -0
  235. package/dist/types/utils/utils.js +2 -0
  236. package/dist/types/utils/validate-type.d.ts +19 -0
  237. package/dist/types/utils/validate-type.js +2 -0
  238. package/dist/utils/index.d.ts +1 -0
  239. package/dist/utils/index.js +17 -0
  240. package/dist/utils/utils.d.ts +20 -0
  241. package/dist/utils/utils.js +73 -0
  242. package/docs/.nojekyll +1 -0
  243. package/docs/assets/highlight.css +50 -0
  244. package/docs/assets/main.js +59 -0
  245. package/docs/assets/navigation.js +1 -0
  246. package/docs/assets/search.js +1 -0
  247. package/docs/assets/style.css +1383 -0
  248. package/docs/classes/TreeMultiset.html +2376 -0
  249. package/docs/classes/TreeMultisetNode.html +313 -0
  250. package/docs/index.html +523 -0
  251. package/docs/modules.html +45 -0
  252. package/jest.config.js +8 -0
  253. package/package.json +184 -0
  254. package/src/data-structures/binary-tree/avl-tree.ts +352 -0
  255. package/src/data-structures/binary-tree/binary-indexed-tree.ts +306 -0
  256. package/src/data-structures/binary-tree/binary-tree.ts +1558 -0
  257. package/src/data-structures/binary-tree/bst.ts +564 -0
  258. package/src/data-structures/binary-tree/index.ts +7 -0
  259. package/src/data-structures/binary-tree/rb-tree.ts +486 -0
  260. package/src/data-structures/binary-tree/segment-tree.ts +190 -0
  261. package/src/data-structures/binary-tree/tree-multimap.ts +381 -0
  262. package/src/data-structures/graph/abstract-graph.ts +1056 -0
  263. package/src/data-structures/graph/directed-graph.ts +450 -0
  264. package/src/data-structures/graph/index.ts +4 -0
  265. package/src/data-structures/graph/map-graph.ts +106 -0
  266. package/src/data-structures/graph/undirected-graph.ts +260 -0
  267. package/src/data-structures/hash/coordinate-map.ts +63 -0
  268. package/src/data-structures/hash/coordinate-set.ts +52 -0
  269. package/src/data-structures/hash/hash-map.ts +185 -0
  270. package/src/data-structures/hash/hash-table.ts +268 -0
  271. package/src/data-structures/hash/index.ts +6 -0
  272. package/src/data-structures/hash/tree-map.ts +1 -0
  273. package/src/data-structures/hash/tree-set.ts +1 -0
  274. package/src/data-structures/heap/heap.ts +589 -0
  275. package/src/data-structures/heap/index.ts +3 -0
  276. package/src/data-structures/heap/max-heap.ts +26 -0
  277. package/src/data-structures/heap/min-heap.ts +26 -0
  278. package/src/data-structures/index.ts +11 -0
  279. package/src/data-structures/linked-list/doubly-linked-list.ts +605 -0
  280. package/src/data-structures/linked-list/index.ts +3 -0
  281. package/src/data-structures/linked-list/singly-linked-list.ts +576 -0
  282. package/src/data-structures/linked-list/skip-linked-list.ts +221 -0
  283. package/src/data-structures/matrix/index.ts +4 -0
  284. package/src/data-structures/matrix/matrix.ts +27 -0
  285. package/src/data-structures/matrix/matrix2d.ts +211 -0
  286. package/src/data-structures/matrix/navigator.ts +121 -0
  287. package/src/data-structures/matrix/vector2d.ts +314 -0
  288. package/src/data-structures/priority-queue/index.ts +3 -0
  289. package/src/data-structures/priority-queue/max-priority-queue.ts +25 -0
  290. package/src/data-structures/priority-queue/min-priority-queue.ts +25 -0
  291. package/src/data-structures/priority-queue/priority-queue.ts +16 -0
  292. package/src/data-structures/queue/deque.ts +281 -0
  293. package/src/data-structures/queue/index.ts +2 -0
  294. package/src/data-structures/queue/queue.ts +209 -0
  295. package/src/data-structures/stack/index.ts +1 -0
  296. package/src/data-structures/stack/stack.ts +102 -0
  297. package/src/data-structures/tree/index.ts +1 -0
  298. package/src/data-structures/tree/tree.ts +41 -0
  299. package/src/data-structures/trie/index.ts +1 -0
  300. package/src/data-structures/trie/trie.ts +262 -0
  301. package/src/index.ts +11 -0
  302. package/src/interfaces/binary-tree.ts +10 -0
  303. package/src/interfaces/doubly-linked-list.ts +1 -0
  304. package/src/interfaces/graph.ts +7 -0
  305. package/src/interfaces/heap.ts +1 -0
  306. package/src/interfaces/index.ts +8 -0
  307. package/src/interfaces/navigator.ts +1 -0
  308. package/src/interfaces/priority-queue.ts +1 -0
  309. package/src/interfaces/segment-tree.ts +1 -0
  310. package/src/interfaces/singly-linked-list.ts +1 -0
  311. package/src/types/data-structures/binary-tree/avl-tree.ts +5 -0
  312. package/src/types/data-structures/binary-tree/binary-indexed-tree.ts +1 -0
  313. package/src/types/data-structures/binary-tree/binary-tree.ts +31 -0
  314. package/src/types/data-structures/binary-tree/bst.ts +11 -0
  315. package/src/types/data-structures/binary-tree/index.ts +6 -0
  316. package/src/types/data-structures/binary-tree/rb-tree.ts +8 -0
  317. package/src/types/data-structures/binary-tree/segment-tree.ts +1 -0
  318. package/src/types/data-structures/binary-tree/tree-multimap.ts +6 -0
  319. package/src/types/data-structures/graph/abstract-graph.ts +11 -0
  320. package/src/types/data-structures/graph/directed-graph.ts +8 -0
  321. package/src/types/data-structures/graph/index.ts +3 -0
  322. package/src/types/data-structures/graph/map-graph.ts +1 -0
  323. package/src/types/data-structures/graph/undirected-graph.ts +1 -0
  324. package/src/types/data-structures/hash/coordinate-map.ts +1 -0
  325. package/src/types/data-structures/hash/coordinate-set.ts +1 -0
  326. package/src/types/data-structures/hash/hash-map.ts +1 -0
  327. package/src/types/data-structures/hash/hash-table.ts +1 -0
  328. package/src/types/data-structures/hash/index.ts +1 -0
  329. package/src/types/data-structures/hash/tree-map.ts +1 -0
  330. package/src/types/data-structures/hash/tree-set.ts +1 -0
  331. package/src/types/data-structures/heap/heap.ts +1 -0
  332. package/src/types/data-structures/heap/index.ts +1 -0
  333. package/src/types/data-structures/heap/max-heap.ts +1 -0
  334. package/src/types/data-structures/heap/min-heap.ts +1 -0
  335. package/src/types/data-structures/index.ts +11 -0
  336. package/src/types/data-structures/linked-list/doubly-linked-list.ts +1 -0
  337. package/src/types/data-structures/linked-list/index.ts +2 -0
  338. package/src/types/data-structures/linked-list/singly-linked-list.ts +1 -0
  339. package/src/types/data-structures/linked-list/skip-linked-list.ts +1 -0
  340. package/src/types/data-structures/matrix/index.ts +1 -0
  341. package/src/types/data-structures/matrix/matrix.ts +1 -0
  342. package/src/types/data-structures/matrix/matrix2d.ts +1 -0
  343. package/src/types/data-structures/matrix/navigator.ts +14 -0
  344. package/src/types/data-structures/matrix/vector2d.ts +1 -0
  345. package/src/types/data-structures/priority-queue/index.ts +3 -0
  346. package/src/types/data-structures/priority-queue/max-priority-queue.ts +1 -0
  347. package/src/types/data-structures/priority-queue/min-priority-queue.ts +1 -0
  348. package/src/types/data-structures/priority-queue/priority-queue.ts +1 -0
  349. package/src/types/data-structures/queue/deque.ts +1 -0
  350. package/src/types/data-structures/queue/index.ts +2 -0
  351. package/src/types/data-structures/queue/queue.ts +1 -0
  352. package/src/types/data-structures/stack/index.ts +1 -0
  353. package/src/types/data-structures/stack/stack.ts +1 -0
  354. package/src/types/data-structures/tree/index.ts +1 -0
  355. package/src/types/data-structures/tree/tree.ts +1 -0
  356. package/src/types/data-structures/trie/index.ts +1 -0
  357. package/src/types/data-structures/trie/trie.ts +1 -0
  358. package/src/types/helpers.ts +11 -0
  359. package/src/types/index.ts +3 -0
  360. package/src/types/utils/index.ts +2 -0
  361. package/src/types/utils/utils.ts +6 -0
  362. package/src/types/utils/validate-type.ts +35 -0
  363. package/src/utils/index.ts +1 -0
  364. package/src/utils/utils.ts +86 -0
  365. package/test/index.test.ts +461 -0
  366. package/tsconfig.json +38 -0
@@ -0,0 +1,60 @@
1
+ {
2
+ "total": {
3
+ "lines": {
4
+ "total": 1,
5
+ "covered": 1,
6
+ "skipped": 0,
7
+ "pct": 100
8
+ },
9
+ "statements": {
10
+ "total": 3,
11
+ "covered": 3,
12
+ "skipped": 0,
13
+ "pct": 100
14
+ },
15
+ "functions": {
16
+ "total": 2,
17
+ "covered": 2,
18
+ "skipped": 0,
19
+ "pct": 100
20
+ },
21
+ "branches": {
22
+ "total": 0,
23
+ "covered": 0,
24
+ "skipped": 0,
25
+ "pct": 100
26
+ },
27
+ "branchesTrue": {
28
+ "total": 0,
29
+ "covered": 0,
30
+ "skipped": 0,
31
+ "pct": "Unknown"
32
+ }
33
+ },
34
+ "/Users/revone/projects/data-structure-typed-individuals/tree-multimap-typed/src/index.ts": {
35
+ "lines": {
36
+ "total": 1,
37
+ "covered": 1,
38
+ "skipped": 0,
39
+ "pct": 100
40
+ },
41
+ "functions": {
42
+ "total": 2,
43
+ "covered": 2,
44
+ "skipped": 0,
45
+ "pct": 100
46
+ },
47
+ "statements": {
48
+ "total": 3,
49
+ "covered": 3,
50
+ "skipped": 0,
51
+ "pct": 100
52
+ },
53
+ "branches": {
54
+ "total": 0,
55
+ "covered": 0,
56
+ "skipped": 0,
57
+ "pct": 100
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,403 @@
1
+ body, html {
2
+ margin: 0;
3
+ padding: 0;
4
+ height: 100%;
5
+ }
6
+
7
+ body {
8
+ font-family: Helvetica Neue, Helvetica, Arial;
9
+ font-size: 14px;
10
+ color: #333;
11
+ }
12
+
13
+ .small {
14
+ font-size: 12px;
15
+ }
16
+
17
+ *, *:after, *:before {
18
+ -webkit-box-sizing: border-box;
19
+ -moz-box-sizing: border-box;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ h1 {
24
+ font-size: 20px;
25
+ margin: 0;
26
+ }
27
+
28
+ h2 {
29
+ font-size: 14px;
30
+ }
31
+
32
+ pre {
33
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
34
+ margin: 0;
35
+ padding: 0;
36
+ -moz-tab-size: 2;
37
+ -o-tab-size: 2;
38
+ tab-size: 2;
39
+ }
40
+
41
+ a {
42
+ color: #0074D9;
43
+ text-decoration: none;
44
+ }
45
+
46
+ a:hover {
47
+ text-decoration: underline;
48
+ }
49
+
50
+ .strong {
51
+ font-weight: bold;
52
+ }
53
+
54
+ .space-top1 {
55
+ padding: 10px 0 0 0;
56
+ }
57
+
58
+ .pad2y {
59
+ padding: 20px 0;
60
+ }
61
+
62
+ .pad1y {
63
+ padding: 10px 0;
64
+ }
65
+
66
+ .pad2x {
67
+ padding: 0 20px;
68
+ }
69
+
70
+ .pad2 {
71
+ padding: 20px;
72
+ }
73
+
74
+ .pad1 {
75
+ padding: 10px;
76
+ }
77
+
78
+ .space-left2 {
79
+ padding-left: 55px;
80
+ }
81
+
82
+ .space-right2 {
83
+ padding-right: 20px;
84
+ }
85
+
86
+ .center {
87
+ text-align: center;
88
+ }
89
+
90
+ .clearfix {
91
+ display: block;
92
+ }
93
+
94
+ .clearfix:after {
95
+ content: '';
96
+ display: block;
97
+ height: 0;
98
+ clear: both;
99
+ visibility: hidden;
100
+ }
101
+
102
+ .fl {
103
+ float: left;
104
+ }
105
+
106
+ @media only screen and (max-width: 640px) {
107
+ .col3 {
108
+ width: 100%;
109
+ max-width: 100%;
110
+ }
111
+
112
+ .hide-mobile {
113
+ display: none !important;
114
+ }
115
+ }
116
+
117
+ .quiet {
118
+ color: #7f7f7f;
119
+ color: rgba(0, 0, 0, 0.5);
120
+ }
121
+
122
+ .quiet a {
123
+ opacity: 0.7;
124
+ }
125
+
126
+ .fraction {
127
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
128
+ font-size: 10px;
129
+ color: #555;
130
+ background: #E8E8E8;
131
+ padding: 4px 5px;
132
+ border-radius: 3px;
133
+ vertical-align: middle;
134
+ }
135
+
136
+ div.path a:link, div.path a:visited {
137
+ color: #333;
138
+ }
139
+
140
+ table.coverage {
141
+ border-collapse: collapse;
142
+ margin: 10px 0 0 0;
143
+ padding: 0;
144
+ }
145
+
146
+ table.coverage td {
147
+ margin: 0;
148
+ padding: 0;
149
+ vertical-align: top;
150
+ }
151
+
152
+ table.coverage td.line-count {
153
+ text-align: right;
154
+ padding: 0 5px 0 20px;
155
+ }
156
+
157
+ table.coverage td.line-coverage {
158
+ text-align: right;
159
+ padding-right: 10px;
160
+ min-width: 20px;
161
+ }
162
+
163
+ table.coverage td span.cline-any {
164
+ display: inline-block;
165
+ padding: 0 5px;
166
+ width: 100%;
167
+ }
168
+
169
+ .missing-if-branch {
170
+ display: inline-block;
171
+ margin-right: 5px;
172
+ border-radius: 3px;
173
+ position: relative;
174
+ padding: 0 4px;
175
+ background: #333;
176
+ color: yellow;
177
+ }
178
+
179
+ .skip-if-branch {
180
+ display: none;
181
+ margin-right: 10px;
182
+ position: relative;
183
+ padding: 0 4px;
184
+ background: #ccc;
185
+ color: white;
186
+ }
187
+
188
+ .missing-if-branch .typ, .skip-if-branch .typ {
189
+ color: inherit !important;
190
+ }
191
+
192
+ .coverage-summary {
193
+ border-collapse: collapse;
194
+ width: 100%;
195
+ }
196
+
197
+ .coverage-summary tr {
198
+ border-bottom: 1px solid #bbb;
199
+ }
200
+
201
+ .keyline-all {
202
+ border: 1px solid #ddd;
203
+ }
204
+
205
+ .coverage-summary td, .coverage-summary th {
206
+ padding: 10px;
207
+ }
208
+
209
+ .coverage-summary tbody {
210
+ border: 1px solid #bbb;
211
+ }
212
+
213
+ .coverage-summary td {
214
+ border-right: 1px solid #bbb;
215
+ }
216
+
217
+ .coverage-summary td:last-child {
218
+ border-right: none;
219
+ }
220
+
221
+ .coverage-summary th {
222
+ text-align: left;
223
+ font-weight: normal;
224
+ white-space: nowrap;
225
+ }
226
+
227
+ .coverage-summary th.file {
228
+ border-right: none !important;
229
+ }
230
+
231
+ .coverage-summary th.pct {
232
+ }
233
+
234
+ .coverage-summary th.pic,
235
+ .coverage-summary th.abs,
236
+ .coverage-summary td.pct,
237
+ .coverage-summary td.abs {
238
+ text-align: right;
239
+ }
240
+
241
+ .coverage-summary td.file {
242
+ white-space: nowrap;
243
+ }
244
+
245
+ .coverage-summary td.pic {
246
+ min-width: 120px !important;
247
+ }
248
+
249
+ .coverage-summary tfoot td {
250
+ }
251
+
252
+ .coverage-summary .sorter {
253
+ height: 10px;
254
+ width: 7px;
255
+ display: inline-block;
256
+ margin-left: 0.5em;
257
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
258
+ }
259
+
260
+ .coverage-summary .sorted .sorter {
261
+ background-position: 0 -20px;
262
+ }
263
+
264
+ .coverage-summary .sorted-desc .sorter {
265
+ background-position: 0 -10px;
266
+ }
267
+
268
+ .status-line {
269
+ height: 10px;
270
+ }
271
+
272
+ /* yellow */
273
+ .cbranch-no {
274
+ background: yellow !important;
275
+ color: #111;
276
+ }
277
+
278
+ /* dark red */
279
+ .red.solid, .status-line.low, .low .cover-fill {
280
+ background: #C21F39
281
+ }
282
+
283
+ .low .chart {
284
+ border: 1px solid #C21F39
285
+ }
286
+
287
+ .highlighted,
288
+ .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no {
289
+ background: #C21F39 !important;
290
+ }
291
+
292
+ /* medium red */
293
+ .cstat-no, .fstat-no, .cbranch-no, .cbranch-no {
294
+ background: #F6C6CE
295
+ }
296
+
297
+ /* light red */
298
+ .low, .cline-no {
299
+ background: #FCE1E5
300
+ }
301
+
302
+ /* light green */
303
+ .high, .cline-yes {
304
+ background: rgb(230, 245, 208)
305
+ }
306
+
307
+ /* medium green */
308
+ .cstat-yes {
309
+ background: rgb(161, 215, 106)
310
+ }
311
+
312
+ /* dark green */
313
+ .status-line.high, .high .cover-fill {
314
+ background: rgb(77, 146, 33)
315
+ }
316
+
317
+ .high .chart {
318
+ border: 1px solid rgb(77, 146, 33)
319
+ }
320
+
321
+ /* dark yellow (gold) */
322
+ .status-line.medium, .medium .cover-fill {
323
+ background: #f9cd0b;
324
+ }
325
+
326
+ .medium .chart {
327
+ border: 1px solid #f9cd0b;
328
+ }
329
+
330
+ /* light yellow */
331
+ .medium {
332
+ background: #fff4c2;
333
+ }
334
+
335
+ .cstat-skip {
336
+ background: #ddd;
337
+ color: #111;
338
+ }
339
+
340
+ .fstat-skip {
341
+ background: #ddd;
342
+ color: #111 !important;
343
+ }
344
+
345
+ .cbranch-skip {
346
+ background: #ddd !important;
347
+ color: #111;
348
+ }
349
+
350
+ span.cline-neutral {
351
+ background: #eaeaea;
352
+ }
353
+
354
+ .coverage-summary td.empty {
355
+ opacity: .5;
356
+ padding-top: 4px;
357
+ padding-bottom: 4px;
358
+ line-height: 1;
359
+ color: #888;
360
+ }
361
+
362
+ .cover-fill, .cover-empty {
363
+ display: inline-block;
364
+ height: 12px;
365
+ }
366
+
367
+ .chart {
368
+ line-height: 0;
369
+ }
370
+
371
+ .cover-empty {
372
+ background: white;
373
+ }
374
+
375
+ .cover-full {
376
+ border-right: none !important;
377
+ }
378
+
379
+ pre.prettyprint {
380
+ border: none !important;
381
+ padding: 0 !important;
382
+ margin: 0 !important;
383
+ }
384
+
385
+ .com {
386
+ color: #999 !important;
387
+ }
388
+
389
+ .ignore-none {
390
+ color: #999;
391
+ font-weight: normal;
392
+ }
393
+
394
+ .wrapper {
395
+ min-height: 100%;
396
+ height: auto !important;
397
+ height: 100%;
398
+ margin: 0 auto -48px;
399
+ }
400
+
401
+ .footer, .push {
402
+ height: 48px;
403
+ }
@@ -0,0 +1,87 @@
1
+ /* eslint-disable */
2
+ var jumpToCode = (function init() {
3
+ // Classes of code we would like to highlight in the file view
4
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
+
6
+ // Elements to highlight in the file listing view
7
+ var fileListingElements = ['td.pct.low'];
8
+
9
+ // We don't want to select elements that are direct descendants of another match
10
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
+
12
+ // Selecter that finds elements on the page to which we can jump
13
+ var selector =
14
+ fileListingElements.join(', ') +
15
+ ', ' +
16
+ notSelector +
17
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18
+
19
+ // The NodeList of matching elements
20
+ var missingCoverageElements = document.querySelectorAll(selector);
21
+
22
+ var currentIndex;
23
+
24
+ function toggleClass(index) {
25
+ missingCoverageElements
26
+ .item(currentIndex)
27
+ .classList.remove('highlighted');
28
+ missingCoverageElements.item(index).classList.add('highlighted');
29
+ }
30
+
31
+ function makeCurrent(index) {
32
+ toggleClass(index);
33
+ currentIndex = index;
34
+ missingCoverageElements.item(index).scrollIntoView({
35
+ behavior: 'smooth',
36
+ block: 'center',
37
+ inline: 'center'
38
+ });
39
+ }
40
+
41
+ function goToPrevious() {
42
+ var nextIndex = 0;
43
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
44
+ nextIndex = missingCoverageElements.length - 1;
45
+ } else if (missingCoverageElements.length > 1) {
46
+ nextIndex = currentIndex - 1;
47
+ }
48
+
49
+ makeCurrent(nextIndex);
50
+ }
51
+
52
+ function goToNext() {
53
+ var nextIndex = 0;
54
+
55
+ if (
56
+ typeof currentIndex === 'number' &&
57
+ currentIndex < missingCoverageElements.length - 1
58
+ ) {
59
+ nextIndex = currentIndex + 1;
60
+ }
61
+
62
+ makeCurrent(nextIndex);
63
+ }
64
+
65
+ return function jump(event) {
66
+ if (
67
+ document.getElementById('fileSearch') === document.activeElement &&
68
+ document.activeElement != null
69
+ ) {
70
+ // if we're currently focused on the search input, we don't want to navigate
71
+ return;
72
+ }
73
+
74
+ switch (event.which) {
75
+ case 78: // n
76
+ case 74: // j
77
+ goToNext();
78
+ break;
79
+ case 66: // b
80
+ case 75: // k
81
+ case 80: // p
82
+ goToPrevious();
83
+ break;
84
+ }
85
+ };
86
+ })();
87
+ window.addEventListener('keydown', jumpToCode);
Binary file
@@ -0,0 +1,120 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <title>Code coverage report for All files</title>
6
+ <meta charset="utf-8"/>
7
+ <link href="prettify.css" rel="stylesheet"/>
8
+ <link href="base.css" rel="stylesheet"/>
9
+ <link href="favicon.png" rel="shortcut icon" type="image/x-icon"/>
10
+ <meta content="width=device-width, initial-scale=1" name="viewport"/>
11
+ <style type='text/css'>
12
+ .coverage-summary .sorter {
13
+ background-image: url(sort-arrow-sprite.png);
14
+ }
15
+ </style>
16
+ </head>
17
+
18
+ <body>
19
+ <div class='wrapper'>
20
+ <div class='pad1'>
21
+ <h1>All files</h1>
22
+ <div class='clearfix'>
23
+
24
+ <div class='fl pad1y space-right2'>
25
+ <span class="strong">100% </span>
26
+ <span class="quiet">Statements</span>
27
+ <span class='fraction'>3/3</span>
28
+ </div>
29
+
30
+
31
+ <div class='fl pad1y space-right2'>
32
+ <span class="strong">100% </span>
33
+ <span class="quiet">Branches</span>
34
+ <span class='fraction'>0/0</span>
35
+ </div>
36
+
37
+
38
+ <div class='fl pad1y space-right2'>
39
+ <span class="strong">100% </span>
40
+ <span class="quiet">Functions</span>
41
+ <span class='fraction'>2/2</span>
42
+ </div>
43
+
44
+
45
+ <div class='fl pad1y space-right2'>
46
+ <span class="strong">100% </span>
47
+ <span class="quiet">Lines</span>
48
+ <span class='fraction'>1/1</span>
49
+ </div>
50
+
51
+
52
+ </div>
53
+ <p class="quiet">
54
+ Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for
55
+ the previous block.
56
+ </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input id="fileSearch" oninput="onInput()" type="search">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line high'></div>
65
+ <div class="pad1">
66
+ <table class="coverage-summary">
67
+ <thead>
68
+ <tr>
69
+ <th class="file" data-col="file" data-fmt="html" data-html="true">File</th>
70
+ <th class="pic" data-col="pic" data-fmt="html" data-html="true" data-type="number"></th>
71
+ <th class="pct" data-col="statements" data-fmt="pct" data-type="number">Statements</th>
72
+ <th class="abs" data-col="statements_raw" data-fmt="html" data-type="number"></th>
73
+ <th class="pct" data-col="branches" data-fmt="pct" data-type="number">Branches</th>
74
+ <th class="abs" data-col="branches_raw" data-fmt="html" data-type="number"></th>
75
+ <th class="pct" data-col="functions" data-fmt="pct" data-type="number">Functions</th>
76
+ <th class="abs" data-col="functions_raw" data-fmt="html" data-type="number"></th>
77
+ <th class="pct" data-col="lines" data-fmt="pct" data-type="number">Lines</th>
78
+ <th class="abs" data-col="lines_raw" data-fmt="html" data-type="number"></th>
79
+ </tr>
80
+ </thead>
81
+ <tbody>
82
+ <tr>
83
+ <td class="file high" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
84
+ <td class="pic high" data-value="100">
85
+ <div class="chart">
86
+ <div class="cover-fill cover-full" style="width: 100%"></div>
87
+ <div class="cover-empty" style="width: 0%"></div>
88
+ </div>
89
+ </td>
90
+ <td class="pct high" data-value="100">100%</td>
91
+ <td class="abs high" data-value="3">3/3</td>
92
+ <td class="pct high" data-value="100">100%</td>
93
+ <td class="abs high" data-value="0">0/0</td>
94
+ <td class="pct high" data-value="100">100%</td>
95
+ <td class="abs high" data-value="2">2/2</td>
96
+ <td class="pct high" data-value="100">100%</td>
97
+ <td class="abs high" data-value="1">1/1</td>
98
+ </tr>
99
+
100
+ </tbody>
101
+ </table>
102
+ </div>
103
+ <div class='push'></div><!-- for sticky footer -->
104
+ </div><!-- /wrapper -->
105
+ <div class='footer quiet pad2 space-top1 center small'>
106
+ Code coverage generated by
107
+ <a href="https://istanbul.js.org/" rel="noopener noreferrer" target="_blank">istanbul</a>
108
+ at 2023-10-08T10:23:58.995Z
109
+ </div>
110
+ <script src="prettify.js"></script>
111
+ <script>
112
+ window.onload = function () {
113
+ prettyPrint();
114
+ };
115
+ </script>
116
+ <script src="sorter.js"></script>
117
+ <script src="block-navigation.js"></script>
118
+ </body>
119
+ </html>
120
+