data-structure-typed 1.54.0 → 1.54.2

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 (498) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +1 -0
  3. package/benchmark/report.html +1 -28
  4. package/benchmark/report.json +17 -326
  5. package/dist/{mjs/data-structures/binary-tree/avl-tree-multi-map.d.ts → cjs/data-structures/binary-tree/avl-tree-counter.d.ts} +54 -47
  6. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js +408 -0
  7. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js.map +1 -0
  8. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.d.ts +71 -177
  9. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js +135 -340
  10. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -1
  11. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +102 -57
  12. package/dist/cjs/data-structures/binary-tree/avl-tree.js +110 -47
  13. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
  14. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.d.ts +3 -0
  15. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js +3 -0
  16. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +1 -1
  17. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +240 -190
  18. package/dist/cjs/data-structures/binary-tree/binary-tree.js +269 -240
  19. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -1
  20. package/dist/cjs/data-structures/binary-tree/bst.d.ts +145 -112
  21. package/dist/cjs/data-structures/binary-tree/bst.js +180 -129
  22. package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
  23. package/dist/cjs/data-structures/binary-tree/index.d.ts +2 -0
  24. package/dist/cjs/data-structures/binary-tree/index.js +2 -0
  25. package/dist/cjs/data-structures/binary-tree/index.js.map +1 -1
  26. package/dist/cjs/data-structures/binary-tree/red-black-tree.d.ts +100 -82
  27. package/dist/cjs/data-structures/binary-tree/red-black-tree.js +115 -79
  28. package/dist/cjs/data-structures/binary-tree/red-black-tree.js.map +1 -1
  29. package/dist/{mjs/data-structures/binary-tree/tree-multi-map.d.ts → cjs/data-structures/binary-tree/tree-counter.d.ts} +74 -64
  30. package/dist/cjs/data-structures/binary-tree/tree-counter.js +445 -0
  31. package/dist/cjs/data-structures/binary-tree/tree-counter.js.map +1 -0
  32. package/dist/cjs/data-structures/binary-tree/tree-multi-map.d.ts +78 -174
  33. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +142 -377
  34. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +1 -1
  35. package/dist/cjs/data-structures/graph/directed-graph.d.ts +3 -0
  36. package/dist/cjs/data-structures/graph/directed-graph.js +3 -0
  37. package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -1
  38. package/dist/cjs/data-structures/graph/map-graph.d.ts +3 -0
  39. package/dist/cjs/data-structures/graph/map-graph.js +3 -0
  40. package/dist/cjs/data-structures/graph/map-graph.js.map +1 -1
  41. package/dist/cjs/data-structures/graph/undirected-graph.d.ts +3 -0
  42. package/dist/cjs/data-structures/graph/undirected-graph.js +3 -0
  43. package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -1
  44. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +3 -0
  45. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +3 -0
  46. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -1
  47. package/dist/cjs/data-structures/linked-list/skip-linked-list.d.ts +3 -0
  48. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +3 -0
  49. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +1 -1
  50. package/dist/cjs/data-structures/matrix/matrix.d.ts +3 -0
  51. package/dist/cjs/data-structures/matrix/matrix.js +3 -0
  52. package/dist/cjs/data-structures/matrix/matrix.js.map +1 -1
  53. package/dist/cjs/data-structures/matrix/navigator.d.ts +3 -0
  54. package/dist/cjs/data-structures/matrix/navigator.js +3 -0
  55. package/dist/cjs/data-structures/matrix/navigator.js.map +1 -1
  56. package/dist/cjs/data-structures/priority-queue/max-priority-queue.d.ts +3 -0
  57. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +3 -0
  58. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +1 -1
  59. package/dist/cjs/data-structures/priority-queue/min-priority-queue.d.ts +3 -0
  60. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +3 -0
  61. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +1 -1
  62. package/dist/cjs/data-structures/trie/trie.d.ts +0 -4
  63. package/dist/cjs/data-structures/trie/trie.js +0 -4
  64. package/dist/cjs/data-structures/trie/trie.js.map +1 -1
  65. package/dist/cjs/interfaces/binary-tree.d.ts +8 -8
  66. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.d.ts +2 -0
  67. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js +3 -0
  68. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js.map +1 -0
  69. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +1 -4
  70. package/dist/cjs/types/data-structures/binary-tree/avl-tree.d.ts +0 -3
  71. package/dist/cjs/types/data-structures/binary-tree/binary-tree.d.ts +0 -3
  72. package/dist/cjs/types/data-structures/binary-tree/bst.d.ts +3 -3
  73. package/dist/cjs/types/data-structures/binary-tree/index.d.ts +3 -1
  74. package/dist/cjs/types/data-structures/binary-tree/index.js +3 -1
  75. package/dist/cjs/types/data-structures/binary-tree/index.js.map +1 -1
  76. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.d.ts +3 -0
  77. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js +3 -0
  78. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js.map +1 -0
  79. package/dist/cjs/types/data-structures/binary-tree/tree-counter.d.ts +2 -0
  80. package/dist/cjs/types/data-structures/binary-tree/{rb-tree.js → tree-counter.js} +1 -1
  81. package/dist/cjs/types/data-structures/binary-tree/tree-counter.js.map +1 -0
  82. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.d.ts +2 -5
  83. package/dist/esm/data-structures/binary-tree/avl-tree-counter.d.ts +213 -0
  84. package/dist/{mjs/data-structures/binary-tree/avl-tree-multi-map.js → esm/data-structures/binary-tree/avl-tree-counter.js} +73 -60
  85. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js.map +1 -0
  86. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.d.ts +100 -0
  87. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js +191 -0
  88. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -0
  89. package/dist/esm/data-structures/binary-tree/avl-tree.d.ts +234 -0
  90. package/dist/{mjs → esm}/data-structures/binary-tree/avl-tree.js +110 -47
  91. package/dist/esm/data-structures/binary-tree/avl-tree.js.map +1 -0
  92. package/dist/{mjs → esm}/data-structures/binary-tree/binary-indexed-tree.d.ts +3 -0
  93. package/dist/{mjs → esm}/data-structures/binary-tree/binary-indexed-tree.js +3 -0
  94. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
  95. package/dist/{mjs → esm}/data-structures/binary-tree/binary-tree.d.ts +240 -190
  96. package/dist/{mjs → esm}/data-structures/binary-tree/binary-tree.js +272 -245
  97. package/dist/esm/data-structures/binary-tree/binary-tree.js.map +1 -0
  98. package/dist/{mjs → esm}/data-structures/binary-tree/bst.d.ts +145 -112
  99. package/dist/{mjs → esm}/data-structures/binary-tree/bst.js +201 -155
  100. package/dist/esm/data-structures/binary-tree/bst.js.map +1 -0
  101. package/dist/{mjs → esm}/data-structures/binary-tree/index.d.ts +2 -0
  102. package/dist/{mjs/types/data-structures/binary-tree/index.d.ts → esm/data-structures/binary-tree/index.js} +6 -2
  103. package/dist/{mjs → esm}/data-structures/binary-tree/index.js.map +1 -1
  104. package/dist/{mjs → esm}/data-structures/binary-tree/red-black-tree.d.ts +100 -82
  105. package/dist/{mjs → esm}/data-structures/binary-tree/red-black-tree.js +115 -79
  106. package/dist/esm/data-structures/binary-tree/red-black-tree.js.map +1 -0
  107. package/dist/esm/data-structures/binary-tree/tree-counter.d.ts +212 -0
  108. package/dist/{mjs/data-structures/binary-tree/tree-multi-map.js → esm/data-structures/binary-tree/tree-counter.js} +111 -96
  109. package/dist/esm/data-structures/binary-tree/tree-counter.js.map +1 -0
  110. package/dist/esm/data-structures/binary-tree/tree-multi-map.d.ts +106 -0
  111. package/dist/esm/data-structures/binary-tree/tree-multi-map.js +196 -0
  112. package/dist/esm/data-structures/binary-tree/tree-multi-map.js.map +1 -0
  113. package/dist/{mjs → esm}/data-structures/graph/directed-graph.d.ts +3 -0
  114. package/dist/{mjs → esm}/data-structures/graph/directed-graph.js +3 -0
  115. package/dist/esm/data-structures/graph/directed-graph.js.map +1 -0
  116. package/dist/{mjs → esm}/data-structures/graph/map-graph.d.ts +3 -0
  117. package/dist/{mjs → esm}/data-structures/graph/map-graph.js +3 -0
  118. package/dist/esm/data-structures/graph/map-graph.js.map +1 -0
  119. package/dist/{mjs → esm}/data-structures/graph/undirected-graph.d.ts +3 -0
  120. package/dist/{mjs → esm}/data-structures/graph/undirected-graph.js +3 -0
  121. package/dist/esm/data-structures/graph/undirected-graph.js.map +1 -0
  122. package/dist/{mjs → esm}/data-structures/linked-list/singly-linked-list.d.ts +3 -0
  123. package/dist/{mjs → esm}/data-structures/linked-list/singly-linked-list.js +3 -0
  124. package/dist/esm/data-structures/linked-list/singly-linked-list.js.map +1 -0
  125. package/dist/{mjs → esm}/data-structures/linked-list/skip-linked-list.d.ts +3 -0
  126. package/dist/{mjs → esm}/data-structures/linked-list/skip-linked-list.js +3 -0
  127. package/dist/esm/data-structures/linked-list/skip-linked-list.js.map +1 -0
  128. package/dist/{mjs → esm}/data-structures/matrix/matrix.d.ts +3 -0
  129. package/dist/{mjs → esm}/data-structures/matrix/matrix.js +3 -0
  130. package/dist/esm/data-structures/matrix/matrix.js.map +1 -0
  131. package/dist/{mjs → esm}/data-structures/matrix/navigator.d.ts +3 -0
  132. package/dist/{mjs → esm}/data-structures/matrix/navigator.js +3 -0
  133. package/dist/esm/data-structures/matrix/navigator.js.map +1 -0
  134. package/dist/{mjs → esm}/data-structures/priority-queue/max-priority-queue.d.ts +3 -0
  135. package/dist/{mjs → esm}/data-structures/priority-queue/max-priority-queue.js +3 -0
  136. package/dist/esm/data-structures/priority-queue/max-priority-queue.js.map +1 -0
  137. package/dist/{mjs → esm}/data-structures/priority-queue/min-priority-queue.d.ts +3 -0
  138. package/dist/{mjs → esm}/data-structures/priority-queue/min-priority-queue.js +3 -0
  139. package/dist/esm/data-structures/priority-queue/min-priority-queue.js.map +1 -0
  140. package/dist/{mjs → esm}/data-structures/trie/trie.d.ts +0 -4
  141. package/dist/{mjs → esm}/data-structures/trie/trie.js +0 -4
  142. package/dist/esm/data-structures/trie/trie.js.map +1 -0
  143. package/dist/esm/interfaces/binary-tree.d.ts +9 -0
  144. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.d.ts +2 -0
  145. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js +2 -0
  146. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js.map +1 -0
  147. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +2 -0
  148. package/dist/esm/types/data-structures/binary-tree/avl-tree.d.ts +2 -0
  149. package/dist/{mjs → esm}/types/data-structures/binary-tree/binary-tree.d.ts +0 -3
  150. package/dist/{mjs → esm}/types/data-structures/binary-tree/bst.d.ts +3 -3
  151. package/dist/{mjs/data-structures/binary-tree/index.js → esm/types/data-structures/binary-tree/index.d.ts} +4 -4
  152. package/dist/{mjs → esm}/types/data-structures/binary-tree/index.js +3 -1
  153. package/dist/{mjs → esm}/types/data-structures/binary-tree/index.js.map +1 -1
  154. package/dist/esm/types/data-structures/binary-tree/red-black-tree.d.ts +3 -0
  155. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js +2 -0
  156. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js.map +1 -0
  157. package/dist/esm/types/data-structures/binary-tree/tree-counter.d.ts +2 -0
  158. package/dist/esm/types/data-structures/binary-tree/tree-counter.js +2 -0
  159. package/dist/esm/types/data-structures/binary-tree/tree-counter.js.map +1 -0
  160. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.d.ts +2 -0
  161. package/dist/umd/data-structure-typed.js +1464 -895
  162. package/dist/umd/data-structure-typed.min.js +5 -5
  163. package/dist/umd/data-structure-typed.min.js.map +1 -1
  164. package/package.json +14 -19
  165. package/src/data-structures/binary-tree/avl-tree-counter.ts +463 -0
  166. package/src/data-structures/binary-tree/avl-tree-multi-map.ts +155 -393
  167. package/src/data-structures/binary-tree/avl-tree.ts +144 -93
  168. package/src/data-structures/binary-tree/binary-indexed-tree.ts +3 -0
  169. package/src/data-structures/binary-tree/binary-tree.ts +433 -405
  170. package/src/data-structures/binary-tree/bst.ts +261 -239
  171. package/src/data-structures/binary-tree/index.ts +2 -0
  172. package/src/data-structures/binary-tree/red-black-tree.ts +163 -134
  173. package/src/data-structures/binary-tree/tree-counter.ts +504 -0
  174. package/src/data-structures/binary-tree/tree-multi-map.ts +161 -429
  175. package/src/data-structures/graph/directed-graph.ts +3 -0
  176. package/src/data-structures/graph/map-graph.ts +3 -0
  177. package/src/data-structures/graph/undirected-graph.ts +3 -0
  178. package/src/data-structures/linked-list/singly-linked-list.ts +3 -0
  179. package/src/data-structures/linked-list/skip-linked-list.ts +3 -0
  180. package/src/data-structures/matrix/matrix.ts +3 -0
  181. package/src/data-structures/matrix/navigator.ts +3 -0
  182. package/src/data-structures/priority-queue/max-priority-queue.ts +3 -0
  183. package/src/data-structures/priority-queue/min-priority-queue.ts +3 -0
  184. package/src/data-structures/trie/trie.ts +0 -4
  185. package/src/interfaces/binary-tree.ts +10 -24
  186. package/src/types/data-structures/binary-tree/avl-tree-counter.ts +3 -0
  187. package/src/types/data-structures/binary-tree/avl-tree-multi-map.ts +1 -6
  188. package/src/types/data-structures/binary-tree/avl-tree.ts +0 -5
  189. package/src/types/data-structures/binary-tree/binary-tree.ts +0 -5
  190. package/src/types/data-structures/binary-tree/bst.ts +5 -5
  191. package/src/types/data-structures/binary-tree/index.ts +3 -1
  192. package/src/types/data-structures/binary-tree/red-black-tree.ts +5 -0
  193. package/src/types/data-structures/binary-tree/tree-counter.ts +3 -0
  194. package/src/types/data-structures/binary-tree/tree-multi-map.ts +2 -7
  195. package/test/integration/all-in-one.test.ts +1 -1
  196. package/test/integration/avl-tree.test.ts +1 -1
  197. package/test/integration/bst.test.ts +2 -2
  198. package/test/integration/compile.js +144 -0
  199. package/test/integration/compile.mjs +135 -0
  200. package/test/integration/compile.ts +171 -0
  201. package/test/integration/index.html +48 -48
  202. package/test/performance/data-structures/binary-tree/avl-tree.test.js +45 -0
  203. package/test/performance/data-structures/binary-tree/avl-tree.test.ts +4 -4
  204. package/test/performance/data-structures/binary-tree/rb-tree.test.ts +5 -4
  205. package/test/performance/data-structures/comparison/comparison.test.ts +2 -2
  206. package/test/performance/reportor.js +249 -0
  207. package/test/performance/reportor.ts +5 -3
  208. package/test/unit/data-structures/binary-tree/avl-tree-counter.test.ts +877 -0
  209. package/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts +459 -761
  210. package/test/unit/data-structures/binary-tree/avl-tree.test.ts +223 -223
  211. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +474 -492
  212. package/test/unit/data-structures/binary-tree/bst.test.ts +1 -1
  213. package/test/unit/data-structures/binary-tree/overall.test.ts +0 -3
  214. package/test/unit/data-structures/binary-tree/red-black-tree.test.ts +87 -90
  215. package/test/unit/data-structures/binary-tree/tree-counter.test.ts +975 -0
  216. package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +729 -857
  217. package/test/unit/data-structures/hash/hash-map.test.ts +1 -1
  218. package/{tsconfig-mjs.json → tsconfig-esm.json} +1 -1
  219. package/dist/cjs/types/data-structures/binary-tree/rb-tree.d.ts +0 -6
  220. package/dist/cjs/types/data-structures/binary-tree/rb-tree.js.map +0 -1
  221. package/dist/mjs/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  222. package/dist/mjs/data-structures/binary-tree/avl-tree.d.ts +0 -189
  223. package/dist/mjs/data-structures/binary-tree/avl-tree.js.map +0 -1
  224. package/dist/mjs/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  225. package/dist/mjs/data-structures/binary-tree/binary-tree.js.map +0 -1
  226. package/dist/mjs/data-structures/binary-tree/bst.js.map +0 -1
  227. package/dist/mjs/data-structures/binary-tree/red-black-tree.js.map +0 -1
  228. package/dist/mjs/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  229. package/dist/mjs/data-structures/graph/directed-graph.js.map +0 -1
  230. package/dist/mjs/data-structures/graph/map-graph.js.map +0 -1
  231. package/dist/mjs/data-structures/graph/undirected-graph.js.map +0 -1
  232. package/dist/mjs/data-structures/linked-list/singly-linked-list.js.map +0 -1
  233. package/dist/mjs/data-structures/linked-list/skip-linked-list.js.map +0 -1
  234. package/dist/mjs/data-structures/matrix/matrix.js.map +0 -1
  235. package/dist/mjs/data-structures/matrix/navigator.js.map +0 -1
  236. package/dist/mjs/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  237. package/dist/mjs/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  238. package/dist/mjs/data-structures/trie/trie.js.map +0 -1
  239. package/dist/mjs/interfaces/binary-tree.d.ts +0 -9
  240. package/dist/mjs/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -5
  241. package/dist/mjs/types/data-structures/binary-tree/avl-tree.d.ts +0 -5
  242. package/dist/mjs/types/data-structures/binary-tree/rb-tree.d.ts +0 -6
  243. package/dist/mjs/types/data-structures/binary-tree/rb-tree.js +0 -2
  244. package/dist/mjs/types/data-structures/binary-tree/rb-tree.js.map +0 -1
  245. package/dist/mjs/types/data-structures/binary-tree/tree-multi-map.d.ts +0 -5
  246. package/src/types/data-structures/binary-tree/rb-tree.ts +0 -10
  247. /package/dist/{mjs → esm}/common/index.d.ts +0 -0
  248. /package/dist/{mjs → esm}/common/index.js +0 -0
  249. /package/dist/{mjs → esm}/common/index.js.map +0 -0
  250. /package/dist/{mjs → esm}/data-structures/base/index.d.ts +0 -0
  251. /package/dist/{mjs → esm}/data-structures/base/index.js +0 -0
  252. /package/dist/{mjs → esm}/data-structures/base/index.js.map +0 -0
  253. /package/dist/{mjs → esm}/data-structures/base/iterable-element-base.d.ts +0 -0
  254. /package/dist/{mjs → esm}/data-structures/base/iterable-element-base.js +0 -0
  255. /package/dist/{mjs → esm}/data-structures/base/iterable-element-base.js.map +0 -0
  256. /package/dist/{mjs → esm}/data-structures/base/iterable-entry-base.d.ts +0 -0
  257. /package/dist/{mjs → esm}/data-structures/base/iterable-entry-base.js +0 -0
  258. /package/dist/{mjs → esm}/data-structures/base/iterable-entry-base.js.map +0 -0
  259. /package/dist/{mjs → esm}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  260. /package/dist/{mjs → esm}/data-structures/binary-tree/segment-tree.js +0 -0
  261. /package/dist/{mjs → esm}/data-structures/binary-tree/segment-tree.js.map +0 -0
  262. /package/dist/{mjs → esm}/data-structures/graph/abstract-graph.d.ts +0 -0
  263. /package/dist/{mjs → esm}/data-structures/graph/abstract-graph.js +0 -0
  264. /package/dist/{mjs → esm}/data-structures/graph/abstract-graph.js.map +0 -0
  265. /package/dist/{mjs → esm}/data-structures/graph/index.d.ts +0 -0
  266. /package/dist/{mjs → esm}/data-structures/graph/index.js +0 -0
  267. /package/dist/{mjs → esm}/data-structures/graph/index.js.map +0 -0
  268. /package/dist/{mjs → esm}/data-structures/hash/hash-map.d.ts +0 -0
  269. /package/dist/{mjs → esm}/data-structures/hash/hash-map.js +0 -0
  270. /package/dist/{mjs → esm}/data-structures/hash/hash-map.js.map +0 -0
  271. /package/dist/{mjs → esm}/data-structures/hash/index.d.ts +0 -0
  272. /package/dist/{mjs → esm}/data-structures/hash/index.js +0 -0
  273. /package/dist/{mjs → esm}/data-structures/hash/index.js.map +0 -0
  274. /package/dist/{mjs → esm}/data-structures/heap/heap.d.ts +0 -0
  275. /package/dist/{mjs → esm}/data-structures/heap/heap.js +0 -0
  276. /package/dist/{mjs → esm}/data-structures/heap/heap.js.map +0 -0
  277. /package/dist/{mjs → esm}/data-structures/heap/index.d.ts +0 -0
  278. /package/dist/{mjs → esm}/data-structures/heap/index.js +0 -0
  279. /package/dist/{mjs → esm}/data-structures/heap/index.js.map +0 -0
  280. /package/dist/{mjs → esm}/data-structures/heap/max-heap.d.ts +0 -0
  281. /package/dist/{mjs → esm}/data-structures/heap/max-heap.js +0 -0
  282. /package/dist/{mjs → esm}/data-structures/heap/max-heap.js.map +0 -0
  283. /package/dist/{mjs → esm}/data-structures/heap/min-heap.d.ts +0 -0
  284. /package/dist/{mjs → esm}/data-structures/heap/min-heap.js +0 -0
  285. /package/dist/{mjs → esm}/data-structures/heap/min-heap.js.map +0 -0
  286. /package/dist/{mjs → esm}/data-structures/index.d.ts +0 -0
  287. /package/dist/{mjs → esm}/data-structures/index.js +0 -0
  288. /package/dist/{mjs → esm}/data-structures/index.js.map +0 -0
  289. /package/dist/{mjs → esm}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  290. /package/dist/{mjs → esm}/data-structures/linked-list/doubly-linked-list.js +0 -0
  291. /package/dist/{mjs → esm}/data-structures/linked-list/doubly-linked-list.js.map +0 -0
  292. /package/dist/{mjs → esm}/data-structures/linked-list/index.d.ts +0 -0
  293. /package/dist/{mjs → esm}/data-structures/linked-list/index.js +0 -0
  294. /package/dist/{mjs → esm}/data-structures/linked-list/index.js.map +0 -0
  295. /package/dist/{mjs → esm}/data-structures/matrix/index.d.ts +0 -0
  296. /package/dist/{mjs → esm}/data-structures/matrix/index.js +0 -0
  297. /package/dist/{mjs → esm}/data-structures/matrix/index.js.map +0 -0
  298. /package/dist/{mjs → esm}/data-structures/priority-queue/index.d.ts +0 -0
  299. /package/dist/{mjs → esm}/data-structures/priority-queue/index.js +0 -0
  300. /package/dist/{mjs → esm}/data-structures/priority-queue/index.js.map +0 -0
  301. /package/dist/{mjs → esm}/data-structures/priority-queue/priority-queue.d.ts +0 -0
  302. /package/dist/{mjs → esm}/data-structures/priority-queue/priority-queue.js +0 -0
  303. /package/dist/{mjs → esm}/data-structures/priority-queue/priority-queue.js.map +0 -0
  304. /package/dist/{mjs → esm}/data-structures/queue/deque.d.ts +0 -0
  305. /package/dist/{mjs → esm}/data-structures/queue/deque.js +0 -0
  306. /package/dist/{mjs → esm}/data-structures/queue/deque.js.map +0 -0
  307. /package/dist/{mjs → esm}/data-structures/queue/index.d.ts +0 -0
  308. /package/dist/{mjs → esm}/data-structures/queue/index.js +0 -0
  309. /package/dist/{mjs → esm}/data-structures/queue/index.js.map +0 -0
  310. /package/dist/{mjs → esm}/data-structures/queue/queue.d.ts +0 -0
  311. /package/dist/{mjs → esm}/data-structures/queue/queue.js +0 -0
  312. /package/dist/{mjs → esm}/data-structures/queue/queue.js.map +0 -0
  313. /package/dist/{mjs → esm}/data-structures/stack/index.d.ts +0 -0
  314. /package/dist/{mjs → esm}/data-structures/stack/index.js +0 -0
  315. /package/dist/{mjs → esm}/data-structures/stack/index.js.map +0 -0
  316. /package/dist/{mjs → esm}/data-structures/stack/stack.d.ts +0 -0
  317. /package/dist/{mjs → esm}/data-structures/stack/stack.js +0 -0
  318. /package/dist/{mjs → esm}/data-structures/stack/stack.js.map +0 -0
  319. /package/dist/{mjs → esm}/data-structures/tree/index.d.ts +0 -0
  320. /package/dist/{mjs → esm}/data-structures/tree/index.js +0 -0
  321. /package/dist/{mjs → esm}/data-structures/tree/index.js.map +0 -0
  322. /package/dist/{mjs → esm}/data-structures/tree/tree.d.ts +0 -0
  323. /package/dist/{mjs → esm}/data-structures/tree/tree.js +0 -0
  324. /package/dist/{mjs → esm}/data-structures/tree/tree.js.map +0 -0
  325. /package/dist/{mjs → esm}/data-structures/trie/index.d.ts +0 -0
  326. /package/dist/{mjs → esm}/data-structures/trie/index.js +0 -0
  327. /package/dist/{mjs → esm}/data-structures/trie/index.js.map +0 -0
  328. /package/dist/{mjs → esm}/index.d.ts +0 -0
  329. /package/dist/{mjs → esm}/index.js +0 -0
  330. /package/dist/{mjs → esm}/index.js.map +0 -0
  331. /package/dist/{mjs → esm}/interfaces/binary-tree.js +0 -0
  332. /package/dist/{mjs → esm}/interfaces/binary-tree.js.map +0 -0
  333. /package/dist/{mjs → esm}/interfaces/doubly-linked-list.d.ts +0 -0
  334. /package/dist/{mjs → esm}/interfaces/doubly-linked-list.js +0 -0
  335. /package/dist/{mjs → esm}/interfaces/doubly-linked-list.js.map +0 -0
  336. /package/dist/{mjs → esm}/interfaces/graph.d.ts +0 -0
  337. /package/dist/{mjs → esm}/interfaces/graph.js +0 -0
  338. /package/dist/{mjs → esm}/interfaces/graph.js.map +0 -0
  339. /package/dist/{mjs → esm}/interfaces/heap.d.ts +0 -0
  340. /package/dist/{mjs → esm}/interfaces/heap.js +0 -0
  341. /package/dist/{mjs → esm}/interfaces/heap.js.map +0 -0
  342. /package/dist/{mjs → esm}/interfaces/index.d.ts +0 -0
  343. /package/dist/{mjs → esm}/interfaces/index.js +0 -0
  344. /package/dist/{mjs → esm}/interfaces/index.js.map +0 -0
  345. /package/dist/{mjs → esm}/interfaces/navigator.d.ts +0 -0
  346. /package/dist/{mjs → esm}/interfaces/navigator.js +0 -0
  347. /package/dist/{mjs → esm}/interfaces/navigator.js.map +0 -0
  348. /package/dist/{mjs → esm}/interfaces/priority-queue.d.ts +0 -0
  349. /package/dist/{mjs → esm}/interfaces/priority-queue.js +0 -0
  350. /package/dist/{mjs → esm}/interfaces/priority-queue.js.map +0 -0
  351. /package/dist/{mjs → esm}/interfaces/segment-tree.d.ts +0 -0
  352. /package/dist/{mjs → esm}/interfaces/segment-tree.js +0 -0
  353. /package/dist/{mjs → esm}/interfaces/segment-tree.js.map +0 -0
  354. /package/dist/{mjs → esm}/interfaces/singly-linked-list.d.ts +0 -0
  355. /package/dist/{mjs → esm}/interfaces/singly-linked-list.js +0 -0
  356. /package/dist/{mjs → esm}/interfaces/singly-linked-list.js.map +0 -0
  357. /package/dist/{mjs → esm}/types/common.d.ts +0 -0
  358. /package/dist/{mjs → esm}/types/common.js +0 -0
  359. /package/dist/{mjs → esm}/types/common.js.map +0 -0
  360. /package/dist/{mjs → esm}/types/data-structures/base/base.d.ts +0 -0
  361. /package/dist/{mjs → esm}/types/data-structures/base/base.js +0 -0
  362. /package/dist/{mjs → esm}/types/data-structures/base/base.js.map +0 -0
  363. /package/dist/{mjs → esm}/types/data-structures/base/index.d.ts +0 -0
  364. /package/dist/{mjs → esm}/types/data-structures/base/index.js +0 -0
  365. /package/dist/{mjs → esm}/types/data-structures/base/index.js.map +0 -0
  366. /package/dist/{mjs → esm}/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -0
  367. /package/dist/{mjs → esm}/types/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -0
  368. /package/dist/{mjs → esm}/types/data-structures/binary-tree/avl-tree.js +0 -0
  369. /package/dist/{mjs → esm}/types/data-structures/binary-tree/avl-tree.js.map +0 -0
  370. /package/dist/{mjs → esm}/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  371. /package/dist/{mjs → esm}/types/data-structures/binary-tree/binary-indexed-tree.js +0 -0
  372. /package/dist/{mjs → esm}/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -0
  373. /package/dist/{mjs → esm}/types/data-structures/binary-tree/binary-tree.js +0 -0
  374. /package/dist/{mjs → esm}/types/data-structures/binary-tree/binary-tree.js.map +0 -0
  375. /package/dist/{mjs → esm}/types/data-structures/binary-tree/bst.js +0 -0
  376. /package/dist/{mjs → esm}/types/data-structures/binary-tree/bst.js.map +0 -0
  377. /package/dist/{mjs → esm}/types/data-structures/binary-tree/segment-tree.d.ts +0 -0
  378. /package/dist/{mjs → esm}/types/data-structures/binary-tree/segment-tree.js +0 -0
  379. /package/dist/{mjs → esm}/types/data-structures/binary-tree/segment-tree.js.map +0 -0
  380. /package/dist/{mjs → esm}/types/data-structures/binary-tree/tree-multi-map.js +0 -0
  381. /package/dist/{mjs → esm}/types/data-structures/binary-tree/tree-multi-map.js.map +0 -0
  382. /package/dist/{mjs → esm}/types/data-structures/graph/abstract-graph.d.ts +0 -0
  383. /package/dist/{mjs → esm}/types/data-structures/graph/abstract-graph.js +0 -0
  384. /package/dist/{mjs → esm}/types/data-structures/graph/abstract-graph.js.map +0 -0
  385. /package/dist/{mjs → esm}/types/data-structures/graph/directed-graph.d.ts +0 -0
  386. /package/dist/{mjs → esm}/types/data-structures/graph/directed-graph.js +0 -0
  387. /package/dist/{mjs → esm}/types/data-structures/graph/directed-graph.js.map +0 -0
  388. /package/dist/{mjs → esm}/types/data-structures/graph/index.d.ts +0 -0
  389. /package/dist/{mjs → esm}/types/data-structures/graph/index.js +0 -0
  390. /package/dist/{mjs → esm}/types/data-structures/graph/index.js.map +0 -0
  391. /package/dist/{mjs → esm}/types/data-structures/graph/map-graph.d.ts +0 -0
  392. /package/dist/{mjs → esm}/types/data-structures/graph/map-graph.js +0 -0
  393. /package/dist/{mjs → esm}/types/data-structures/graph/map-graph.js.map +0 -0
  394. /package/dist/{mjs → esm}/types/data-structures/graph/undirected-graph.d.ts +0 -0
  395. /package/dist/{mjs → esm}/types/data-structures/graph/undirected-graph.js +0 -0
  396. /package/dist/{mjs → esm}/types/data-structures/graph/undirected-graph.js.map +0 -0
  397. /package/dist/{mjs → esm}/types/data-structures/hash/hash-map.d.ts +0 -0
  398. /package/dist/{mjs → esm}/types/data-structures/hash/hash-map.js +0 -0
  399. /package/dist/{mjs → esm}/types/data-structures/hash/hash-map.js.map +0 -0
  400. /package/dist/{mjs → esm}/types/data-structures/hash/index.d.ts +0 -0
  401. /package/dist/{mjs → esm}/types/data-structures/hash/index.js +0 -0
  402. /package/dist/{mjs → esm}/types/data-structures/hash/index.js.map +0 -0
  403. /package/dist/{mjs → esm}/types/data-structures/heap/heap.d.ts +0 -0
  404. /package/dist/{mjs → esm}/types/data-structures/heap/heap.js +0 -0
  405. /package/dist/{mjs → esm}/types/data-structures/heap/heap.js.map +0 -0
  406. /package/dist/{mjs → esm}/types/data-structures/heap/index.d.ts +0 -0
  407. /package/dist/{mjs → esm}/types/data-structures/heap/index.js +0 -0
  408. /package/dist/{mjs → esm}/types/data-structures/heap/index.js.map +0 -0
  409. /package/dist/{mjs → esm}/types/data-structures/heap/max-heap.d.ts +0 -0
  410. /package/dist/{mjs → esm}/types/data-structures/heap/max-heap.js +0 -0
  411. /package/dist/{mjs → esm}/types/data-structures/heap/max-heap.js.map +0 -0
  412. /package/dist/{mjs → esm}/types/data-structures/heap/min-heap.d.ts +0 -0
  413. /package/dist/{mjs → esm}/types/data-structures/heap/min-heap.js +0 -0
  414. /package/dist/{mjs → esm}/types/data-structures/heap/min-heap.js.map +0 -0
  415. /package/dist/{mjs → esm}/types/data-structures/index.d.ts +0 -0
  416. /package/dist/{mjs → esm}/types/data-structures/index.js +0 -0
  417. /package/dist/{mjs → esm}/types/data-structures/index.js.map +0 -0
  418. /package/dist/{mjs → esm}/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  419. /package/dist/{mjs → esm}/types/data-structures/linked-list/doubly-linked-list.js +0 -0
  420. /package/dist/{mjs → esm}/types/data-structures/linked-list/doubly-linked-list.js.map +0 -0
  421. /package/dist/{mjs → esm}/types/data-structures/linked-list/index.d.ts +0 -0
  422. /package/dist/{mjs → esm}/types/data-structures/linked-list/index.js +0 -0
  423. /package/dist/{mjs → esm}/types/data-structures/linked-list/index.js.map +0 -0
  424. /package/dist/{mjs → esm}/types/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  425. /package/dist/{mjs → esm}/types/data-structures/linked-list/singly-linked-list.js +0 -0
  426. /package/dist/{mjs → esm}/types/data-structures/linked-list/singly-linked-list.js.map +0 -0
  427. /package/dist/{mjs → esm}/types/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  428. /package/dist/{mjs → esm}/types/data-structures/linked-list/skip-linked-list.js +0 -0
  429. /package/dist/{mjs → esm}/types/data-structures/linked-list/skip-linked-list.js.map +0 -0
  430. /package/dist/{mjs → esm}/types/data-structures/matrix/index.d.ts +0 -0
  431. /package/dist/{mjs → esm}/types/data-structures/matrix/index.js +0 -0
  432. /package/dist/{mjs → esm}/types/data-structures/matrix/index.js.map +0 -0
  433. /package/dist/{mjs → esm}/types/data-structures/matrix/matrix.d.ts +0 -0
  434. /package/dist/{mjs → esm}/types/data-structures/matrix/matrix.js +0 -0
  435. /package/dist/{mjs → esm}/types/data-structures/matrix/matrix.js.map +0 -0
  436. /package/dist/{mjs → esm}/types/data-structures/matrix/navigator.d.ts +0 -0
  437. /package/dist/{mjs → esm}/types/data-structures/matrix/navigator.js +0 -0
  438. /package/dist/{mjs → esm}/types/data-structures/matrix/navigator.js.map +0 -0
  439. /package/dist/{mjs → esm}/types/data-structures/priority-queue/index.d.ts +0 -0
  440. /package/dist/{mjs → esm}/types/data-structures/priority-queue/index.js +0 -0
  441. /package/dist/{mjs → esm}/types/data-structures/priority-queue/index.js.map +0 -0
  442. /package/dist/{mjs → esm}/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  443. /package/dist/{mjs → esm}/types/data-structures/priority-queue/max-priority-queue.js +0 -0
  444. /package/dist/{mjs → esm}/types/data-structures/priority-queue/max-priority-queue.js.map +0 -0
  445. /package/dist/{mjs → esm}/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  446. /package/dist/{mjs → esm}/types/data-structures/priority-queue/min-priority-queue.js +0 -0
  447. /package/dist/{mjs → esm}/types/data-structures/priority-queue/min-priority-queue.js.map +0 -0
  448. /package/dist/{mjs → esm}/types/data-structures/priority-queue/priority-queue.d.ts +0 -0
  449. /package/dist/{mjs → esm}/types/data-structures/priority-queue/priority-queue.js +0 -0
  450. /package/dist/{mjs → esm}/types/data-structures/priority-queue/priority-queue.js.map +0 -0
  451. /package/dist/{mjs → esm}/types/data-structures/queue/deque.d.ts +0 -0
  452. /package/dist/{mjs → esm}/types/data-structures/queue/deque.js +0 -0
  453. /package/dist/{mjs → esm}/types/data-structures/queue/deque.js.map +0 -0
  454. /package/dist/{mjs → esm}/types/data-structures/queue/index.d.ts +0 -0
  455. /package/dist/{mjs → esm}/types/data-structures/queue/index.js +0 -0
  456. /package/dist/{mjs → esm}/types/data-structures/queue/index.js.map +0 -0
  457. /package/dist/{mjs → esm}/types/data-structures/queue/queue.d.ts +0 -0
  458. /package/dist/{mjs → esm}/types/data-structures/queue/queue.js +0 -0
  459. /package/dist/{mjs → esm}/types/data-structures/queue/queue.js.map +0 -0
  460. /package/dist/{mjs → esm}/types/data-structures/stack/index.d.ts +0 -0
  461. /package/dist/{mjs → esm}/types/data-structures/stack/index.js +0 -0
  462. /package/dist/{mjs → esm}/types/data-structures/stack/index.js.map +0 -0
  463. /package/dist/{mjs → esm}/types/data-structures/stack/stack.d.ts +0 -0
  464. /package/dist/{mjs → esm}/types/data-structures/stack/stack.js +0 -0
  465. /package/dist/{mjs → esm}/types/data-structures/stack/stack.js.map +0 -0
  466. /package/dist/{mjs → esm}/types/data-structures/tree/index.d.ts +0 -0
  467. /package/dist/{mjs → esm}/types/data-structures/tree/index.js +0 -0
  468. /package/dist/{mjs → esm}/types/data-structures/tree/index.js.map +0 -0
  469. /package/dist/{mjs → esm}/types/data-structures/tree/tree.d.ts +0 -0
  470. /package/dist/{mjs → esm}/types/data-structures/tree/tree.js +0 -0
  471. /package/dist/{mjs → esm}/types/data-structures/tree/tree.js.map +0 -0
  472. /package/dist/{mjs → esm}/types/data-structures/trie/index.d.ts +0 -0
  473. /package/dist/{mjs → esm}/types/data-structures/trie/index.js +0 -0
  474. /package/dist/{mjs → esm}/types/data-structures/trie/index.js.map +0 -0
  475. /package/dist/{mjs → esm}/types/data-structures/trie/trie.d.ts +0 -0
  476. /package/dist/{mjs → esm}/types/data-structures/trie/trie.js +0 -0
  477. /package/dist/{mjs → esm}/types/data-structures/trie/trie.js.map +0 -0
  478. /package/dist/{mjs → esm}/types/index.d.ts +0 -0
  479. /package/dist/{mjs → esm}/types/index.js +0 -0
  480. /package/dist/{mjs → esm}/types/index.js.map +0 -0
  481. /package/dist/{mjs → esm}/types/utils/index.d.ts +0 -0
  482. /package/dist/{mjs → esm}/types/utils/index.js +0 -0
  483. /package/dist/{mjs → esm}/types/utils/index.js.map +0 -0
  484. /package/dist/{mjs → esm}/types/utils/utils.d.ts +0 -0
  485. /package/dist/{mjs → esm}/types/utils/utils.js +0 -0
  486. /package/dist/{mjs → esm}/types/utils/utils.js.map +0 -0
  487. /package/dist/{mjs → esm}/types/utils/validate-type.d.ts +0 -0
  488. /package/dist/{mjs → esm}/types/utils/validate-type.js +0 -0
  489. /package/dist/{mjs → esm}/types/utils/validate-type.js.map +0 -0
  490. /package/dist/{mjs → esm}/utils/index.d.ts +0 -0
  491. /package/dist/{mjs → esm}/utils/index.js +0 -0
  492. /package/dist/{mjs → esm}/utils/index.js.map +0 -0
  493. /package/dist/{mjs → esm}/utils/number.d.ts +0 -0
  494. /package/dist/{mjs → esm}/utils/number.js +0 -0
  495. /package/dist/{mjs → esm}/utils/number.js.map +0 -0
  496. /package/dist/{mjs → esm}/utils/utils.d.ts +0 -0
  497. /package/dist/{mjs → esm}/utils/utils.js +0 -0
  498. /package/dist/{mjs → esm}/utils/utils.js.map +0 -0
