diff --git a/.npmignore b/.npmignore index e045d903..95472a30 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,8 @@ .editorconfig .dependency-cruiser.js -package-lock.json -rename-clear-files.sh +.auto-changelog-template.hbs +rename_clear_files.sh +tsconfig.build.json /.idea /notes diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bdf58db..f4ef62d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. - [Semantic Versioning](https://semver.org/spec/v2.0.0.html) - [`auto-changelog`](https://github.com/CookPete/auto-changelog) -## [v1.32.0](https://github.com/zrwusa/data-structure-typed/compare/v1.12.9...main) (upcoming) +## [v1.32.1](https://github.com/zrwusa/data-structure-typed/compare/v1.12.9...main) (upcoming) ## [v1.12.9](https://github.com/zrwusa/data-structure-typed/compare/v1.12.8...v1.12.9) (14 August 2023) diff --git a/README.md b/README.md index cba3d062..3c2eab3c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Data Structure Typed + ![License](https://img.shields.io/badge/License-MIT-blue.svg) ![Language](https://img.shields.io/github/languages/top/zrwusa/data-structure-typed) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/zrwusa/data-structure-typed) @@ -19,7 +21,7 @@ DFS(Depth-First Search), DFSIterative, BFS(Breadth-First Search), morris, Bellman-Ford Algorithm, Dijkstra's Algorithm, Floyd-Warshall Algorithm, Tarjan's Algorithm. -## install +## Installation and Usage ### npm ```bash npm install data-structure-typed --save @@ -32,7 +34,7 @@ yarn add data-structure-typed ```html ``` -```javascript +```js const {AVLTree} = dataStructureTyped; const {Heap, MinHeap, SinglyLinkedList, Stack, AVLTreeNode, BST, Trie, DirectedGraph, DirectedVertex, TreeMultiset} = dataStructureTyped; ``` @@ -56,7 +58,7 @@ const {Heap, MinHeap, SinglyLinkedList, Stack, AVLTreeNode, BST, Trie, DirectedG ## Code Snippet ### Binary Search Tree (BST) snippet #### TS -```typescript +```ts import {BST, BSTNode} from 'data-structure-typed'; const bst = new BST(); @@ -91,7 +93,7 @@ const {Heap, MinHeap, SinglyLinkedList, Stack, AVLTreeNode, BST, Trie, DirectedG objBST.remove(11); ``` #### JS -```javascript +```js const {BST, BSTNode} = require('data-structure-typed'); const bst = new BST(); @@ -137,73 +139,71 @@ const {Heap, MinHeap, SinglyLinkedList, Stack, AVLTreeNode, BST, Trie, DirectedG ### AVLTree snippet #### TS -```typescript - import {AVLTree} from 'data-structure-typed'; - - const avlTree = new AVLTree(); - avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]) - avlTree.isAVLBalanced(); // true - avlTree.remove(10); - avlTree.isAVLBalanced(); // true - +```ts +import {AVLTree} from 'data-structure-typed'; + +const avlTree = new AVLTree(); +avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]) +avlTree.isAVLBalanced(); // true +avlTree.remove(10); +avlTree.isAVLBalanced(); // true ``` #### JS -```javascript - const {AVLTree} = require('data-structure-typed'); - - const avlTree = new AVLTree(); - avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]) - avlTree.isAVLBalanced(); // true - avlTree.remove(10); - avlTree.isAVLBalanced(); // true - +```js +const {AVLTree} = require('data-structure-typed'); + +const avlTree = new AVLTree(); +avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]) +avlTree.isAVLBalanced(); // true +avlTree.remove(10); +avlTree.isAVLBalanced(); // true ``` ### Directed Graph simple snippet #### TS or JS -```typescript +```ts import {DirectedGraph} from 'data-structure-typed'; - const graph = new DirectedGraph(); - - graph.addVertex('A'); - graph.addVertex('B'); - - graph.hasVertex('A'); // true - graph.hasVertex('B'); // true - graph.hasVertex('C'); // false - - graph.addEdge('A', 'B'); - graph.hasEdge('A', 'B'); // true - graph.hasEdge('B', 'A'); // false - - graph.removeEdgeSrcToDest('A', 'B'); - graph.hasEdge('A', 'B'); // false - - graph.addVertex('C'); - - graph.addEdge('A', 'B'); - graph.addEdge('B', 'C'); - - const topologicalOrderIds = graph.topologicalSort(); // ['A', 'B', 'C'] +const graph = new DirectedGraph(); + +graph.addVertex('A'); +graph.addVertex('B'); + +graph.hasVertex('A'); // true +graph.hasVertex('B'); // true +graph.hasVertex('C'); // false + +graph.addEdge('A', 'B'); +graph.hasEdge('A', 'B'); // true +graph.hasEdge('B', 'A'); // false + +graph.removeEdgeSrcToDest('A', 'B'); +graph.hasEdge('A', 'B'); // false + +graph.addVertex('C'); + +graph.addEdge('A', 'B'); +graph.addEdge('B', 'C'); + +const topologicalOrderIds = graph.topologicalSort(); // ['A', 'B', 'C'] ``` ### Undirected Graph snippet #### TS or JS -```typescript +```ts import {UndirectedGraph} from 'data-structure-typed'; - const graph = new UndirectedGraph(); - graph.addVertex('A'); - graph.addVertex('B'); - graph.addVertex('C'); - graph.addVertex('D'); - graph.removeVertex('C'); - graph.addEdge('A', 'B'); - graph.addEdge('B', 'D'); - - const dijkstraResult = graph.dijkstra('A'); - Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D'] +const graph = new UndirectedGraph(); +graph.addVertex('A'); +graph.addVertex('B'); +graph.addVertex('C'); +graph.addVertex('D'); +graph.removeVertex('C'); +graph.addEdge('A', 'B'); +graph.addEdge('B', 'D'); + +const dijkstraResult = graph.dijkstra('A'); +Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D'] ``` ## Data Structures @@ -760,8 +760,6 @@ By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree -> -[//]: # (![overview diagram](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/overview-diagram-of-data-structures.png?raw=true)) - ![complexities](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/complexities-diff.jpg?raw=true) ![complexities of data structures](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/data-structure-complexities.jpg?raw=true) diff --git a/docs/classes/AVLTree.html b/docs/classes/AVLTree.html index f6c6c4e4..0a0e8eb5 100644 --- a/docs/classes/AVLTree.html +++ b/docs/classes/AVLTree.html @@ -33,7 +33,7 @@
Protected_comparator: BSTComparator = ...
Inherited from BST.root
Inherited from BST.size
Inherited from BST.visitedId
Inherited from BST.visitedLeftSum
Protected
_setProtected
_setProtected
_setProtected
_updateImplementation of IAVLTree.add
Implementation of IAVLTree.allGreaterNodesAdd
Inherited from BST.allGreaterNodesAdd
Overrides BST.createNode
Inherited from BST.getLeftMost
+The function getLeftMost
returns the leftmost node in a binary tree, starting from a specified node or the root if
@@ -1205,7 +1205,7 @@
Inherited from BST.getLeftMost
+Inherited from BST.getMinHeight
Inherited from BST.getPathToRoot
Inherited from BST.getPredecessor
Inherited from BST.getRightMost
+The getRightMost
function returns the rightmost node in a binary tree, either recursively or iteratively using tail
@@ -1358,7 +1358,7 @@
Inherited from BST.getRightMost
+Inherited from BST.getSubTreeSize
Implementation of IAVLTree.isAVLBalanced
Inherited from BST.isAVLBalanced
Implementation of IAVLTree.isPerfectlyBalanced
Inherited from BST.isPerfectlyBalanced
Implementation of IAVLTree.isSubtreeBST
Inherited from BST.isSubtreeBST
Inherited from BST.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates properties of each node based on the specified property name.
@@ -1591,7 +1591,7 @@Inherited from BST.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates the 'val' property of each node.
@@ -1615,7 +1615,7 @@Inherited from BST.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates nodes themselves.
@@ -1639,7 +1639,7 @@Inherited from BST.levelIterative
+Inherited from BST.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1681,7 +1681,7 @@Inherited from BST.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1705,7 +1705,7 @@Inherited from BST.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1729,7 +1729,7 @@Inherited from BST.listLevels
+Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates properties of each node based on the specified property name.
@@ -1767,7 +1767,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates the 'val' property of each node.
@@ -1791,7 +1791,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates nodes themselves.
@@ -1815,7 +1815,7 @@Implementation of IAVLTree.perfectlyBalance
Inherited from BST.perfectlyBalance
Implementation of IAVLTree.subTreeAdd
Inherited from BST.subTreeAdd
Inherited from BST.subTreeSum
Inherited from BST.swapLocation
The function getLeftMost
returns the leftmost node in a binary tree, starting from a specified node or the root if
@@ -970,7 +970,7 @@
The getRightMost
function returns the rightmost node in a binary tree, either recursively or iteratively using tail
@@ -1117,7 +1117,7 @@
Performs a level-order traversal on a binary tree starting from the specified node and accumulates properties of each node based on the specified property name.
@@ -1281,7 +1281,7 @@Performs a level-order traversal on a binary tree starting from the specified node and accumulates the 'val' property of each node.
@@ -1304,7 +1304,7 @@Performs a level-order traversal on a binary tree starting from the specified node and accumulates nodes themselves.
@@ -1327,7 +1327,7 @@Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1367,7 +1367,7 @@Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1390,7 +1390,7 @@Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1413,7 +1413,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates properties of each node based on the specified property name.
@@ -1449,7 +1449,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates the 'val' property of each node.
@@ -1472,7 +1472,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates nodes themselves.
@@ -1495,7 +1495,7 @@Overrides BinaryTree.add
Overrides BinaryTree.addMany
Inherited from BinaryTree.clear
Overrides BinaryTree.createNode
Inherited from BinaryTree.fill
Overrides BinaryTree.get
Inherited from BinaryTree.getDepth
Inherited from BinaryTree.getHeight
Inherited from BinaryTree.getLeftMost
+The function getLeftMost
returns the leftmost node in a binary tree, starting from a specified node or the root if
@@ -1060,7 +1060,7 @@
Inherited from BinaryTree.getLeftMost
+Inherited from BinaryTree.getMinHeight
Overrides BinaryTree.getNodes
Inherited from BinaryTree.getPathToRoot
Inherited from BinaryTree.getPredecessor
Inherited from BinaryTree.getRightMost
+The getRightMost
function returns the rightmost node in a binary tree, either recursively or iteratively using tail
@@ -1213,7 +1213,7 @@
Inherited from BinaryTree.getRightMost
+Inherited from BinaryTree.getSubTreeSize
Inherited from BinaryTree.has
Inherited from BinaryTree.isBST
Implementation of IBST.isEmpty
Inherited from BinaryTree.isEmpty
Implementation of IBST.isPerfectlyBalanced
Inherited from BinaryTree.isPerfectlyBalanced
Implementation of IBST.isSubtreeBST
Inherited from BinaryTree.isSubtreeBST
Inherited from BinaryTree.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates properties of each node based on the specified property name.
@@ -1443,7 +1443,7 @@Inherited from BinaryTree.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates the 'val' property of each node.
@@ -1467,7 +1467,7 @@Inherited from BinaryTree.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates nodes themselves.
@@ -1491,7 +1491,7 @@Inherited from BinaryTree.levelIterative
+Inherited from BinaryTree.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1533,7 +1533,7 @@Inherited from BinaryTree.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1557,7 +1557,7 @@Inherited from BinaryTree.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1581,7 +1581,7 @@Inherited from BinaryTree.listLevels
+Inherited from BinaryTree.morris
+Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates properties of each node based on the specified property name.
@@ -1619,7 +1619,7 @@Inherited from BinaryTree.morris
+Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates the 'val' property of each node.
@@ -1643,7 +1643,7 @@Inherited from BinaryTree.morris
+Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates nodes themselves.
@@ -1667,7 +1667,7 @@Inherited from BinaryTree.morris
+Inherited from BinaryTree.remove
Implementation of IBST.subTreeAdd
Inherited from BinaryTree.subTreeAdd
Inherited from BinaryTree.subTreeSum
Inherited from BinaryTree.swapLocation
Inherited from AbstractGraph.getMinPathBetween
Overrides AbstractGraph.getNeighbors
Implementation of IDirectedGraph.hasEdge
Inherited from AbstractGraph.hasEdge
Implementation of IDirectedGraph.hasVertex
Inherited from AbstractGraph.hasVertex
Implementation of IDirectedGraph.removeAllVertices
Inherited from AbstractGraph.removeAllVertices
Overrides AbstractGraph.removeEdge
Implementation of IDirectedGraph.removeVertex
Inherited from AbstractGraph.removeVertex
Implementation of IDirectedGraph.setEdgeWeight
Inherited from AbstractGraph.setEdgeWeight
The insertAfter
function inserts a new node with a given value after an existing node in a doubly linked list.
The insertBefore
function inserts a new value before an existing value or node in a doubly linked list.
Static
fromThe peek
function returns the top item in the priority queue without removing it.
The peek
function returns the top item in the priority queue without removing it.
The peekLast
function returns the last item in the heap.
The peekLast
function returns the last item in the heap.
The poll
function returns the top item from a priority queue or null if the queue is empty.Removes and returns an val with the highest priority in the queue
The poll
function returns the top item from a priority queue or null if the queue is empty.Removes and returns an val with the highest priority in the queue
Optional
Returns (undefined | T)[]The function sorts the elements in the priority queue and returns either the sorted items or their values depending @@ -404,7 +404,7 @@
The function sorts the elements in the priority queue and returns either the sorted items or their values depending @@ -423,7 +423,7 @@
The toArray
function returns an array of HeapItem<T>
objects.
The toArray
function returns an array of HeapItem<T>
objects.
The insertAfter
function inserts a new node with a given value after an existing node in a singly linked list.
The insertBefore
function inserts a new value before an existing value in a singly linked list.
Static
fromStatic
multiplyStatic
multiplyStatic
multiplyStatic
rotateStatic
scaleStatic
subtractStatic
translateStatic
viewif priority is not a valid number
The peek
function returns the top item in the priority queue without removing it.
The peek
function returns the top item in the priority queue without removing it.
The peekLast
function returns the last item in the heap.
The peekLast
function returns the last item in the heap.
The poll
function returns the top item from a priority queue or null if the queue is empty.Removes and returns an val with the highest priority in the queue
The poll
function returns the top item from a priority queue or null if the queue is empty.Removes and returns an val with the highest priority in the queue
The function sorts the elements in the priority queue and returns either the sorted items or their values depending @@ -424,7 +424,7 @@
The function sorts the elements in the priority queue and returns either the sorted items or their values depending @@ -444,7 +444,7 @@
The toArray
function returns an array of HeapItem<T>
objects.
The toArray
function returns an array of HeapItem<T>
objects.
Protected
_compareProtected
_fixProtected
_getProtected
_getProtected
_getProtected
_getProtected
_heapifyProtected
_heapifyProtected
_isProtected
_setProtected
_swapStatic
heapifyStatic
isif priority is not a valid number
The peek
function returns the top item in the priority queue without removing it.
The peek
function returns the top item in the priority queue without removing it.
The peekLast
function returns the last item in the heap.
The peekLast
function returns the last item in the heap.
The poll
function returns the top item from a priority queue or null if the queue is empty.Removes and returns an val with the highest priority in the queue
The poll
function returns the top item from a priority queue or null if the queue is empty.Removes and returns an val with the highest priority in the queue
The function sorts the elements in the priority queue and returns either the sorted items or their values depending @@ -425,7 +425,7 @@
The function sorts the elements in the priority queue and returns either the sorted items or their values depending @@ -445,7 +445,7 @@
The toArray
function returns an array of HeapItem<T>
objects.
The toArray
function returns an array of HeapItem<T>
objects.
Protected
_compareProtected
_fixProtected
_getProtected
_getProtected
_getProtected
_getProtected
_heapifyProtected
_heapifyProtected
_isProtected
_setProtected
_swapStatic
heapifyStatic
isProtected
_setProtected
_getProtected
_getProtected
_heapifyProtected
_heapifyProtected
_isProtected
_setProtected
_swapStatic
heapifyStatic
isStatic
fromImplementation of IRBTree.allGreaterNodesAdd
Inherited from BST.allGreaterNodesAdd
Overrides BST.createNode
Inherited from BST.getLeftMost
+The function getLeftMost
returns the leftmost node in a binary tree, starting from a specified node or the root if
@@ -1054,7 +1054,7 @@
Inherited from BST.getLeftMost
+Inherited from BST.getMinHeight
Inherited from BST.getPathToRoot
Inherited from BST.getPredecessor
Inherited from BST.getRightMost
+The getRightMost
function returns the rightmost node in a binary tree, either recursively or iteratively using tail
@@ -1207,7 +1207,7 @@
Inherited from BST.getRightMost
+Inherited from BST.getSubTreeSize
Implementation of IRBTree.isAVLBalanced
Inherited from BST.isAVLBalanced
Implementation of IRBTree.isPerfectlyBalanced
Inherited from BST.isPerfectlyBalanced
Implementation of IRBTree.isSubtreeBST
Inherited from BST.isSubtreeBST
Inherited from BST.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates properties of each node based on the specified property name.
@@ -1440,7 +1440,7 @@Inherited from BST.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates the 'val' property of each node.
@@ -1464,7 +1464,7 @@Inherited from BST.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates nodes themselves.
@@ -1488,7 +1488,7 @@Inherited from BST.levelIterative
+Inherited from BST.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1530,7 +1530,7 @@Inherited from BST.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1554,7 +1554,7 @@Inherited from BST.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1578,7 +1578,7 @@Inherited from BST.listLevels
+Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates properties of each node based on the specified property name.
@@ -1616,7 +1616,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates the 'val' property of each node.
@@ -1640,7 +1640,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates nodes themselves.
@@ -1664,7 +1664,7 @@Implementation of IRBTree.perfectlyBalance
Inherited from BST.perfectlyBalance
Implementation of IRBTree.subTreeAdd
Inherited from BST.subTreeAdd
Inherited from BST.subTreeSum
Inherited from BST.swapLocation
The insertAfter
function inserts a new node with a given value after an existing node in a singly linked list.
The insertBefore
function inserts a new value before an existing value in a singly linked list.
Static
fromStatic
fromProtected
_clearProtected
_compareProtected
_getProtected
_pushProtected
_setProtected
_setProtected
_setProtected
_setProtected
_setProtected
_setProtected
_setProtected
_setProtected
_updateImplementation of ITreeMultiset.add
Implementation of ITreeMultiset.allGreaterNodesAdd
Inherited from AVLTree.allGreaterNodesAdd
Implementation of ITreeMultiset.fill
Inherited from AVLTree.getLeftMost
+The function getLeftMost
returns the leftmost node in a binary tree, starting from a specified node or the root if
@@ -1352,7 +1352,7 @@
Inherited from AVLTree.getMinHeight
Inherited from AVLTree.getRightMost
+The getRightMost
function returns the rightmost node in a binary tree, either recursively or iteratively using tail
@@ -1534,7 +1534,7 @@
Inherited from AVLTree.getSubTreeSize
Implementation of ITreeMultiset.has
Implementation of ITreeMultiset.isAVLBalanced
Inherited from AVLTree.isAVLBalanced
Implementation of ITreeMultiset.isBST
Implementation of ITreeMultiset.isEmpty
Implementation of ITreeMultiset.isPerfectlyBalanced
Inherited from AVLTree.isPerfectlyBalanced
Implementation of ITreeMultiset.isSubtreeBST
Inherited from AVLTree.isSubtreeBST
Inherited from AVLTree.lastKey
Inherited from AVLTree.lesserSum
Inherited from AVLTree.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates properties of each node based on the specified property name.
@@ -1810,7 +1810,7 @@Inherited from AVLTree.levelIterative
+Performs a level-order traversal on a binary tree starting from the specified node and accumulates the 'val' property of each node.
@@ -1834,7 +1834,7 @@Performs a level-order traversal on a binary tree starting from the specified node and accumulates nodes themselves.
@@ -1858,7 +1858,7 @@Inherited from AVLTree.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1900,7 +1900,7 @@Inherited from AVLTree.listLevels
+Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1924,7 +1924,7 @@Collects nodes from a binary tree by a specified property and organizes them into levels.
@@ -1948,7 +1948,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates properties of each node based on the specified property name.
@@ -2009,7 +2009,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates the 'val' property of each node.
@@ -2033,7 +2033,7 @@Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates nodes themselves.
@@ -2057,7 +2057,7 @@Implementation of ITreeMultiset.perfectlyBalance
Overrides AVLTree.perfectlyBalance
Implementation of ITreeMultiset.subTreeAdd
Inherited from AVLTree.subTreeAdd
Inherited from AVLTree.subTreeSum
Overrides AbstractGraph.edgeSet
Overrides AbstractGraph.edgesOf
Overrides AbstractGraph.getEdge
Inherited from AbstractGraph.getMinPathBetween
Overrides AbstractGraph.getNeighbors
Implementation of IUNDirectedGraph.hasEdge
Inherited from AbstractGraph.hasEdge
Implementation of IUNDirectedGraph.hasVertex
Inherited from AbstractGraph.hasVertex
Implementation of IUNDirectedGraph.removeAllVertices
Inherited from AbstractGraph.removeAllVertices
Overrides AbstractGraph.removeEdge
Implementation of IUNDirectedGraph.removeVertex
Inherited from AbstractGraph.removeVertex
Implementation of IUNDirectedGraph.setEdgeWeight
Inherited from AbstractGraph.setEdgeWeight
Static
addStatic
angleStatic
distanceStatic
distanceStatic
divideStatic
dotStatic
equalsStatic
equalsStatic
multiplyStatic
normalizeStatic
perpStatic
randomStatic
reverseStatic
signStatic
subtractStatic
subtractStatic
truncate
Performs a breadth-first search (BFS) on a binary tree, accumulating properties of each node based on the specified property name.
@@ -258,7 +258,7 @@Returns numberImplementation of IAVLTree.BFSDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:936
BFS(nodeOrPropertyName): N["val"][]
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1518
Visited Id
Inherited from BST.BFS
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:932
+Performs a breadth-first search (BFS) on a binary tree, accumulating the 'val' property of each node.
@@ -277,7 +277,7 @@Returns IAVLTree.BFSDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:943
BFS(nodeOrPropertyName): N[]
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1507
Size
Inherited from BST.BFS
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:939
+Performs a breadth-first search (BFS) on a binary tree, accumulating nodes themselves.
@@ -296,7 +296,7 @@Returns IAVLTree.BFSDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:950
DFS(pattern?, nodeOrPropertyName?): number[]
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1466
Root
Inherited from BST.BFS
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:946
+DFS
@@ -310,7 +310,7 @@
Returns numberImplementation of IAVLTree.DFS- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:980
Inherited from BST.DFS
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:976
+Performs a depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on the specified property name.
@@ -334,7 +334,7 @@Returns numberImplementation of IAVLTree.DFSDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:988
DFS(pattern?, nodeOrPropertyName?): N[]
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1615
By Property Name Stop Or Not
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1548
Loop Type
Inherited from BST.DFS
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:984
+Performs a depth-first search (DFS) traversal on a binary tree and accumulates the 'val' property of each node.
@@ -358,7 +358,7 @@Returns IAVLTree.DFSDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:996
DFS(pattern?, nodeOrPropertyName?): N[]
+Defined in src/data-structures/binary-tree/bst.ts:529
Result By Property Name
Inherited from BST.DFS
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:992
+Performs a depth-first search (DFS) traversal on a binary tree and accumulates nodes themselves.
@@ -382,7 +382,7 @@Returns IAVLTree.DFSDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:1004
DFSIterative(pattern?, nodeOrPropertyName?): number[]
Defined in src/data-structures/binary-tree/avl-tree.ts:155
+Defined in src/data-structures/binary-tree/avl-tree.ts:185
Path
+Defined in src/data-structures/binary-tree/avl-tree.ts:112
+Defined in src/data-structures/binary-tree/avl-tree.ts:268
+Defined in src/data-structures/binary-tree/avl-tree.ts:233
Results
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1526
Inherited from BST.DFS
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1000
+DFSIterative
@@ -396,7 +396,7 @@
Returns numberImplementation of IAVLTree.DFSIterative- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1047
Inherited from BST.DFSIterative
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1043
+Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on the specified property name.
@@ -420,7 +420,7 @@Returns numberImplementation of IAVLTree.DFSIterativeDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:1055
DFSIterative(pattern?, nodeOrPropertyName?): N[]
+Defined in src/data-structures/binary-tree/avl-tree.ts:84
+Inherited from BST.DFSIterative
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1051
+Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates the 'val' property of each node.
@@ -444,7 +444,7 @@Returns IAVLTree.DFSIterativeDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:1063
DFSIterative(pattern?, nodeOrPropertyName?): N[]
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1584
To
+Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1438
Factor
Inherited from BST.DFSIterative
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1059
+Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates nodes themselves.
@@ -468,7 +468,7 @@Returns IAVLTree.DFSIterativeDefined in src/data-structures/binary-tree/abstract-binary-tree.ts:1071
By Property Name
Inherited from BST.DFSIterative
-- Defined in src/data-structures/binary-tree/abstract-binary-tree.ts:1067
+Protected
_accumulated@@ -495,7 +495,7 @@
Returns void
Protected
_add@@ -525,7 +525,7 @@
Returns undefined
Protected
_balance@@ -546,7 +546,7 @@
Returns number
Protected
_balanceLL@@ -565,7 +565,7 @@
A: Returns void
Protected
_balanceLR@@ -584,7 +584,7 @@
A: Returns void
Protected
_balance@@ -604,7 +604,7 @@
node: Returns void
Protected
_balanceRL@@ -623,7 +623,7 @@
A: Returns void
Protected
_balanceRR@@ -642,7 +642,7 @@
A: Returns void
Protected
_clear@@ -655,7 +655,7 @@
Returns void
Protected
_compare@@ -683,7 +683,7 @@
Returns
Protected
_get@@ -706,7 +706,7 @@
Returns
Protected
_push@@ -753,7 +753,7 @@
Returns undefined
Protected
_set@@ -773,7 +773,7 @@
Returns void
Protected
_set@@ -794,7 +794,7 @@
Returns void
Protected
_set@@ -814,7 +814,7 @@
Returns void
Protected
_set@@ -834,7 +834,7 @@
Returns void