data-structure-typed 1.32.1 → 1.32.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.
- package/CHANGELOG.md +1 -1
- package/README.md +57 -187
- package/coverage/clover.xml +33 -33
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/aa-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/abstract-binary-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/avl-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/b-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/binary-indexed-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/binary-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/bst.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/rb-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/segment-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/splay-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/tree-multiset.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/binary-tree/two-three-tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/graph/abstract-graph.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/graph/directed-graph.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/graph/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/graph/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/graph/map-graph.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/graph/undirected-graph.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/coordinate-map.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/coordinate-set.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/hash-table.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/pair.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/tree-map.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/hash/tree-set.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/heap/heap.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/heap/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/heap/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/heap/max-heap.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/heap/min-heap.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/linked-list/doubly-linked-list.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/linked-list/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/linked-list/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/linked-list/singly-linked-list.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/linked-list/skip-linked-list.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/matrix/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/matrix/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/matrix/matrix.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/matrix/matrix2d.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/matrix/navigator.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/matrix/vector2d.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/priority-queue/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/priority-queue/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/priority-queue/max-priority-queue.ts.html +4 -4
- package/coverage/lcov-report/src/data-structures/priority-queue/min-priority-queue.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/priority-queue/priority-queue.ts.html +29 -29
- package/coverage/lcov-report/src/data-structures/queue/deque.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/queue/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/queue/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/queue/queue.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/stack/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/stack/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/stack/stack.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/tree/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/tree/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/tree/tree.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/trie/index.html +1 -1
- package/coverage/lcov-report/src/data-structures/trie/index.ts.html +1 -1
- package/coverage/lcov-report/src/data-structures/trie/trie.ts.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +1 -1
- package/coverage/lcov-report/src/interfaces/index.html +1 -1
- package/coverage/lcov-report/src/interfaces/index.ts.html +1 -1
- package/coverage/lcov-report/src/types/data-structures/abstract-binary-tree.ts.html +1 -1
- package/coverage/lcov-report/src/types/data-structures/bst.ts.html +1 -1
- package/coverage/lcov-report/src/types/data-structures/directed-graph.ts.html +1 -1
- package/coverage/lcov-report/src/types/data-structures/index.html +1 -1
- package/coverage/lcov-report/src/types/data-structures/index.ts.html +1 -1
- package/coverage/lcov-report/src/types/data-structures/rb-tree.ts.html +1 -1
- package/coverage/lcov-report/src/types/index.html +1 -1
- package/coverage/lcov-report/src/types/index.ts.html +1 -1
- package/coverage/lcov-report/src/types/utils/index.html +1 -1
- package/coverage/lcov-report/src/types/utils/index.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov-report/src/utils/index.ts.html +1 -1
- package/coverage/lcov-report/src/utils/utils.ts.html +1 -1
- package/coverage/lcov-report/test/utils/index.html +1 -1
- package/coverage/lcov-report/test/utils/index.ts.html +1 -1
- package/coverage/lcov-report/test/utils/magnitude.ts.html +1 -1
- package/coverage/lcov-report/test/utils/number.ts.html +1 -1
- package/coverage/lcov.info +51 -51
- package/docs/classes/AVLTree.html +85 -85
- package/docs/classes/AVLTreeNode.html +15 -15
- package/docs/classes/AaTree.html +1 -1
- package/docs/classes/AbstractBinaryTree.html +78 -78
- package/docs/classes/AbstractBinaryTreeNode.html +21 -21
- package/docs/classes/AbstractEdge.html +11 -11
- package/docs/classes/AbstractGraph.html +36 -36
- package/docs/classes/AbstractVertex.html +8 -8
- package/docs/classes/ArrayDeque.html +14 -14
- package/docs/classes/BST.html +78 -78
- package/docs/classes/BSTNode.html +15 -15
- package/docs/classes/BTree.html +1 -1
- package/docs/classes/BinaryIndexedTree.html +9 -9
- package/docs/classes/BinaryTree.html +71 -71
- package/docs/classes/BinaryTreeNode.html +15 -15
- package/docs/classes/Character.html +4 -4
- package/docs/classes/CoordinateMap.html +9 -9
- package/docs/classes/CoordinateSet.html +8 -8
- package/docs/classes/Deque.html +34 -34
- package/docs/classes/DirectedEdge.html +15 -15
- package/docs/classes/DirectedGraph.html +52 -52
- package/docs/classes/DirectedVertex.html +6 -6
- package/docs/classes/DoublyLinkedList.html +37 -37
- package/docs/classes/DoublyLinkedListNode.html +11 -11
- package/docs/classes/HashTable.html +1 -1
- package/docs/classes/Heap.html +26 -26
- package/docs/classes/HeapItem.html +8 -8
- package/docs/classes/LinkedListQueue.html +35 -35
- package/docs/classes/MapEdge.html +13 -13
- package/docs/classes/MapGraph.html +56 -56
- package/docs/classes/MapVertex.html +12 -12
- package/docs/classes/Matrix2D.html +16 -16
- package/docs/classes/MatrixNTI2D.html +4 -4
- package/docs/classes/MaxHeap.html +26 -26
- package/docs/classes/MaxPriorityQueue.html +34 -34
- package/docs/classes/MinHeap.html +26 -26
- package/docs/classes/MinPriorityQueue.html +34 -34
- package/docs/classes/Navigator.html +10 -10
- package/docs/classes/ObjectDeque.html +25 -25
- package/docs/classes/Pair.html +1 -1
- package/docs/classes/PriorityQueue.html +32 -32
- package/docs/classes/Queue.html +22 -22
- package/docs/classes/RBTree.html +78 -78
- package/docs/classes/RBTreeNode.html +18 -18
- package/docs/classes/SegmentTree.html +17 -17
- package/docs/classes/SegmentTreeNode.html +20 -20
- package/docs/classes/SinglyLinkedList.html +35 -35
- package/docs/classes/SinglyLinkedListNode.html +8 -8
- package/docs/classes/SkipLinkedList.html +1 -1
- package/docs/classes/SplayTree.html +1 -1
- package/docs/classes/Stack.html +12 -12
- package/docs/classes/TreeMap.html +1 -1
- package/docs/classes/TreeMultiset.html +99 -99
- package/docs/classes/TreeMultisetNode.html +18 -18
- package/docs/classes/TreeNode.html +13 -13
- package/docs/classes/TreeSet.html +1 -1
- package/docs/classes/Trie.html +13 -13
- package/docs/classes/TrieNode.html +11 -11
- package/docs/classes/TwoThreeTree.html +1 -1
- package/docs/classes/UndirectedEdge.html +12 -12
- package/docs/classes/UndirectedGraph.html +40 -40
- package/docs/classes/UndirectedVertex.html +6 -6
- package/docs/classes/Vector2D.html +28 -28
- package/docs/enums/CP.html +4 -4
- package/docs/enums/FamilyPosition.html +8 -8
- package/docs/enums/LoopType.html +3 -3
- package/docs/enums/RBColor.html +3 -3
- package/docs/enums/TopologicalProperty.html +4 -4
- package/docs/functions/arrayRemove.html +1 -1
- package/docs/functions/isThunk.html +1 -1
- package/docs/functions/toThunk.html +1 -1
- package/docs/functions/trampoline.html +1 -1
- package/docs/functions/trampolineAsync.html +1 -1
- package/docs/functions/uuidV4.html +1 -1
- package/docs/index.html +13 -17
- package/docs/interfaces/IAVLTree.html +77 -77
- package/docs/interfaces/IAbstractBinaryTree.html +72 -72
- package/docs/interfaces/IAbstractBinaryTreeNode.html +14 -14
- package/docs/interfaces/IAbstractGraph.html +15 -15
- package/docs/interfaces/IBST.html +77 -77
- package/docs/interfaces/IDirectedGraph.html +23 -23
- package/docs/interfaces/IRBTree.html +77 -77
- package/docs/interfaces/IUNDirectedGraph.html +16 -16
- package/docs/types/AVLTreeNodeNested.html +1 -1
- package/docs/types/AVLTreeOptions.html +1 -1
- package/docs/types/AbstractBinaryTreeNodeNested.html +1 -1
- package/docs/types/AbstractBinaryTreeNodeProperties.html +1 -1
- package/docs/types/AbstractBinaryTreeNodeProperty.html +1 -1
- package/docs/types/AbstractBinaryTreeOptions.html +1 -1
- package/docs/types/BSTComparator.html +1 -1
- package/docs/types/BSTNodeNested.html +1 -1
- package/docs/types/BSTOptions.html +1 -1
- package/docs/types/BinaryTreeDeletedResult.html +1 -1
- package/docs/types/BinaryTreeNodeId.html +1 -1
- package/docs/types/BinaryTreeNodeNested.html +1 -1
- package/docs/types/BinaryTreeNodePropertyName.html +1 -1
- package/docs/types/BinaryTreeOptions.html +1 -1
- package/docs/types/DFSOrderPattern.html +1 -1
- package/docs/types/DijkstraResult.html +1 -1
- package/docs/types/Direction.html +1 -1
- package/docs/types/DummyAny.html +1 -1
- package/docs/types/EdgeId.html +1 -1
- package/docs/types/HeapOptions.html +1 -1
- package/docs/types/IAVLTreeNode.html +1 -1
- package/docs/types/IBSTNode.html +1 -1
- package/docs/types/IBinaryTree.html +1 -1
- package/docs/types/IBinaryTreeNode.html +1 -1
- package/docs/types/IRBTreeNode.html +1 -1
- package/docs/types/ITreeMultiset.html +1 -1
- package/docs/types/ITreeMultisetNode.html +1 -1
- package/docs/types/KeyValueObject.html +1 -1
- package/docs/types/KeyValueObjectWithId.html +1 -1
- package/docs/types/MapGraphCoordinate.html +1 -1
- package/docs/types/NavigatorParams.html +1 -1
- package/docs/types/NodeOrPropertyName.html +1 -1
- package/docs/types/NonNumberNonObjectButDefined.html +1 -1
- package/docs/types/ObjectWithNonNumberId.html +1 -1
- package/docs/types/ObjectWithNumberId.html +1 -1
- package/docs/types/ObjectWithoutId.html +1 -1
- package/docs/types/PriorityQueueComparator.html +1 -1
- package/docs/types/PriorityQueueDFSOrderPattern.html +1 -1
- package/docs/types/PriorityQueueOptions.html +1 -1
- package/docs/types/RBTreeNodeNested.html +1 -1
- package/docs/types/RBTreeOptions.html +1 -1
- package/docs/types/RestrictValById.html +1 -1
- package/docs/types/SegmentTreeNodeVal.html +1 -1
- package/docs/types/SpecifyOptional.html +1 -1
- package/docs/types/Thunk.html +1 -1
- package/docs/types/ToThunkFn.html +1 -1
- package/docs/types/TopologicalStatus.html +1 -1
- package/docs/types/TreeMultisetNodeNested.html +1 -1
- package/docs/types/TreeMultisetOptions.html +1 -1
- package/docs/types/TrlAsyncFn.html +1 -1
- package/docs/types/TrlFn.html +1 -1
- package/docs/types/Turning.html +1 -1
- package/docs/types/VertexId.html +1 -1
- package/docs/variables/THUNK_SYMBOL.html +1 -1
- package/package.json +1 -1
- package/.auto-changelog-template.hbs +0 -36
- package/rename_clear_files.sh +0 -29
- package/src/data-structures/binary-tree/aa-tree.ts +0 -1
- package/src/data-structures/binary-tree/abstract-binary-tree.ts +0 -1631
- package/src/data-structures/binary-tree/avl-tree.ts +0 -310
- package/src/data-structures/binary-tree/b-tree.ts +0 -1
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -76
- package/src/data-structures/binary-tree/binary-tree.ts +0 -47
- package/src/data-structures/binary-tree/bst.ts +0 -537
- package/src/data-structures/binary-tree/index.ts +0 -12
- package/src/data-structures/binary-tree/rb-tree.ts +0 -101
- package/src/data-structures/binary-tree/segment-tree.ts +0 -242
- package/src/data-structures/binary-tree/splay-tree.ts +0 -1
- package/src/data-structures/binary-tree/tree-multiset.ts +0 -700
- package/src/data-structures/binary-tree/two-three-tree.ts +0 -1
- package/src/data-structures/diagrams/README.md +0 -5
- package/src/data-structures/graph/abstract-graph.ts +0 -1040
- package/src/data-structures/graph/directed-graph.ts +0 -470
- package/src/data-structures/graph/index.ts +0 -4
- package/src/data-structures/graph/map-graph.ts +0 -129
- package/src/data-structures/graph/undirected-graph.ts +0 -274
- package/src/data-structures/hash/coordinate-map.ts +0 -67
- package/src/data-structures/hash/coordinate-set.ts +0 -56
- package/src/data-structures/hash/hash-table.ts +0 -1
- package/src/data-structures/hash/index.ts +0 -6
- package/src/data-structures/hash/pair.ts +0 -1
- package/src/data-structures/hash/tree-map.ts +0 -1
- package/src/data-structures/hash/tree-set.ts +0 -1
- package/src/data-structures/heap/heap.ts +0 -212
- package/src/data-structures/heap/index.ts +0 -3
- package/src/data-structures/heap/max-heap.ts +0 -31
- package/src/data-structures/heap/min-heap.ts +0 -32
- package/src/data-structures/index.ts +0 -11
- package/src/data-structures/linked-list/doubly-linked-list.ts +0 -573
- package/src/data-structures/linked-list/index.ts +0 -3
- package/src/data-structures/linked-list/singly-linked-list.ts +0 -501
- package/src/data-structures/linked-list/skip-linked-list.ts +0 -1
- package/src/data-structures/matrix/index.ts +0 -4
- package/src/data-structures/matrix/matrix.ts +0 -27
- package/src/data-structures/matrix/matrix2d.ts +0 -212
- package/src/data-structures/matrix/navigator.ts +0 -121
- package/src/data-structures/matrix/vector2d.ts +0 -316
- package/src/data-structures/priority-queue/index.ts +0 -3
- package/src/data-structures/priority-queue/max-priority-queue.ts +0 -56
- package/src/data-structures/priority-queue/min-priority-queue.ts +0 -57
- package/src/data-structures/priority-queue/priority-queue.ts +0 -359
- package/src/data-structures/queue/deque.ts +0 -297
- package/src/data-structures/queue/index.ts +0 -2
- package/src/data-structures/queue/queue.ts +0 -191
- package/src/data-structures/stack/index.ts +0 -1
- package/src/data-structures/stack/stack.ts +0 -98
- package/src/data-structures/tree/index.ts +0 -1
- package/src/data-structures/tree/tree.ts +0 -69
- package/src/data-structures/trie/index.ts +0 -1
- package/src/data-structures/trie/trie.ts +0 -225
- package/src/index.ts +0 -4
- package/src/interfaces/abstract-binary-tree.ts +0 -191
- package/src/interfaces/abstract-graph.ts +0 -31
- package/src/interfaces/avl-tree.ts +0 -25
- package/src/interfaces/binary-tree.ts +0 -6
- package/src/interfaces/bst.ts +0 -31
- package/src/interfaces/directed-graph.ts +0 -20
- package/src/interfaces/doubly-linked-list.ts +0 -1
- package/src/interfaces/heap.ts +0 -1
- package/src/interfaces/index.ts +0 -15
- package/src/interfaces/navigator.ts +0 -1
- package/src/interfaces/priority-queue.ts +0 -1
- package/src/interfaces/rb-tree.ts +0 -9
- package/src/interfaces/segment-tree.ts +0 -1
- package/src/interfaces/singly-linked-list.ts +0 -1
- package/src/interfaces/tree-multiset.ts +0 -7
- package/src/interfaces/undirected-graph.ts +0 -6
- package/src/types/data-structures/abstract-binary-tree.ts +0 -50
- package/src/types/data-structures/abstract-graph.ts +0 -11
- package/src/types/data-structures/avl-tree.ts +0 -5
- package/src/types/data-structures/binary-tree.ts +0 -5
- package/src/types/data-structures/bst.ts +0 -13
- package/src/types/data-structures/directed-graph.ts +0 -8
- package/src/types/data-structures/doubly-linked-list.ts +0 -1
- package/src/types/data-structures/heap.ts +0 -5
- package/src/types/data-structures/index.ts +0 -15
- package/src/types/data-structures/map-graph.ts +0 -1
- package/src/types/data-structures/navigator.ts +0 -13
- package/src/types/data-structures/priority-queue.ts +0 -9
- package/src/types/data-structures/rb-tree.ts +0 -8
- package/src/types/data-structures/segment-tree.ts +0 -1
- package/src/types/data-structures/singly-linked-list.ts +0 -1
- package/src/types/data-structures/tree-multiset.ts +0 -6
- package/src/types/helpers.ts +0 -1
- package/src/types/index.ts +0 -3
- package/src/types/utils/index.ts +0 -2
- package/src/types/utils/utils.ts +0 -6
- package/src/types/utils/validate-type.ts +0 -35
- package/src/utils/index.ts +0 -1
- package/src/utils/utils.ts +0 -79
- package/tsconfig.build.json +0 -33
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import {BinaryTreeNode} from '../../data-structures/binary-tree';
|
|
2
|
-
import {AbstractBinaryTreeOptions} from './abstract-binary-tree';
|
|
3
|
-
|
|
4
|
-
export type BinaryTreeNodeNested<T> = BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, BinaryTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
5
|
-
export type BinaryTreeOptions = AbstractBinaryTreeOptions & {}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {BSTNode} from '../../data-structures/binary-tree';
|
|
2
|
-
import type {BinaryTreeOptions} from './binary-tree';
|
|
3
|
-
import {BinaryTreeNodeId} from './abstract-binary-tree';
|
|
4
|
-
|
|
5
|
-
export type BSTComparator = (a: BinaryTreeNodeId, b: BinaryTreeNodeId) => number;
|
|
6
|
-
|
|
7
|
-
// prettier-ignore
|
|
8
|
-
export type BSTNodeNested<T> = BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, BSTNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
9
|
-
export type BSTOptions = BinaryTreeOptions & {
|
|
10
|
-
comparator?: BSTComparator,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export enum CP {lt = 'lt', eq = 'eq', gt = 'gt'}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './binary-tree';
|
|
2
|
-
export * from './bst';
|
|
3
|
-
export * from './avl-tree';
|
|
4
|
-
export * from './segment-tree';
|
|
5
|
-
export * from './tree-multiset';
|
|
6
|
-
export * from './abstract-graph';
|
|
7
|
-
export * from './map-graph';
|
|
8
|
-
export * from './abstract-binary-tree';
|
|
9
|
-
export * from './rb-tree';
|
|
10
|
-
export * from './directed-graph';
|
|
11
|
-
export * from './priority-queue';
|
|
12
|
-
export * from './heap';
|
|
13
|
-
export * from './singly-linked-list';
|
|
14
|
-
export * from './doubly-linked-list';
|
|
15
|
-
export * from './navigator';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type MapGraphCoordinate = [number, number];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type Direction = 'up' | 'right' | 'down' | 'left';
|
|
2
|
-
export type Turning = {[key in Direction]: Direction};
|
|
3
|
-
|
|
4
|
-
export type NavigatorParams<T> = {
|
|
5
|
-
matrix: T[][];
|
|
6
|
-
turning: Turning;
|
|
7
|
-
onMove: (cur: [number, number]) => void;
|
|
8
|
-
init: {
|
|
9
|
-
cur: [number, number];
|
|
10
|
-
charDir: Direction;
|
|
11
|
-
VISITED: T;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import {BinaryTreeOptions} from './binary-tree';
|
|
2
|
-
import {RBTreeNode} from '../../data-structures/binary-tree';
|
|
3
|
-
|
|
4
|
-
export enum RBColor { RED = 'RED', BLACK = 'BLACK'}
|
|
5
|
-
|
|
6
|
-
export type RBTreeNodeNested<T> = RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
7
|
-
|
|
8
|
-
export type RBTreeOptions = BinaryTreeOptions & {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type SegmentTreeNodeVal = number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import {TreeMultisetNode} from '../../data-structures/binary-tree';
|
|
2
|
-
import {AVLTreeOptions} from './avl-tree';
|
|
3
|
-
|
|
4
|
-
export type TreeMultisetNodeNested<T> = TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, TreeMultisetNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
5
|
-
|
|
6
|
-
export type TreeMultisetOptions = Omit<AVLTreeOptions, 'isMergeDuplicatedNodeById'> & {}
|
package/src/types/helpers.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/types/index.ts
DELETED
package/src/types/utils/index.ts
DELETED
package/src/types/utils/utils.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type ToThunkFn = () => ReturnType<TrlFn>;
|
|
2
|
-
export type Thunk = () => ReturnType<ToThunkFn> & {__THUNK__: symbol};
|
|
3
|
-
export type TrlFn = (...args: any[]) => any;
|
|
4
|
-
export type TrlAsyncFn = (...args: any[]) => any;
|
|
5
|
-
|
|
6
|
-
export type SpecifyOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export type KeyValueObject = {[key: string]: any};
|
|
2
|
-
|
|
3
|
-
export type KeyValueObjectWithId = {[key: string]: any; id: string | number | symbol};
|
|
4
|
-
|
|
5
|
-
export type NonNumberNonObjectButDefined = string | boolean | symbol | null;
|
|
6
|
-
|
|
7
|
-
export type ObjectWithoutId = Omit<KeyValueObject, 'id'>;
|
|
8
|
-
|
|
9
|
-
export type ObjectWithNonNumberId = {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
id: string | boolean | symbol | null | object | undefined;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type ObjectWithNumberId = {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
id: number;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type RestrictValById =
|
|
20
|
-
| NonNumberNonObjectButDefined
|
|
21
|
-
| ObjectWithoutId
|
|
22
|
-
| ObjectWithNonNumberId
|
|
23
|
-
| ObjectWithNumberId;
|
|
24
|
-
|
|
25
|
-
export type DummyAny =
|
|
26
|
-
| string
|
|
27
|
-
| number
|
|
28
|
-
| boolean
|
|
29
|
-
| null
|
|
30
|
-
| undefined
|
|
31
|
-
| object
|
|
32
|
-
| symbol
|
|
33
|
-
| void
|
|
34
|
-
| ((...args: []) => any)
|
|
35
|
-
| never;
|
package/src/utils/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils';
|
package/src/utils/utils.ts
DELETED
|
@@ -1,79 +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 {Thunk, ToThunkFn, TrlAsyncFn, TrlFn} from '../types';
|
|
9
|
-
|
|
10
|
-
export const uuidV4 = function () {
|
|
11
|
-
return 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.replace(/[x]/g, function (c) {
|
|
12
|
-
const r = (Math.random() * 16) | 0,
|
|
13
|
-
v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
14
|
-
return v.toString(16);
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const arrayRemove = function <T>(array: T[], predicate: (item: T, index: number, array: T[]) => boolean): T[] {
|
|
19
|
-
let i = -1,
|
|
20
|
-
len = array ? array.length : 0;
|
|
21
|
-
const result = [];
|
|
22
|
-
|
|
23
|
-
while (++i < len) {
|
|
24
|
-
const value = array[i];
|
|
25
|
-
if (predicate(value, i, array)) {
|
|
26
|
-
result.push(value);
|
|
27
|
-
Array.prototype.splice.call(array, i--, 1);
|
|
28
|
-
len--;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const THUNK_SYMBOL = Symbol('thunk');
|
|
36
|
-
|
|
37
|
-
export const isThunk = (fnOrValue: any) => {
|
|
38
|
-
return typeof fnOrValue === 'function' && fnOrValue.__THUNK__ === THUNK_SYMBOL;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const toThunk = (fn: ToThunkFn): Thunk => {
|
|
42
|
-
const thunk = () => fn();
|
|
43
|
-
thunk.__THUNK__ = THUNK_SYMBOL;
|
|
44
|
-
return thunk;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const trampoline = (fn: TrlFn) => {
|
|
48
|
-
const cont = (...args: [...Parameters<TrlFn>]) => toThunk(() => fn(...args));
|
|
49
|
-
|
|
50
|
-
return Object.assign(
|
|
51
|
-
(...args: [...Parameters<TrlFn>]) => {
|
|
52
|
-
let result = fn(...args);
|
|
53
|
-
|
|
54
|
-
while (isThunk(result) && typeof result === 'function') {
|
|
55
|
-
result = result();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return result;
|
|
59
|
-
},
|
|
60
|
-
{cont}
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const trampolineAsync = (fn: TrlAsyncFn) => {
|
|
65
|
-
const cont = (...args: [...Parameters<TrlAsyncFn>]) => toThunk(() => fn(...args));
|
|
66
|
-
|
|
67
|
-
return Object.assign(
|
|
68
|
-
async (...args: [...Parameters<TrlAsyncFn>]) => {
|
|
69
|
-
let result = await fn(...args);
|
|
70
|
-
|
|
71
|
-
while (isThunk(result) && typeof result === 'function') {
|
|
72
|
-
result = await result();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return result;
|
|
76
|
-
},
|
|
77
|
-
{cont}
|
|
78
|
-
);
|
|
79
|
-
};
|
package/tsconfig.build.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES5",
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"outDir": "./dist",
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"lib": [
|
|
8
|
-
"esnext",
|
|
9
|
-
"dom"
|
|
10
|
-
],
|
|
11
|
-
"strict": true,
|
|
12
|
-
"downlevelIteration": true,
|
|
13
|
-
"removeComments": true,
|
|
14
|
-
// "allowJs": true,
|
|
15
|
-
// "allowSyntheticDefaultImports": true,
|
|
16
|
-
// "forceConsistentCasingInFileNames": true,
|
|
17
|
-
// "noFallthroughCasesInSwitch": true,
|
|
18
|
-
// "resolveJsonModule": true,
|
|
19
|
-
// "isolatedModules": true,
|
|
20
|
-
// "noEmit": true,
|
|
21
|
-
"typeRoots": [
|
|
22
|
-
"node_modules/@types"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
"include": ["src/**/*.ts", "src/**/*.js"],
|
|
27
|
-
"exclude": [
|
|
28
|
-
"node_modules",
|
|
29
|
-
"lib",
|
|
30
|
-
"dist"
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
|