@@ -5,10 +5,10 @@
5
5
  * @copyright Copyright (c) 2022 Pablo Zeng <zrwusa@gmail.com>
6
6
  * @license MIT License
7
7
  */
8
- import type { BinaryTreeDeleteResult, BSTNOptKeyOrNode, BTNRep, EntryCallback, IterationType, RBTNColor, TreeMultiMapNested, TreeMultiMapNodeNested, TreeMultiMapOptions } from '../../types';
8
+ import type { BinaryTreeDeleteResult, BSTNOptKeyOrNode, BTNRep, EntryCallback, IterationType, OptNodeOrNull, RBTNColor, TreeCounterOptions } from '../../types';
9
9
  import { IBinaryTree } from '../../interfaces';
10
10
  import { RedBlackTree, RedBlackTreeNode } from './red-black-tree';
11
- export declare class TreeMultiMapNode<K = any, V = any, NODE extends TreeMultiMapNode<K, V, NODE> = TreeMultiMapNodeNested<K, V>> extends RedBlackTreeNode<K, V, NODE> {
11
+ export declare class TreeCounterNode<K = any, V = any> extends RedBlackTreeNode<K, V> {
12
12
  /**
13
13
  * The constructor function initializes a Red-Black Tree node with a key, value, count, and color.
14
14
  * @param {K} key - The key parameter represents the key of the node in the Red-Black Tree. It is
@@ -22,18 +22,28 @@ export declare class TreeMultiMapNode<K = any, V = any, NODE extends TreeMultiMa
22
22
  * in a Red-Black Tree. It is optional and has a default value of `'BLACK'`.
23
23
  */
24
24
  constructor(key: K, value?: V, count?: number, color?: RBTNColor);
25
+ parent?: TreeCounterNode<K, V>;
26
+ _left?: OptNodeOrNull<TreeCounterNode<K, V>>;
27
+ get left(): OptNodeOrNull<TreeCounterNode<K, V>>;
28
+ set left(v: OptNodeOrNull<TreeCounterNode<K, V>>);
29
+ _right?: OptNodeOrNull<TreeCounterNode<K, V>>;
30
+ get right(): OptNodeOrNull<TreeCounterNode<K, V>>;
31
+ set right(v: OptNodeOrNull<TreeCounterNode<K, V>>);
25
32
  }
26
- export declare class TreeMultiMap<K = any, V = any, R = object, MK = any, MV = any, MR = object, NODE extends TreeMultiMapNode<K, V, NODE> = TreeMultiMapNode<K, V, TreeMultiMapNodeNested<K, V>>, TREE extends TreeMultiMap<K, V, R, MK, MV, MR, NODE, TREE> = TreeMultiMap<K, V, R, MK, MV, MR, NODE, TreeMultiMapNested<K, V, R, MK, MV, MR, NODE>>> extends RedBlackTree<K, V, R, MK, MV, MR, NODE, TREE> implements IBinaryTree<K, V, R, MK, MV, MR, NODE, TREE> {
33
+ /**
34
+ *
35
+ */
36
+ export declare class TreeCounter<K = any, V = any, R = object, MK = any, MV = any, MR = object> extends RedBlackTree<K, V, R, MK, MV, MR> implements IBinaryTree<K, V, R, MK, MV, MR> {
27
37
  /**
28
- * The constructor function initializes a TreeMultiMap object with optional initial data.
38
+ * The constructor function initializes a TreeCounter object with optional initial data.
29
39
  * @param keysNodesEntriesOrRaws - The parameter `keysNodesEntriesOrRaws` is an
30
40
  * iterable that can contain keys, nodes, entries, or raw elements. It is used to initialize the
31
- * TreeMultiMap with initial data.
41
+ * TreeCounter with initial data.
32
42
  * @param [options] - The `options` parameter is an optional object that can be used to customize the
33
- * behavior of the `TreeMultiMap` constructor. It can include properties such as `compareKeys` and
43
+ * behavior of the `TreeCounter` constructor. It can include properties such as `compareKeys` and
34
44
  * `compareValues`, which are functions used to compare keys and values respectively.
35
45
  */
36
- constructor(keysNodesEntriesOrRaws?: Iterable<BTNRep<K, V, NODE>>, options?: TreeMultiMapOptions<K, V, R>);
46
+ constructor(keysNodesEntriesOrRaws?: Iterable<BTNRep<K, V, TreeCounterNode<K, V>> | R>, options?: TreeCounterOptions<K, V, R>);
37
47
  protected _count: number;
38
48
  /**
39
49
  * The function calculates the sum of the count property of all nodes in a tree structure.
@@ -50,7 +60,7 @@ export declare class TreeMultiMap<K = any, V = any, R = object, MK = any, MV = a
50
60
  */
51
61
  getComputedCount(): number;
52
62
  /**
53
- * The function creates a new TreeMultiMapNode with the specified key, value, color, and count.
63
+ * The function creates a new TreeCounterNode with the specified key, value, color, and count.
54
64
  * @param {K} key - The key parameter represents the key of the node being created. It is of type K,
55
65
  * which is a generic type representing the type of keys in the tree.
56
66
  * @param {V} [value] - The `value` parameter is an optional parameter that represents the value
@@ -60,47 +70,34 @@ export declare class TreeMultiMap<K = any, V = any, R = object, MK = any, MV = a
60
70
  * @param {number} [count] - The `count` parameter represents the number of occurrences of a key in
61
71
  * the tree. It is an optional parameter and is used to keep track of the number of values associated
62
72
  * with a key in the tree.
63
- * @returns A new instance of the TreeMultiMapNode class, casted as NODE.
73
+ * @returns A new instance of the TreeCounterNode class, casted as TreeCounterNode<K, V>.
64
74
  */
65
- createNode(key: K, value?: V, color?: RBTNColor, count?: number): NODE;
75
+ createNode(key: K, value?: V, color?: RBTNColor, count?: number): TreeCounterNode<K, V>;
66
76
  /**
67
- * The function creates a new instance of a TreeMultiMap with the specified options and returns it.
77
+ * The function creates a new instance of a TreeCounter with the specified options and returns it.
68
78
  * @param [options] - The `options` parameter is an optional object that contains additional
69
- * configuration options for creating the `TreeMultiMap`. It is of type `TreeMultiMapOptions<K, V,
79
+ * configuration options for creating the `TreeCounter`. It is of type `TreeCounterOptions<K, V,
70
80
  * R>`.
71
- * @returns a new instance of the `TreeMultiMap` class, with the provided options merged with the
81
+ * @returns a new instance of the `TreeCounter` class, with the provided options merged with the
72
82
  * existing `iterationType` property. The returned value is casted as `TREE`.
73
83
  */
74
- createTree(options?: TreeMultiMapOptions<K, V, R>): TREE;
75
- /**
76
- * The function `keyValueNodeEntryRawToNodeAndValue` takes in a key, value, and count and returns a
77
- * node based on the input.
78
- * @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The parameter
79
- * `keyNodeEntryOrRaw` can be of type `R` or `BTNRep<K, V, NODE>`.
80
- * @param {V} [value] - The `value` parameter is an optional value that represents the value
81
- * associated with the key in the node. It is used when creating a new node or updating the value of
82
- * an existing node.
83
- * @param [count=1] - The `count` parameter is an optional parameter that specifies the number of
84
- * times the key-value pair should be added to the data structure. If not provided, it defaults to 1.
85
- * @returns either a NODE object or undefined.
86
- */
87
- protected _keyValueNodeEntryRawToNodeAndValue(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R, value?: V, count?: number): [NODE | undefined, V | undefined];
84
+ createTree(options?: TreeCounterOptions<K, V, R>): TreeCounter<K, V, R, MK, MV, MR>;
88
85
  /**
89
- * The function checks if the input is an instance of the TreeMultiMapNode class.
90
- * @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The parameter
91
- * `keyNodeEntryOrRaw` can be of type `R` or `BTNRep<K, V, NODE>`.
92
- * @returns a boolean value indicating whether the input parameter `keyNodeEntryOrRaw` is
93
- * an instance of the `TreeMultiMapNode` class.
86
+ * The function checks if the input is an instance of the TreeCounterNode class.
87
+ * @param {BTNRep<K, V, TreeCounterNode<K, V>>} keyNodeOrEntry - The parameter
88
+ * `keyNodeOrEntry` can be of type `R` or `BTNRep<K, V, TreeCounterNode<K, V>>`.
89
+ * @returns a boolean value indicating whether the input parameter `keyNodeOrEntry` is
90
+ * an instance of the `TreeCounterNode` class.
94
91
  */
95
- isNode(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R): keyNodeEntryOrRaw is NODE;
92
+ isNode(keyNodeOrEntry: BTNRep<K, V, TreeCounterNode<K, V>>): keyNodeOrEntry is TreeCounterNode<K, V>;
96
93
  /**
97
94
  * Time Complexity: O(log n)
98
95
  * Space Complexity: O(1)
99
96
  *
100
97
  * The function overrides the add method of a class and adds a new node to a data structure, updating
101
98
  * the count and returning a boolean indicating success.
102
- * @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The
103
- * `keyNodeEntryOrRaw` parameter can accept one of the following types:
99
+ * @param {BTNRep<K, V, TreeCounterNode<K, V>>} keyNodeOrEntry - The
100
+ * `keyNodeOrEntry` parameter can accept one of the following types:
104
101
  * @param {V} [value] - The `value` parameter represents the value associated with the key in the
105
102
  * data structure. It is an optional parameter, so it can be omitted if not needed.
106
103
  * @param [count=1] - The `count` parameter represents the number of times the key-value pair should
@@ -109,23 +106,23 @@ export declare class TreeMultiMap<K = any, V = any, R = object, MK = any, MV = a
109
106
  * @returns The method is returning a boolean value. It returns true if the addition of the new node
110
107
  * was successful, and false otherwise.
111
108
  */
112
- add(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R, value?: V, count?: number): boolean;
109
+ add(keyNodeOrEntry: BTNRep<K, V, TreeCounterNode<K, V>>, value?: V, count?: number): boolean;
113
110
  /**
114
111
  * Time Complexity: O(log n)
115
112
  * Space Complexity: O(1)
116
113
  *
117
114
  * The function `delete` in TypeScript overrides the deletion operation in a binary tree data
118
115
  * structure, handling cases where nodes have children and maintaining balance in the tree.
119
- * @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The `predicate`
116
+ * @param {BTNRep<K, V, TreeCounterNode<K, V>>} keyNodeOrEntry - The `predicate`
120
117
  * parameter in the `delete` method is used to specify the condition or key based on which a node
121
118
  * should be deleted from the binary tree. It can be a key, a node, or an entry.
122
119
  * @param [ignoreCount=false] - The `ignoreCount` parameter in the `override delete` method is a
123
120
  * boolean flag that determines whether to ignore the count of nodes when performing deletion. If
124
121
  * `ignoreCount` is set to `true`, the method will delete the node regardless of its count. If
125
122
  * `ignoreCount` is `false
126
- * @returns The `override delete` method returns an array of `BinaryTreeDeleteResult<NODE>` objects.
123
+ * @returns The `override delete` method returns an array of `BinaryTreeDeleteResult<TreeCounterNode<K, V>>` objects.
127
124
  */
128
- delete(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R, ignoreCount?: boolean): BinaryTreeDeleteResult<NODE>[];
125
+ delete(keyNodeOrEntry: BTNRep<K, V, TreeCounterNode<K, V>>, ignoreCount?: boolean): BinaryTreeDeleteResult<TreeCounterNode<K, V>>[];
129
126
  /**
130
127
  * Time Complexity: O(1)
131
128
  * Space Complexity: O(1)
@@ -155,48 +152,61 @@ export declare class TreeMultiMap<K = any, V = any, R = object, MK = any, MV = a
155
152
  * The function overrides the clone method to create a deep copy of a tree object.
156
153
  * @returns The `clone()` method is returning a cloned instance of the `TREE` object.
157
154
  */
158
- clone(): TREE;
155
+ clone(): TreeCounter<K, V, R, MK, MV, MR>;
156
+ /**
157
+ * The `map` function in TypeScript overrides the default behavior to create a new TreeCounter with
158
+ * modified entries based on a provided callback.
159
+ * @param callback - The `callback` parameter is a function that will be called for each entry in the
160
+ * map. It takes four arguments:
161
+ * @param [options] - The `options` parameter in the `override map` function is of type
162
+ * `TreeCounterOptions<MK, MV, MR>`. This parameter allows you to provide additional configuration
163
+ * options when creating a new `TreeCounter` instance within the `map` function. These options could
164
+ * include things like
165
+ * @param {any} [thisArg] - The `thisArg` parameter in the `override map` function is used to specify
166
+ * the value of `this` when executing the `callback` function. It allows you to set the context
167
+ * (value of `this`) for the callback function when it is called within the `map` function. This
168
+ * @returns A new TreeCounter instance is being returned, which is populated with entries generated
169
+ * by the provided callback function.
170
+ */
171
+ map(callback: EntryCallback<K, V | undefined, [MK, MV]>, options?: TreeCounterOptions<MK, MV, MR>, thisArg?: any): TreeCounter<MK, MV, MR>;
172
+ /**
173
+ * The function `keyValueNodeEntryRawToNodeAndValue` takes in a key, value, and count and returns a
174
+ * node based on the input.
175
+ * @param {BTNRep<K, V, TreeCounterNode<K, V>>} keyNodeOrEntry - The parameter
176
+ * `keyNodeOrEntry` can be of type `R` or `BTNRep<K, V, TreeCounterNode<K, V>>`.
177
+ * @param {V} [value] - The `value` parameter is an optional value that represents the value
178
+ * associated with the key in the node. It is used when creating a new node or updating the value of
179
+ * an existing node.
180
+ * @param [count=1] - The `count` parameter is an optional parameter that specifies the number of
181
+ * times the key-value pair should be added to the data structure. If not provided, it defaults to 1.
182
+ * @returns either a TreeCounterNode<K, V> object or undefined.
183
+ */
184
+ protected _keyValueNodeOrEntryToNodeAndValue(keyNodeOrEntry: BTNRep<K, V, TreeCounterNode<K, V>>, value?: V, count?: number): [TreeCounterNode<K, V> | undefined, V | undefined];
159
185
  /**
160
186
  * Time Complexity: O(1)
161
187
  * Space Complexity: O(1)
162
188
  *
163
189
  * The `_swapProperties` function swaps the properties (key, value, count, color) between two nodes
164
190
  * in a binary search tree.
165
- * @param {R | BSTNOptKeyOrNode<K, NODE>} srcNode - The `srcNode` parameter represents the source node
191
+ * @param {R | BSTNOptKeyOrNode<K, TreeCounterNode<K, V>>} srcNode - The `srcNode` parameter represents the source node
166
192
  * that will be swapped with the `destNode`. It can be either an instance of the `R` class or an
167
- * instance of the `BSTNOptKeyOrNode<K, NODE>` class.
168
- * @param {R | BSTNOptKeyOrNode<K, NODE>} destNode - The `destNode` parameter represents the destination
193
+ * instance of the `BSTNOptKeyOrNode<K, TreeCounterNode<K, V>>` class.
194
+ * @param {R | BSTNOptKeyOrNode<K, TreeCounterNode<K, V>>} destNode - The `destNode` parameter represents the destination
169
195
  * node where the properties will be swapped with the source node.
170
196
  * @returns The method is returning the `destNode` after swapping its properties with the `srcNode`.
171
197
  * If either `srcNode` or `destNode` is undefined, it returns undefined.
172
198
  */
173
- protected _swapProperties(srcNode: R | BSTNOptKeyOrNode<K, NODE>, destNode: R | BSTNOptKeyOrNode<K, NODE>): NODE | undefined;
199
+ protected _swapProperties(srcNode: BSTNOptKeyOrNode<K, TreeCounterNode<K, V>>, destNode: BSTNOptKeyOrNode<K, TreeCounterNode<K, V>>): TreeCounterNode<K, V> | undefined;
174
200
  /**
175
201
  * Time Complexity: O(1)
176
202
  * Space Complexity: O(1)
177
203
  *
178
204
  * The function replaces an old node with a new node and updates the count property of the new node.
179
- * @param {NODE} oldNode - The `oldNode` parameter is the node that you want to replace in the data
205
+ * @param {TreeCounterNode<K, V>} oldNode - The `oldNode` parameter is the node that you want to replace in the data
180
206
  * structure.
181
- * @param {NODE} newNode - The `newNode` parameter is an instance of the `NODE` class.
207
+ * @param {TreeCounterNode<K, V>} newNode - The `newNode` parameter is an instance of the `TreeCounterNode<K, V>` class.
182
208
  * @returns The method is returning the result of calling the `_replaceNode` method from the
183
- * superclass, which is of type `NODE`.
184
- */
185
- protected _replaceNode(oldNode: NODE, newNode: NODE): NODE;
186
- /**
187
- * The `map` function in TypeScript overrides the default behavior to create a new TreeMultiMap with
188
- * modified entries based on a provided callback.
189
- * @param callback - The `callback` parameter is a function that will be called for each entry in the
190
- * map. It takes four arguments:
191
- * @param [options] - The `options` parameter in the `override map` function is of type
192
- * `TreeMultiMapOptions<MK, MV, MR>`. This parameter allows you to provide additional configuration
193
- * options when creating a new `TreeMultiMap` instance within the `map` function. These options could
194
- * include things like
195
- * @param {any} [thisArg] - The `thisArg` parameter in the `override map` function is used to specify
196
- * the value of `this` when executing the `callback` function. It allows you to set the context
197
- * (value of `this`) for the callback function when it is called within the `map` function. This
198
- * @returns A new TreeMultiMap instance is being returned, which is populated with entries generated
199
- * by the provided callback function.
209
+ * superclass, which is of type `TreeCounterNode<K, V>`.
200
210
  */
201
- map(callback: EntryCallback<K, V | undefined, [MK, MV]>, options?: TreeMultiMapOptions<MK, MV, MR>, thisArg?: any): TreeMultiMap<MK, MV, MR>;
211
+ protected _replaceNode(oldNode: TreeCounterNode<K, V>, newNode: TreeCounterNode<K, V>): TreeCounterNode<K, V>;
202
212
  }