data-structure-typed 1.36.1 → 1.36.3

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 (207) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/README.md +1 -1
  3. package/dist/data-structures/binary-tree/avl-tree.d.ts +3 -3
  4. package/dist/data-structures/binary-tree/avl-tree.js.map +1 -1
  5. package/dist/data-structures/binary-tree/binary-tree.d.ts +8 -8
  6. package/dist/data-structures/binary-tree/binary-tree.js +11 -13
  7. package/dist/data-structures/binary-tree/binary-tree.js.map +1 -1
  8. package/dist/data-structures/binary-tree/bst.d.ts +3 -3
  9. package/dist/data-structures/binary-tree/bst.js.map +1 -1
  10. package/dist/data-structures/binary-tree/index.d.ts +0 -5
  11. package/dist/data-structures/binary-tree/index.js +0 -5
  12. package/dist/data-structures/binary-tree/index.js.map +1 -1
  13. package/dist/data-structures/binary-tree/rb-tree.d.ts +3 -3
  14. package/dist/data-structures/binary-tree/rb-tree.js.map +1 -1
  15. package/dist/data-structures/binary-tree/tree-multiset.d.ts +3 -3
  16. package/dist/data-structures/binary-tree/tree-multiset.js.map +1 -1
  17. package/dist/data-structures/graph/abstract-graph.d.ts +2 -2
  18. package/dist/data-structures/graph/directed-graph.d.ts +2 -2
  19. package/dist/data-structures/graph/map-graph.d.ts +1 -1
  20. package/dist/data-structures/graph/map-graph.js +1 -1
  21. package/dist/data-structures/graph/undirected-graph.d.ts +2 -2
  22. package/dist/data-structures/hash/index.d.ts +0 -1
  23. package/dist/data-structures/hash/index.js +0 -1
  24. package/dist/data-structures/hash/index.js.map +1 -1
  25. package/dist/data-structures/heap/heap.d.ts +4 -4
  26. package/dist/data-structures/heap/heap.js.map +1 -1
  27. package/dist/data-structures/heap/max-heap.d.ts +2 -2
  28. package/dist/data-structures/heap/max-heap.js.map +1 -1
  29. package/dist/data-structures/heap/min-heap.d.ts +2 -2
  30. package/dist/data-structures/heap/min-heap.js.map +1 -1
  31. package/dist/data-structures/priority-queue/max-priority-queue.d.ts +2 -2
  32. package/dist/data-structures/priority-queue/max-priority-queue.js.map +1 -1
  33. package/dist/data-structures/priority-queue/min-priority-queue.d.ts +2 -2
  34. package/dist/data-structures/priority-queue/min-priority-queue.js.map +1 -1
  35. package/dist/data-structures/priority-queue/priority-queue.d.ts +2 -2
  36. package/dist/data-structures/priority-queue/priority-queue.js.map +1 -1
  37. package/dist/interfaces/binary-tree.d.ts +5 -4
  38. package/dist/interfaces/{abstract-graph.d.ts → graph.d.ts} +1 -1
  39. package/dist/interfaces/{bst.js → graph.js} +1 -1
  40. package/dist/interfaces/graph.js.map +1 -0
  41. package/dist/interfaces/index.d.ts +1 -8
  42. package/dist/interfaces/index.js +1 -8
  43. package/dist/interfaces/index.js.map +1 -1
  44. package/dist/types/data-structures/abstract-graph.d.ts +0 -1
  45. package/dist/types/data-structures/binary-tree.d.ts +30 -2
  46. package/dist/types/data-structures/binary-tree.js +22 -0
  47. package/dist/types/data-structures/binary-tree.js.map +1 -1
  48. package/dist/types/data-structures/bst.d.ts +1 -2
  49. package/dist/types/data-structures/heap.d.ts +2 -1
  50. package/dist/types/data-structures/index.d.ts +0 -2
  51. package/dist/types/data-structures/index.js +0 -2
  52. package/dist/types/data-structures/index.js.map +1 -1
  53. package/lib/data-structures/binary-tree/avl-tree.d.ts +3 -3
  54. package/lib/data-structures/binary-tree/binary-tree.d.ts +8 -8
  55. package/lib/data-structures/binary-tree/binary-tree.js +11 -13
  56. package/lib/data-structures/binary-tree/bst.d.ts +3 -3
  57. package/lib/data-structures/binary-tree/index.d.ts +0 -5
  58. package/lib/data-structures/binary-tree/index.js +0 -5
  59. package/lib/data-structures/binary-tree/rb-tree.d.ts +3 -3
  60. package/lib/data-structures/binary-tree/tree-multiset.d.ts +3 -3
  61. package/lib/data-structures/graph/abstract-graph.d.ts +2 -2
  62. package/lib/data-structures/graph/directed-graph.d.ts +2 -2
  63. package/lib/data-structures/graph/map-graph.d.ts +1 -1
  64. package/lib/data-structures/graph/map-graph.js +1 -1
  65. package/lib/data-structures/graph/undirected-graph.d.ts +2 -2
  66. package/lib/data-structures/hash/index.d.ts +0 -1
  67. package/lib/data-structures/hash/index.js +0 -1
  68. package/lib/data-structures/heap/heap.d.ts +4 -4
  69. package/lib/data-structures/heap/max-heap.d.ts +2 -2
  70. package/lib/data-structures/heap/min-heap.d.ts +2 -2
  71. package/lib/data-structures/priority-queue/max-priority-queue.d.ts +2 -2
  72. package/lib/data-structures/priority-queue/min-priority-queue.d.ts +2 -2
  73. package/lib/data-structures/priority-queue/priority-queue.d.ts +2 -2
  74. package/lib/interfaces/binary-tree.d.ts +5 -4
  75. package/lib/interfaces/{abstract-graph.d.ts → graph.d.ts} +1 -1
  76. package/lib/interfaces/index.d.ts +1 -8
  77. package/lib/interfaces/index.js +1 -8
  78. package/lib/types/data-structures/abstract-graph.d.ts +0 -1
  79. package/lib/types/data-structures/binary-tree.d.ts +30 -2
  80. package/lib/types/data-structures/binary-tree.js +21 -1
  81. package/lib/types/data-structures/bst.d.ts +1 -2
  82. package/lib/types/data-structures/heap.d.ts +2 -1
  83. package/lib/types/data-structures/index.d.ts +0 -2
  84. package/lib/types/data-structures/index.js +0 -2
  85. package/package.json +5 -5
  86. package/src/data-structures/binary-tree/avl-tree.ts +6 -6
  87. package/src/data-structures/binary-tree/binary-tree.ts +29 -39
  88. package/src/data-structures/binary-tree/bst.ts +3 -6
  89. package/src/data-structures/binary-tree/index.ts +0 -5
  90. package/src/data-structures/binary-tree/rb-tree.ts +6 -6
  91. package/src/data-structures/binary-tree/tree-multiset.ts +6 -6
  92. package/src/data-structures/graph/abstract-graph.ts +2 -2
  93. package/src/data-structures/graph/directed-graph.ts +2 -2
  94. package/src/data-structures/graph/map-graph.ts +1 -1
  95. package/src/data-structures/graph/undirected-graph.ts +2 -2
  96. package/src/data-structures/hash/index.ts +0 -1
  97. package/src/data-structures/heap/heap.ts +5 -5
  98. package/src/data-structures/heap/max-heap.ts +2 -2
  99. package/src/data-structures/heap/min-heap.ts +2 -2
  100. package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
  101. package/src/data-structures/priority-queue/min-priority-queue.ts +2 -2
  102. package/src/data-structures/priority-queue/priority-queue.ts +2 -2
  103. package/src/interfaces/binary-tree.ts +7 -4
  104. package/src/interfaces/{abstract-graph.ts → graph.ts} +1 -1
  105. package/src/interfaces/index.ts +1 -8
  106. package/src/types/data-structures/abstract-graph.ts +1 -1
  107. package/src/types/data-structures/binary-tree.ts +42 -2
  108. package/src/types/data-structures/bst.ts +2 -2
  109. package/src/types/data-structures/heap.ts +3 -1
  110. package/src/types/data-structures/index.ts +0 -2
  111. package/src/types/data-structures/navigator.ts +1 -0
  112. package/test/unit/data-structures/heap/max-heap.test.ts +2 -2
  113. package/test/unit/data-structures/heap/min-heap.test.ts +2 -2
  114. package/umd/bundle.min.js +1 -1
  115. package/umd/bundle.min.js.map +1 -1
  116. package/dist/data-structures/binary-tree/aa-tree.d.ts +0 -2
  117. package/dist/data-structures/binary-tree/aa-tree.js +0 -7
  118. package/dist/data-structures/binary-tree/aa-tree.js.map +0 -1
  119. package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +0 -21
  120. package/dist/data-structures/binary-tree/abstract-binary-tree.js +0 -25
  121. package/dist/data-structures/binary-tree/abstract-binary-tree.js.map +0 -1
  122. package/dist/data-structures/binary-tree/b-tree.d.ts +0 -2
  123. package/dist/data-structures/binary-tree/b-tree.js +0 -7
  124. package/dist/data-structures/binary-tree/b-tree.js.map +0 -1
  125. package/dist/data-structures/binary-tree/splay-tree.d.ts +0 -2
  126. package/dist/data-structures/binary-tree/splay-tree.js +0 -7
  127. package/dist/data-structures/binary-tree/splay-tree.js.map +0 -1
  128. package/dist/data-structures/binary-tree/two-three-tree.d.ts +0 -2
  129. package/dist/data-structures/binary-tree/two-three-tree.js +0 -7
  130. package/dist/data-structures/binary-tree/two-three-tree.js.map +0 -1
  131. package/dist/data-structures/hash/pair.d.ts +0 -2
  132. package/dist/data-structures/hash/pair.js +0 -7
  133. package/dist/data-structures/hash/pair.js.map +0 -1
  134. package/dist/interfaces/abstract-binary-tree.d.ts +0 -7
  135. package/dist/interfaces/abstract-binary-tree.js +0 -3
  136. package/dist/interfaces/abstract-binary-tree.js.map +0 -1
  137. package/dist/interfaces/abstract-graph.js +0 -3
  138. package/dist/interfaces/abstract-graph.js.map +0 -1
  139. package/dist/interfaces/avl-tree.d.ts +0 -7
  140. package/dist/interfaces/avl-tree.js +0 -3
  141. package/dist/interfaces/avl-tree.js.map +0 -1
  142. package/dist/interfaces/bst.d.ts +0 -6
  143. package/dist/interfaces/bst.js.map +0 -1
  144. package/dist/interfaces/directed-graph.d.ts +0 -3
  145. package/dist/interfaces/directed-graph.js +0 -3
  146. package/dist/interfaces/directed-graph.js.map +0 -1
  147. package/dist/interfaces/rb-tree.d.ts +0 -6
  148. package/dist/interfaces/rb-tree.js +0 -3
  149. package/dist/interfaces/rb-tree.js.map +0 -1
  150. package/dist/interfaces/tree-multiset.d.ts +0 -6
  151. package/dist/interfaces/tree-multiset.js +0 -3
  152. package/dist/interfaces/tree-multiset.js.map +0 -1
  153. package/dist/interfaces/undirected-graph.d.ts +0 -3
  154. package/dist/interfaces/undirected-graph.js +0 -3
  155. package/dist/interfaces/undirected-graph.js.map +0 -1
  156. package/dist/types/data-structures/abstract-binary-tree.d.ts +0 -32
  157. package/dist/types/data-structures/abstract-binary-tree.js +0 -25
  158. package/dist/types/data-structures/abstract-binary-tree.js.map +0 -1
  159. package/dist/types/data-structures/priority-queue.d.ts +0 -7
  160. package/dist/types/data-structures/priority-queue.js +0 -3
  161. package/dist/types/data-structures/priority-queue.js.map +0 -1
  162. package/lib/data-structures/binary-tree/aa-tree.d.ts +0 -2
  163. package/lib/data-structures/binary-tree/aa-tree.js +0 -2
  164. package/lib/data-structures/binary-tree/abstract-binary-tree.d.ts +0 -21
  165. package/lib/data-structures/binary-tree/abstract-binary-tree.js +0 -19
  166. package/lib/data-structures/binary-tree/b-tree.d.ts +0 -2
  167. package/lib/data-structures/binary-tree/b-tree.js +0 -2
  168. package/lib/data-structures/binary-tree/splay-tree.d.ts +0 -2
  169. package/lib/data-structures/binary-tree/splay-tree.js +0 -2
  170. package/lib/data-structures/binary-tree/two-three-tree.d.ts +0 -2
  171. package/lib/data-structures/binary-tree/two-three-tree.js +0 -2
  172. package/lib/data-structures/hash/pair.d.ts +0 -2
  173. package/lib/data-structures/hash/pair.js +0 -2
  174. package/lib/interfaces/abstract-binary-tree.d.ts +0 -7
  175. package/lib/interfaces/abstract-graph.js +0 -1
  176. package/lib/interfaces/avl-tree.d.ts +0 -7
  177. package/lib/interfaces/avl-tree.js +0 -1
  178. package/lib/interfaces/bst.d.ts +0 -6
  179. package/lib/interfaces/bst.js +0 -1
  180. package/lib/interfaces/directed-graph.d.ts +0 -3
  181. package/lib/interfaces/directed-graph.js +0 -1
  182. package/lib/interfaces/rb-tree.d.ts +0 -6
  183. package/lib/interfaces/rb-tree.js +0 -1
  184. package/lib/interfaces/tree-multiset.d.ts +0 -6
  185. package/lib/interfaces/tree-multiset.js +0 -1
  186. package/lib/interfaces/undirected-graph.d.ts +0 -3
  187. package/lib/interfaces/undirected-graph.js +0 -1
  188. package/lib/types/data-structures/abstract-binary-tree.d.ts +0 -32
  189. package/lib/types/data-structures/abstract-binary-tree.js +0 -21
  190. package/lib/types/data-structures/priority-queue.d.ts +0 -7
  191. package/lib/types/data-structures/priority-queue.js +0 -1
  192. package/src/data-structures/binary-tree/aa-tree.ts +0 -1
  193. package/src/data-structures/binary-tree/abstract-binary-tree.ts +0 -33
  194. package/src/data-structures/binary-tree/b-tree.ts +0 -1
  195. package/src/data-structures/binary-tree/splay-tree.ts +0 -1
  196. package/src/data-structures/binary-tree/two-three-tree.ts +0 -1
  197. package/src/data-structures/hash/pair.ts +0 -1
  198. package/src/interfaces/abstract-binary-tree.ts +0 -8
  199. package/src/interfaces/avl-tree.ts +0 -8
  200. package/src/interfaces/bst.ts +0 -6
  201. package/src/interfaces/directed-graph.ts +0 -3
  202. package/src/interfaces/rb-tree.ts +0 -6
  203. package/src/interfaces/tree-multiset.ts +0 -7
  204. package/src/interfaces/undirected-graph.ts +0 -3
  205. package/src/types/data-structures/abstract-binary-tree.ts +0 -49
  206. package/src/types/data-structures/priority-queue.ts +0 -9
  207. /package/lib/interfaces/{abstract-binary-tree.js → graph.js} +0 -0
@@ -1,2 +0,0 @@
1
- export declare class AaTree {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AaTree = void 0;
4
- class AaTree {
5
- }
6
- exports.AaTree = AaTree;
7
- //# sourceMappingURL=aa-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aa-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/aa-tree.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;CAAG;AAAtB,wBAAsB"}
@@ -1,21 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Tyler Zeng
5
- * @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
6
- * @license MIT License
7
- */
8
- import type { AbstractBinaryTreeNodeNested, BinaryTreeNodeKey } from '../../types';
9
- import { IAbstractBinaryTree, IAbstractBinaryTreeNode } from '../../interfaces';
10
- export declare abstract class AbstractBinaryTreeNode<V = any, FAMILY extends AbstractBinaryTreeNode<V, FAMILY> = AbstractBinaryTreeNodeNested<V>> implements IAbstractBinaryTreeNode<V, FAMILY> {
11
- /**
12
- * The constructor function initializes a BinaryTreeNode object with a key and an optional value.
13
- * @param {V} [val] - The "val" parameter is an optional parameter of type V. It represents the value that will be
14
- * stored in the binary tree node. If no value is provided, it will be set to undefined.
15
- */
16
- protected constructor(val?: V);
17
- val: V | undefined;
18
- }
19
- export declare abstract class AbstractBinaryTree<N extends AbstractBinaryTreeNode<N['val'], N> = AbstractBinaryTreeNode> implements IAbstractBinaryTree<N> {
20
- abstract createNode(key: BinaryTreeNodeKey, val?: N['val']): N | null;
21
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- /**
3
- * data-structure-typed
4
- *
5
- * @author Tyler Zeng
6
- * @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
7
- * @license MIT License
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AbstractBinaryTree = exports.AbstractBinaryTreeNode = void 0;
11
- class AbstractBinaryTreeNode {
12
- /**
13
- * The constructor function initializes a BinaryTreeNode object with a key and an optional value.
14
- * @param {V} [val] - The "val" parameter is an optional parameter of type V. It represents the value that will be
15
- * stored in the binary tree node. If no value is provided, it will be set to undefined.
16
- */
17
- constructor(val) {
18
- this.val = val;
19
- }
20
- }
21
- exports.AbstractBinaryTreeNode = AbstractBinaryTreeNode;
22
- class AbstractBinaryTree {
23
- }
24
- exports.AbstractBinaryTree = AbstractBinaryTree;
25
- //# sourceMappingURL=abstract-binary-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-binary-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/abstract-binary-tree.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAKH,MAAsB,sBAAsB;IAK1C;;;;OAIG;IACH,YAAsB,GAAO;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;CAGF;AAfD,wDAeC;AAED,MAAsB,kBAAkB;CAIvC;AAJD,gDAIC"}
@@ -1,2 +0,0 @@
1
- export declare class BTree {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BTree = void 0;
4
- class BTree {
5
- }
6
- exports.BTree = BTree;
7
- //# sourceMappingURL=b-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"b-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/b-tree.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;CAAG;AAArB,sBAAqB"}
@@ -1,2 +0,0 @@
1
- export declare class SplayTree {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SplayTree = void 0;
4
- class SplayTree {
5
- }
6
- exports.SplayTree = SplayTree;
7
- //# sourceMappingURL=splay-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splay-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/splay-tree.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;CAAG;AAAzB,8BAAyB"}
@@ -1,2 +0,0 @@
1
- export declare class TwoThreeTree {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TwoThreeTree = void 0;
4
- class TwoThreeTree {
5
- }
6
- exports.TwoThreeTree = TwoThreeTree;
7
- //# sourceMappingURL=two-three-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"two-three-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/two-three-tree.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAY;CAAG;AAA5B,oCAA4B"}
@@ -1,2 +0,0 @@
1
- export declare class Pair {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Pair = void 0;
4
- class Pair {
5
- }
6
- exports.Pair = Pair;
7
- //# sourceMappingURL=pair.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pair.js","sourceRoot":"","sources":["../../../src/data-structures/hash/pair.ts"],"names":[],"mappings":";;;AAAA,MAAa,IAAI;CAAG;AAApB,oBAAoB"}
@@ -1,7 +0,0 @@
1
- import { BinaryTreeNodeKey } from '../types';
2
- import { AbstractBinaryTreeNode } from '../data-structures';
3
- export interface IAbstractBinaryTreeNode<T, NEIGHBOR extends IAbstractBinaryTreeNode<T, NEIGHBOR>> {
4
- }
5
- export interface IAbstractBinaryTree<N extends AbstractBinaryTreeNode<N['val'], N>> {
6
- createNode(key: BinaryTreeNodeKey, val?: N['val'], count?: number): N | null;
7
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=abstract-binary-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-binary-tree.js","sourceRoot":"","sources":["../../src/interfaces/abstract-binary-tree.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=abstract-graph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-graph.js","sourceRoot":"","sources":["../../src/interfaces/abstract-graph.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { AVLTreeNode } from '../data-structures';
2
- import { IBST, IBSTNode } from './bst';
3
- export interface IAVLTreeNode<T, NEIGHBOR extends IAVLTreeNode<T, NEIGHBOR>> extends IBSTNode<T, NEIGHBOR> {
4
- height: number;
5
- }
6
- export interface IAVLTree<N extends AVLTreeNode<N['val'], N>> extends IBST<N> {
7
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=avl-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avl-tree.js","sourceRoot":"","sources":["../../src/interfaces/avl-tree.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import { BSTNode } from '../data-structures';
2
- import { IBinaryTree, IBinaryTreeNode } from './binary-tree';
3
- export interface IBSTNode<T, NEIGHBOR extends IBSTNode<T, NEIGHBOR>> extends IBinaryTreeNode<T, NEIGHBOR> {
4
- }
5
- export interface IBST<N extends BSTNode<N['val'], N>> extends IBinaryTree<N> {
6
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"bst.js","sourceRoot":"","sources":["../../src/interfaces/bst.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import { IAbstractGraph } from './abstract-graph';
2
- export interface IDirectedGraph<V, E> extends IAbstractGraph<V, E> {
3
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=directed-graph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directed-graph.js","sourceRoot":"","sources":["../../src/interfaces/directed-graph.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import { RBTreeNode } from '../data-structures';
2
- import { IBST, IBSTNode } from './bst';
3
- export interface IRBTreeNode<T, NEIGHBOR extends IRBTreeNode<T, NEIGHBOR>> extends IBSTNode<T, NEIGHBOR> {
4
- }
5
- export interface IRBTree<N extends RBTreeNode<N['val'], N>> extends IBST<N> {
6
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=rb-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rb-tree.js","sourceRoot":"","sources":["../../src/interfaces/rb-tree.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import { TreeMultisetNode } from '../data-structures';
2
- import { IAVLTree, IAVLTreeNode } from './avl-tree';
3
- export interface ITreeMultisetNode<T, NEIGHBOR extends ITreeMultisetNode<T, NEIGHBOR>> extends IAVLTreeNode<T, NEIGHBOR> {
4
- }
5
- export interface ITreeMultiset<N extends TreeMultisetNode<N['val'], N>> extends IAVLTree<N> {
6
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=tree-multiset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tree-multiset.js","sourceRoot":"","sources":["../../src/interfaces/tree-multiset.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import { IAbstractGraph } from './abstract-graph';
2
- export interface IUNDirectedGraph<V, E> extends IAbstractGraph<V, E> {
3
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=undirected-graph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"undirected-graph.js","sourceRoot":"","sources":["../../src/interfaces/undirected-graph.ts"],"names":[],"mappings":""}
@@ -1,32 +0,0 @@
1
- import { AbstractBinaryTreeNode } from '../../data-structures';
2
- /**
3
- * Enum representing different loop types.
4
- *
5
- * - `iterative`: Indicates the iterative loop type (with loops that use iterations).
6
- * - `recursive`: Indicates the recursive loop type (with loops that call themselves).
7
- */
8
- export declare enum LoopType {
9
- ITERATIVE = "ITERATIVE",
10
- RECURSIVE = "RECURSIVE"
11
- }
12
- export declare enum FamilyPosition {
13
- ROOT = "ROOT",
14
- LEFT = "LEFT",
15
- RIGHT = "RIGHT",
16
- ROOT_LEFT = "ROOT_LEFT",
17
- ROOT_RIGHT = "ROOT_RIGHT",
18
- ISOLATED = "ISOLATED",
19
- MAL_NODE = "MAL_NODE"
20
- }
21
- export type BinaryTreeNodePropertyName = 'key' | 'val';
22
- export type NodeOrPropertyName = 'node' | BinaryTreeNodePropertyName;
23
- export type DFSOrderPattern = 'in' | 'pre' | 'post';
24
- export type BinaryTreeNodeKey = number;
25
- export type BinaryTreeDeletedResult<N> = {
26
- deleted: N | null | undefined;
27
- needBalanced: N | null;
28
- };
29
- export type AbstractBinaryTreeNodeProperty<N extends AbstractBinaryTreeNode<N['val'], N>> = N['val'] | N | number | BinaryTreeNodeKey;
30
- export type AbstractBinaryTreeNodeProperties<N extends AbstractBinaryTreeNode<N['val'], N>> = AbstractBinaryTreeNodeProperty<N>[];
31
- export type AbstractBinaryTreeNodeNested<T> = AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
32
- export type AbstractBinaryTreeOptions = {};
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FamilyPosition = exports.LoopType = void 0;
4
- /**
5
- * Enum representing different loop types.
6
- *
7
- * - `iterative`: Indicates the iterative loop type (with loops that use iterations).
8
- * - `recursive`: Indicates the recursive loop type (with loops that call themselves).
9
- */
10
- var LoopType;
11
- (function (LoopType) {
12
- LoopType["ITERATIVE"] = "ITERATIVE";
13
- LoopType["RECURSIVE"] = "RECURSIVE";
14
- })(LoopType || (exports.LoopType = LoopType = {}));
15
- var FamilyPosition;
16
- (function (FamilyPosition) {
17
- FamilyPosition["ROOT"] = "ROOT";
18
- FamilyPosition["LEFT"] = "LEFT";
19
- FamilyPosition["RIGHT"] = "RIGHT";
20
- FamilyPosition["ROOT_LEFT"] = "ROOT_LEFT";
21
- FamilyPosition["ROOT_RIGHT"] = "ROOT_RIGHT";
22
- FamilyPosition["ISOLATED"] = "ISOLATED";
23
- FamilyPosition["MAL_NODE"] = "MAL_NODE";
24
- })(FamilyPosition || (exports.FamilyPosition = FamilyPosition = {}));
25
- //# sourceMappingURL=abstract-binary-tree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-binary-tree.js","sourceRoot":"","sources":["../../../src/types/data-structures/abstract-binary-tree.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AAEH,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,mCAAuB,CAAA;IACvB,mCAAuB,CAAA;AACzB,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB;AAED,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,iCAAe,CAAA;IACf,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;AACvB,CAAC,EARW,cAAc,8BAAd,cAAc,QAQzB"}
@@ -1,7 +0,0 @@
1
- export type PriorityQueueComparator<T> = (a: T, b: T) => number;
2
- export type PriorityQueueOptions<T> = {
3
- nodes?: T[];
4
- isFix?: boolean;
5
- comparator: PriorityQueueComparator<T>;
6
- };
7
- export type PriorityQueueDFSOrderPattern = 'pre' | 'in' | 'post';
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=priority-queue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"priority-queue.js","sourceRoot":"","sources":["../../../src/types/data-structures/priority-queue.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export declare class AaTree {
2
- }
@@ -1,2 +0,0 @@
1
- export class AaTree {
2
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Tyler Zeng
5
- * @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
6
- * @license MIT License
7
- */
8
- import type { AbstractBinaryTreeNodeNested, BinaryTreeNodeKey } from '../../types';
9
- import { IAbstractBinaryTree, IAbstractBinaryTreeNode } from '../../interfaces';
10
- export declare abstract class AbstractBinaryTreeNode<V = any, FAMILY extends AbstractBinaryTreeNode<V, FAMILY> = AbstractBinaryTreeNodeNested<V>> implements IAbstractBinaryTreeNode<V, FAMILY> {
11
- /**
12
- * The constructor function initializes a BinaryTreeNode object with a key and an optional value.
13
- * @param {V} [val] - The "val" parameter is an optional parameter of type V. It represents the value that will be
14
- * stored in the binary tree node. If no value is provided, it will be set to undefined.
15
- */
16
- protected constructor(val?: V);
17
- val: V | undefined;
18
- }
19
- export declare abstract class AbstractBinaryTree<N extends AbstractBinaryTreeNode<N['val'], N> = AbstractBinaryTreeNode> implements IAbstractBinaryTree<N> {
20
- abstract createNode(key: BinaryTreeNodeKey, val?: N['val']): N | null;
21
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Tyler Zeng
5
- * @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
6
- * @license MIT License
7
- */
8
- export class AbstractBinaryTreeNode {
9
- /**
10
- * The constructor function initializes a BinaryTreeNode object with a key and an optional value.
11
- * @param {V} [val] - The "val" parameter is an optional parameter of type V. It represents the value that will be
12
- * stored in the binary tree node. If no value is provided, it will be set to undefined.
13
- */
14
- constructor(val) {
15
- this.val = val;
16
- }
17
- }
18
- export class AbstractBinaryTree {
19
- }
@@ -1,2 +0,0 @@
1
- export declare class BTree {
2
- }
@@ -1,2 +0,0 @@
1
- export class BTree {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class SplayTree {
2
- }
@@ -1,2 +0,0 @@
1
- export class SplayTree {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class TwoThreeTree {
2
- }
@@ -1,2 +0,0 @@
1
- export class TwoThreeTree {
2
- }
@@ -1,2 +0,0 @@
1
- export declare class Pair {
2
- }
@@ -1,2 +0,0 @@
1
- export class Pair {
2
- }
@@ -1,7 +0,0 @@
1
- import { BinaryTreeNodeKey } from '../types';
2
- import { AbstractBinaryTreeNode } from '../data-structures';
3
- export interface IAbstractBinaryTreeNode<T, NEIGHBOR extends IAbstractBinaryTreeNode<T, NEIGHBOR>> {
4
- }
5
- export interface IAbstractBinaryTree<N extends AbstractBinaryTreeNode<N['val'], N>> {
6
- createNode(key: BinaryTreeNodeKey, val?: N['val'], count?: number): N | null;
7
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { AVLTreeNode } from '../data-structures';
2
- import { IBST, IBSTNode } from './bst';
3
- export interface IAVLTreeNode<T, NEIGHBOR extends IAVLTreeNode<T, NEIGHBOR>> extends IBSTNode<T, NEIGHBOR> {
4
- height: number;
5
- }
6
- export interface IAVLTree<N extends AVLTreeNode<N['val'], N>> extends IBST<N> {
7
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { BSTNode } from '../data-structures';
2
- import { IBinaryTree, IBinaryTreeNode } from './binary-tree';
3
- export interface IBSTNode<T, NEIGHBOR extends IBSTNode<T, NEIGHBOR>> extends IBinaryTreeNode<T, NEIGHBOR> {
4
- }
5
- export interface IBST<N extends BSTNode<N['val'], N>> extends IBinaryTree<N> {
6
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { IAbstractGraph } from './abstract-graph';
2
- export interface IDirectedGraph<V, E> extends IAbstractGraph<V, E> {
3
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { RBTreeNode } from '../data-structures';
2
- import { IBST, IBSTNode } from './bst';
3
- export interface IRBTreeNode<T, NEIGHBOR extends IRBTreeNode<T, NEIGHBOR>> extends IBSTNode<T, NEIGHBOR> {
4
- }
5
- export interface IRBTree<N extends RBTreeNode<N['val'], N>> extends IBST<N> {
6
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { TreeMultisetNode } from '../data-structures';
2
- import { IAVLTree, IAVLTreeNode } from './avl-tree';
3
- export interface ITreeMultisetNode<T, NEIGHBOR extends ITreeMultisetNode<T, NEIGHBOR>> extends IAVLTreeNode<T, NEIGHBOR> {
4
- }
5
- export interface ITreeMultiset<N extends TreeMultisetNode<N['val'], N>> extends IAVLTree<N> {
6
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { IAbstractGraph } from './abstract-graph';
2
- export interface IUNDirectedGraph<V, E> extends IAbstractGraph<V, E> {
3
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,32 +0,0 @@
1
- import { AbstractBinaryTreeNode } from '../../data-structures';
2
- /**
3
- * Enum representing different loop types.
4
- *
5
- * - `iterative`: Indicates the iterative loop type (with loops that use iterations).
6
- * - `recursive`: Indicates the recursive loop type (with loops that call themselves).
7
- */
8
- export declare enum LoopType {
9
- ITERATIVE = "ITERATIVE",
10
- RECURSIVE = "RECURSIVE"
11
- }
12
- export declare enum FamilyPosition {
13
- ROOT = "ROOT",
14
- LEFT = "LEFT",
15
- RIGHT = "RIGHT",
16
- ROOT_LEFT = "ROOT_LEFT",
17
- ROOT_RIGHT = "ROOT_RIGHT",
18
- ISOLATED = "ISOLATED",
19
- MAL_NODE = "MAL_NODE"
20
- }
21
- export type BinaryTreeNodePropertyName = 'key' | 'val';
22
- export type NodeOrPropertyName = 'node' | BinaryTreeNodePropertyName;
23
- export type DFSOrderPattern = 'in' | 'pre' | 'post';
24
- export type BinaryTreeNodeKey = number;
25
- export type BinaryTreeDeletedResult<N> = {
26
- deleted: N | null | undefined;
27
- needBalanced: N | null;
28
- };
29
- export type AbstractBinaryTreeNodeProperty<N extends AbstractBinaryTreeNode<N['val'], N>> = N['val'] | N | number | BinaryTreeNodeKey;
30
- export type AbstractBinaryTreeNodeProperties<N extends AbstractBinaryTreeNode<N['val'], N>> = AbstractBinaryTreeNodeProperty<N>[];
31
- export type AbstractBinaryTreeNodeNested<T> = AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
32
- export type AbstractBinaryTreeOptions = {};
@@ -1,21 +0,0 @@
1
- /**
2
- * Enum representing different loop types.
3
- *
4
- * - `iterative`: Indicates the iterative loop type (with loops that use iterations).
5
- * - `recursive`: Indicates the recursive loop type (with loops that call themselves).
6
- */
7
- export var LoopType;
8
- (function (LoopType) {
9
- LoopType["ITERATIVE"] = "ITERATIVE";
10
- LoopType["RECURSIVE"] = "RECURSIVE";
11
- })(LoopType || (LoopType = {}));
12
- export var FamilyPosition;
13
- (function (FamilyPosition) {
14
- FamilyPosition["ROOT"] = "ROOT";
15
- FamilyPosition["LEFT"] = "LEFT";
16
- FamilyPosition["RIGHT"] = "RIGHT";
17
- FamilyPosition["ROOT_LEFT"] = "ROOT_LEFT";
18
- FamilyPosition["ROOT_RIGHT"] = "ROOT_RIGHT";
19
- FamilyPosition["ISOLATED"] = "ISOLATED";
20
- FamilyPosition["MAL_NODE"] = "MAL_NODE";
21
- })(FamilyPosition || (FamilyPosition = {}));
@@ -1,7 +0,0 @@
1
- export type PriorityQueueComparator<T> = (a: T, b: T) => number;
2
- export type PriorityQueueOptions<T> = {
3
- nodes?: T[];
4
- isFix?: boolean;
5
- comparator: PriorityQueueComparator<T>;
6
- };
7
- export type PriorityQueueDFSOrderPattern = 'pre' | 'in' | 'post';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export class AaTree {}
@@ -1,33 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Tyler Zeng
5
- * @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
6
- * @license MIT License
7
- */
8
-
9
- import type {AbstractBinaryTreeNodeNested, BinaryTreeNodeKey} from '../../types';
10
- import {IAbstractBinaryTree, IAbstractBinaryTreeNode} from '../../interfaces';
11
-
12
- export abstract class AbstractBinaryTreeNode<
13
- V = any,
14
- FAMILY extends AbstractBinaryTreeNode<V, FAMILY> = AbstractBinaryTreeNodeNested<V>
15
- > implements IAbstractBinaryTreeNode<V, FAMILY>
16
- {
17
- /**
18
- * The constructor function initializes a BinaryTreeNode object with a key and an optional value.
19
- * @param {V} [val] - The "val" parameter is an optional parameter of type V. It represents the value that will be
20
- * stored in the binary tree node. If no value is provided, it will be set to undefined.
21
- */
22
- protected constructor(val?: V) {
23
- this.val = val;
24
- }
25
-
26
- val: V | undefined;
27
- }
28
-
29
- export abstract class AbstractBinaryTree<N extends AbstractBinaryTreeNode<N['val'], N> = AbstractBinaryTreeNode>
30
- implements IAbstractBinaryTree<N>
31
- {
32
- abstract createNode(key: BinaryTreeNodeKey, val?: N['val']): N | null;
33
- }
@@ -1 +0,0 @@
1
- export class BTree {}
@@ -1 +0,0 @@
1
- export class SplayTree {}