data-structure-typed 1.18.0 → 1.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -66
- package/backup/recursive-type/src/assets/complexities-diff.jpg +0 -0
- package/backup/recursive-type/src/assets/data-structure-complexities.jpg +0 -0
- package/backup/recursive-type/src/assets/logo.png +0 -0
- package/backup/recursive-type/src/assets/overview-diagram-of-data-structures.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/aa-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/avl-tree.ts +288 -0
- package/backup/recursive-type/src/data-structures/binary-tree/b-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-indexed-tree.ts +78 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-tree.ts +1502 -0
- package/backup/recursive-type/src/data-structures/binary-tree/bst.ts +503 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/avl-tree-inserting.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/bst-rotation.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/segment-tree.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/index.ts +11 -0
- package/backup/recursive-type/src/data-structures/binary-tree/rb-tree.ts +110 -0
- package/backup/recursive-type/src/data-structures/binary-tree/segment-tree.ts +243 -0
- package/backup/recursive-type/src/data-structures/binary-tree/splay-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/tree-multiset.ts +55 -0
- package/backup/recursive-type/src/data-structures/binary-tree/two-three-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/diagrams/README.md +5 -0
- package/backup/recursive-type/src/data-structures/graph/abstract-graph.ts +985 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/dfs-can-do.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/max-flow.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/mst.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-articulation-point-bridge.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-complicate-simple.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-strongly-connected-component.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.mp4 +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.webp +0 -0
- package/backup/recursive-type/src/data-structures/graph/directed-graph.ts +478 -0
- package/backup/recursive-type/src/data-structures/graph/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/graph/undirected-graph.ts +293 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-map.ts +67 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-set.ts +56 -0
- package/backup/recursive-type/src/data-structures/hash/hash-table.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/index.ts +6 -0
- package/backup/recursive-type/src/data-structures/hash/pair.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-map.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-set.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/heap.ts +176 -0
- package/backup/recursive-type/src/data-structures/heap/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/max-heap.ts +31 -0
- package/backup/recursive-type/src/data-structures/heap/min-heap.ts +34 -0
- package/backup/recursive-type/src/data-structures/index.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/abstract-graph.ts +42 -0
- package/backup/recursive-type/src/data-structures/interfaces/avl-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/binary-tree.ts +56 -0
- package/backup/recursive-type/src/data-structures/interfaces/bst.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/directed-graph.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/heap.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/index.ts +13 -0
- package/backup/recursive-type/src/data-structures/interfaces/navigator.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/priority-queue.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/undirected-graph.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/doubly-linked-list.ts +573 -0
- package/backup/recursive-type/src/data-structures/linked-list/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/singly-linked-list.ts +490 -0
- package/backup/recursive-type/src/data-structures/linked-list/skip-linked-list.ts +3 -0
- package/backup/recursive-type/src/data-structures/matrix/index.ts +4 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix.ts +27 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix2d.ts +208 -0
- package/backup/recursive-type/src/data-structures/matrix/navigator.ts +122 -0
- package/backup/recursive-type/src/data-structures/matrix/vector2d.ts +316 -0
- package/backup/recursive-type/src/data-structures/priority-queue/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/priority-queue/max-priority-queue.ts +49 -0
- package/backup/recursive-type/src/data-structures/priority-queue/min-priority-queue.ts +50 -0
- package/backup/recursive-type/src/data-structures/priority-queue/priority-queue.ts +354 -0
- package/backup/recursive-type/src/data-structures/queue/deque.ts +251 -0
- package/backup/recursive-type/src/data-structures/queue/index.ts +2 -0
- package/backup/recursive-type/src/data-structures/queue/queue.ts +120 -0
- package/backup/recursive-type/src/data-structures/stack/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/stack/stack.ts +98 -0
- package/backup/recursive-type/src/data-structures/tree/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/tree/tree.ts +80 -0
- package/backup/recursive-type/src/data-structures/trie/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/trie/trie.ts +227 -0
- package/backup/recursive-type/src/data-structures/types/abstract-graph.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/avl-tree.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/binary-tree.ts +10 -0
- package/backup/recursive-type/src/data-structures/types/bst.ts +6 -0
- package/backup/recursive-type/src/data-structures/types/directed-graph.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/heap.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/index.ts +12 -0
- package/backup/recursive-type/src/data-structures/types/navigator.ts +13 -0
- package/backup/recursive-type/src/data-structures/types/priority-queue.ts +9 -0
- package/backup/recursive-type/src/data-structures/types/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/index.ts +1 -0
- package/backup/recursive-type/src/utils/index.ts +2 -0
- package/backup/recursive-type/src/utils/types/index.ts +1 -0
- package/backup/recursive-type/src/utils/types/utils.ts +6 -0
- package/backup/recursive-type/src/utils/utils.ts +78 -0
- package/dist/data-structures/binary-tree/avl-tree.d.ts +19 -25
- package/dist/data-structures/binary-tree/avl-tree.js +8 -16
- package/dist/data-structures/binary-tree/binary-tree.d.ts +99 -98
- package/dist/data-structures/binary-tree/binary-tree.js +70 -65
- package/dist/data-structures/binary-tree/bst.d.ts +21 -21
- package/dist/data-structures/binary-tree/bst.js +15 -17
- package/dist/data-structures/binary-tree/rb-tree.d.ts +1 -2
- package/dist/data-structures/binary-tree/rb-tree.js +68 -5
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +9 -8
- package/dist/data-structures/binary-tree/tree-multiset.js +7 -6
- package/dist/data-structures/graph/abstract-graph.d.ts +56 -58
- package/dist/data-structures/graph/abstract-graph.js +84 -68
- package/dist/data-structures/graph/directed-graph.d.ts +127 -96
- package/dist/data-structures/graph/directed-graph.js +161 -109
- package/dist/data-structures/graph/undirected-graph.d.ts +82 -59
- package/dist/data-structures/graph/undirected-graph.js +99 -72
- package/dist/data-structures/hash/coordinate-set.d.ts +1 -1
- package/dist/data-structures/index.d.ts +1 -0
- package/dist/data-structures/index.js +1 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +22 -0
- package/dist/data-structures/interfaces/abstract-graph.js +2 -0
- package/dist/data-structures/interfaces/avl-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/avl-tree.js +2 -0
- package/dist/data-structures/interfaces/binary-tree.d.ts +27 -0
- package/dist/data-structures/interfaces/binary-tree.js +2 -0
- package/dist/data-structures/interfaces/bst.d.ts +1 -0
- package/dist/data-structures/interfaces/bst.js +2 -0
- package/dist/data-structures/interfaces/directed-graph.d.ts +9 -0
- package/dist/data-structures/interfaces/directed-graph.js +2 -0
- package/dist/data-structures/interfaces/doubly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/doubly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/heap.d.ts +1 -0
- package/dist/data-structures/interfaces/heap.js +2 -0
- package/dist/data-structures/interfaces/index.d.ts +13 -0
- package/dist/data-structures/interfaces/index.js +29 -0
- package/dist/data-structures/interfaces/navigator.d.ts +1 -0
- package/dist/data-structures/interfaces/navigator.js +2 -0
- package/dist/data-structures/interfaces/priority-queue.d.ts +1 -0
- package/dist/data-structures/interfaces/priority-queue.js +2 -0
- package/dist/data-structures/interfaces/segment-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/segment-tree.js +2 -0
- package/dist/data-structures/interfaces/singly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/singly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/tree-multiset.d.ts +1 -0
- package/dist/data-structures/interfaces/tree-multiset.js +2 -0
- package/dist/data-structures/interfaces/undirected-graph.d.ts +2 -0
- package/dist/data-structures/interfaces/undirected-graph.js +2 -0
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +1 -1
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.js +4 -4
- package/dist/data-structures/queue/deque.d.ts +5 -5
- package/dist/data-structures/queue/deque.js +6 -6
- package/dist/data-structures/queue/queue.d.ts +1 -1
- package/dist/data-structures/stack/stack.d.ts +1 -1
- package/dist/data-structures/types/abstract-graph.d.ts +1 -20
- package/dist/data-structures/types/avl-tree.d.ts +5 -4
- package/dist/data-structures/types/binary-tree.d.ts +6 -5
- package/dist/data-structures/types/bst.d.ts +4 -3
- package/dist/data-structures/types/directed-graph.d.ts +5 -9
- package/dist/data-structures/types/directed-graph.js +7 -0
- package/dist/data-structures/types/heap.d.ts +2 -2
- package/dist/data-structures/types/index.d.ts +0 -1
- package/dist/data-structures/types/index.js +0 -1
- package/dist/data-structures/types/navigator.d.ts +2 -2
- package/dist/data-structures/types/priority-queue.d.ts +2 -2
- package/dist/data-structures/types/tree-multiset.d.ts +3 -4
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +288 -287
- package/docs/classes/AVLTreeNode.html +106 -63
- package/docs/classes/AaTree.html +14 -12
- package/docs/classes/AbstractEdge.html +68 -34
- package/docs/classes/AbstractGraph.html +219 -114
- package/docs/classes/AbstractVertex.html +71 -30
- package/docs/classes/ArrayDeque.html +27 -25
- package/docs/classes/BST.html +279 -273
- package/docs/classes/BSTNode.html +106 -57
- package/docs/classes/BTree.html +14 -12
- package/docs/classes/BinaryIndexedTree.html +22 -20
- package/docs/classes/BinaryTree.html +283 -277
- package/docs/classes/BinaryTreeNode.html +111 -63
- package/docs/classes/Character.html +17 -15
- package/docs/classes/CoordinateMap.html +22 -20
- package/docs/classes/CoordinateSet.html +23 -21
- package/docs/classes/Deque.html +47 -45
- package/docs/classes/DirectedEdge.html +74 -41
- package/docs/classes/DirectedGraph.html +444 -208
- package/docs/classes/DirectedVertex.html +63 -36
- package/docs/classes/DoublyLinkedList.html +52 -50
- package/docs/classes/DoublyLinkedListNode.html +24 -22
- package/docs/classes/HashTable.html +14 -12
- package/docs/classes/Heap.html +29 -27
- package/docs/classes/HeapItem.html +21 -19
- package/docs/classes/Matrix2D.html +29 -27
- package/docs/classes/MatrixNTI2D.html +17 -15
- package/docs/classes/MaxHeap.html +29 -27
- package/docs/classes/MaxPriorityQueue.html +67 -60
- package/docs/classes/MinHeap.html +29 -27
- package/docs/classes/MinPriorityQueue.html +67 -60
- package/docs/classes/Navigator.html +24 -22
- package/docs/classes/ObjectDeque.html +62 -50
- package/docs/classes/Pair.html +14 -12
- package/docs/classes/PriorityQueue.html +62 -55
- package/docs/classes/Queue.html +29 -27
- package/docs/classes/SegmentTree.html +30 -28
- package/docs/classes/SegmentTreeNode.html +33 -31
- package/docs/classes/SinglyLinkedList.html +49 -47
- package/docs/classes/SinglyLinkedListNode.html +21 -19
- package/docs/classes/SkipLinkedList.html +14 -12
- package/docs/classes/SplayTree.html +14 -12
- package/docs/classes/Stack.html +27 -25
- package/docs/classes/TreeMap.html +14 -12
- package/docs/classes/TreeMultiSet.html +277 -270
- package/docs/classes/TreeNode.html +29 -27
- package/docs/classes/TreeSet.html +14 -12
- package/docs/classes/Trie.html +26 -24
- package/docs/classes/TrieNode.html +24 -22
- package/docs/classes/TwoThreeTree.html +14 -12
- package/docs/classes/UndirectedEdge.html +70 -51
- package/docs/classes/UndirectedGraph.html +344 -161
- package/docs/classes/UndirectedVertex.html +63 -36
- package/docs/classes/Vector2D.html +41 -39
- package/docs/enums/CP.html +17 -15
- package/docs/enums/FamilyPosition.html +17 -15
- package/docs/enums/LoopType.html +16 -14
- package/docs/{interfaces/AVLTreeDeleted.html → enums/TopologicalProperty.html} +43 -43
- package/docs/index.html +195 -68
- package/docs/interfaces/{HeapOptions.html → IBinaryTree.html} +39 -32
- package/docs/interfaces/IBinaryTreeNode.html +383 -0
- package/docs/interfaces/IDirectedGraph.html +20 -18
- package/docs/interfaces/IGraph.html +118 -88
- package/docs/interfaces/{PriorityQueueOptions.html → IUNDirectedGraph.html} +22 -53
- package/docs/modules.html +25 -21
- package/docs/types/{ToThunkFn.html → AVLTreeDeleted.html} +27 -21
- package/docs/types/BSTComparator.html +14 -12
- package/docs/types/BSTDeletedResult.html +19 -17
- package/docs/types/BinaryTreeDeleted.html +19 -17
- package/docs/types/BinaryTreeNodeId.html +14 -12
- package/docs/types/BinaryTreeNodePropertyName.html +14 -12
- package/docs/types/DFSOrderPattern.html +14 -12
- package/docs/types/DijkstraResult.html +14 -12
- package/docs/types/Direction.html +14 -12
- package/docs/types/{TrlFn.html → EdgeId.html} +18 -29
- package/docs/types/{TrlAsyncFn.html → HeapOptions.html} +29 -19
- package/docs/types/NavigatorParams.html +164 -0
- package/docs/types/NodeOrPropertyName.html +14 -12
- package/docs/types/PriorityQueueComparator.html +14 -12
- package/docs/types/PriorityQueueDFSOrderPattern.html +14 -12
- package/docs/types/{SpecifyOptional.html → PriorityQueueOptions.html} +28 -19
- package/docs/types/RecursiveAVLTreeNode.html +135 -0
- package/docs/types/{Thunk.html → RecursiveBSTNode.html} +23 -24
- package/docs/types/RecursiveBinaryTreeNode.html +135 -0
- package/docs/types/ResultByProperty.html +17 -15
- package/docs/types/ResultsByProperty.html +17 -15
- package/docs/types/SegmentTreeNodeVal.html +14 -12
- package/docs/types/TopologicalStatus.html +14 -12
- package/docs/types/TreeMultiSetDeletedResult.html +19 -17
- package/docs/types/Turning.html +14 -12
- package/docs/types/VertexId.html +14 -12
- package/notes/note.md +8 -1
- package/package.json +10 -2
- package/docs/classes/RBTree.html +0 -153
- package/docs/interfaces/NavigatorParams.html +0 -200
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
<h4>Type Parameters</h4>
|
|
20
20
|
<ul class="tsd-type-parameter-list">
|
|
21
21
|
<li>
|
|
22
|
-
<h4><span class="tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol"> extends </span><a href="DirectedVertex.html" class="tsd-signature-type tsd-kind-class">DirectedVertex</a></h4></li>
|
|
22
|
+
<h4><span class="tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol"> extends </span><a href="DirectedVertex.html" class="tsd-signature-type tsd-kind-class">DirectedVertex</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li>
|
|
23
23
|
<li>
|
|
24
|
-
<h4><span class="tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol"> extends </span><a href="DirectedEdge.html" class="tsd-signature-type tsd-kind-class">DirectedEdge</a></h4></li></ul></section>
|
|
24
|
+
<h4><span class="tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol"> extends </span><a href="DirectedEdge.html" class="tsd-signature-type tsd-kind-class">DirectedEdge</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
25
25
|
<section class="tsd-panel tsd-hierarchy">
|
|
26
26
|
<h4>Hierarchy</h4>
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<ul class="tsd-hierarchy">
|
|
34
34
|
<li><a href="../interfaces/IDirectedGraph.html" class="tsd-signature-type tsd-kind-interface">IDirectedGraph</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">></span></li></ul></section><aside class="tsd-sources">
|
|
35
35
|
<ul>
|
|
36
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
36
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L77">src/data-structures/graph/directed-graph.ts:77</a></li></ul></aside>
|
|
37
37
|
<section class="tsd-panel-group tsd-index-group">
|
|
38
38
|
<section class="tsd-panel tsd-index-panel">
|
|
39
39
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -45,15 +45,31 @@
|
|
|
45
45
|
</div></section>
|
|
46
46
|
<section class="tsd-index-section">
|
|
47
47
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
48
|
-
<div class="tsd-index-list"><a href="DirectedGraph.html#
|
|
49
|
-
<a href="DirectedGraph.html#
|
|
50
|
-
<a href="DirectedGraph.html#
|
|
48
|
+
<div class="tsd-index-list"><a href="DirectedGraph.html#_edgeConstructor" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>_edge<wbr/>Constructor</span></a>
|
|
49
|
+
<a href="DirectedGraph.html#_inEdgeMap" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_in<wbr/>Edge<wbr/>Map</span></a>
|
|
50
|
+
<a href="DirectedGraph.html#_outEdgeMap" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_out<wbr/>Edge<wbr/>Map</span></a>
|
|
51
|
+
<a href="DirectedGraph.html#_vertexConstructor" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_vertex<wbr/>Constructor</span></a>
|
|
52
|
+
</div></section>
|
|
53
|
+
<section class="tsd-index-section">
|
|
54
|
+
<h3 class="tsd-index-heading">Accessors</h3>
|
|
55
|
+
<div class="tsd-index-list"><a href="DirectedGraph.html#inEdgeMap" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>in<wbr/>Edge<wbr/>Map</span></a>
|
|
56
|
+
<a href="DirectedGraph.html#outEdgeMap" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>out<wbr/>Edge<wbr/>Map</span></a>
|
|
57
|
+
<a href="DirectedGraph.html#vertices" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>vertices</span></a>
|
|
51
58
|
</div></section>
|
|
52
59
|
<section class="tsd-index-section">
|
|
53
60
|
<h3 class="tsd-index-heading">Methods</h3>
|
|
54
|
-
<div class="tsd-index-list"><a href="DirectedGraph.html#
|
|
61
|
+
<div class="tsd-index-list"><a href="DirectedGraph.html#_createEdge" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g></svg><span>_create<wbr/>Edge</span></a>
|
|
62
|
+
<a href="DirectedGraph.html#_createVertex" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Vertex</span></a>
|
|
63
|
+
<a href="DirectedGraph.html#_getVertex" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Vertex</span></a>
|
|
64
|
+
<a href="DirectedGraph.html#_getVertexId" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Vertex<wbr/>Id</span></a>
|
|
65
|
+
<a href="DirectedGraph.html#_setInEdgeMap" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>In<wbr/>Edge<wbr/>Map</span></a>
|
|
66
|
+
<a href="DirectedGraph.html#_setOutEdgeMap" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Out<wbr/>Edge<wbr/>Map</span></a>
|
|
67
|
+
<a href="DirectedGraph.html#_setVertices" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Vertices</span></a>
|
|
68
|
+
<a href="DirectedGraph.html#addEdge" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Edge</span></a>
|
|
55
69
|
<a href="DirectedGraph.html#addVertex" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Vertex</span></a>
|
|
56
70
|
<a href="DirectedGraph.html#bellmanFord" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>bellman<wbr/>Ford</span></a>
|
|
71
|
+
<a href="DirectedGraph.html#createAddEdge" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Add<wbr/>Edge</span></a>
|
|
72
|
+
<a href="DirectedGraph.html#createAddVertex" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Add<wbr/>Vertex</span></a>
|
|
57
73
|
<a href="DirectedGraph.html#degreeOf" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>degree<wbr/>Of</span></a>
|
|
58
74
|
<a href="DirectedGraph.html#dijkstra" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>dijkstra</span></a>
|
|
59
75
|
<a href="DirectedGraph.html#dijkstraWithoutHeap" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>dijkstra<wbr/>Without<wbr/>Heap</span></a>
|
|
@@ -71,7 +87,6 @@
|
|
|
71
87
|
<a href="DirectedGraph.html#getNeighbors" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Neighbors</span></a>
|
|
72
88
|
<a href="DirectedGraph.html#getPathSumWeight" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>Sum<wbr/>Weight</span></a>
|
|
73
89
|
<a href="DirectedGraph.html#getVertex" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Vertex</span></a>
|
|
74
|
-
<a href="DirectedGraph.html#getVertexId" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Vertex<wbr/>Id</span></a>
|
|
75
90
|
<a href="DirectedGraph.html#hasEdge" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has<wbr/>Edge</span></a>
|
|
76
91
|
<a href="DirectedGraph.html#hasVertex" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has<wbr/>Vertex</span></a>
|
|
77
92
|
<a href="DirectedGraph.html#inDegreeOf" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>in<wbr/>Degree<wbr/>Of</span></a>
|
|
@@ -86,91 +101,305 @@
|
|
|
86
101
|
<a href="DirectedGraph.html#setEdgeWeight" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>set<wbr/>Edge<wbr/>Weight</span></a>
|
|
87
102
|
<a href="DirectedGraph.html#tarjan" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>tarjan</span></a>
|
|
88
103
|
<a href="DirectedGraph.html#topologicalSort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>topological<wbr/>Sort</span></a>
|
|
89
|
-
<a href="DirectedGraph.html#vertexSet" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>vertex<wbr/>Set</span></a>
|
|
90
104
|
</div></section></div></details></section></section>
|
|
91
105
|
<section class="tsd-panel-group tsd-member-group">
|
|
92
106
|
<h2>Constructors</h2>
|
|
93
107
|
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
94
108
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
|
|
95
109
|
<ul class="tsd-signatures">
|
|
96
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_DirectedGraph"><span class="tsd-kind-constructor-signature">new <wbr/>Directed<wbr/>Graph</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DirectedGraph.html" class="tsd-signature-type tsd-kind-class">DirectedGraph</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">></span><a href="#constructor.new_DirectedGraph" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
110
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_DirectedGraph"><span class="tsd-kind-constructor-signature">new <wbr/>Directed<wbr/>Graph</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexConstructor</span>, <span class="tsd-kind-parameter">edgeConstructor</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DirectedGraph.html" class="tsd-signature-type tsd-kind-class">DirectedGraph</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">></span><a href="#constructor.new_DirectedGraph" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
97
111
|
<li class="tsd-description">
|
|
98
112
|
<section class="tsd-panel">
|
|
99
113
|
<h4>Type Parameters</h4>
|
|
100
114
|
<ul class="tsd-type-parameter-list">
|
|
101
115
|
<li>
|
|
102
|
-
<h4><span class="tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol"> extends </span><a href="DirectedVertex.html" class="tsd-signature-type tsd-kind-class">DirectedVertex</a></h4></li>
|
|
116
|
+
<h4><span class="tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol"> extends </span><a href="DirectedVertex.html" class="tsd-signature-type tsd-kind-class">DirectedVertex</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li>
|
|
117
|
+
<li>
|
|
118
|
+
<h4><span class="tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol"> extends </span><a href="DirectedEdge.html" class="tsd-signature-type tsd-kind-class">DirectedEdge</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
119
|
+
<div class="tsd-parameters">
|
|
120
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
121
|
+
<ul class="tsd-parameter-list">
|
|
122
|
+
<li>
|
|
123
|
+
<h5><span class="tsd-kind-parameter">vertexConstructor</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">)</span></h5>
|
|
124
|
+
<ul class="tsd-parameters">
|
|
125
|
+
<li class="tsd-parameter-signature">
|
|
126
|
+
<ul class="tsd-signatures">
|
|
127
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></li>
|
|
128
|
+
<li class="tsd-description">
|
|
129
|
+
<div class="tsd-parameters">
|
|
130
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
131
|
+
<ul class="tsd-parameter-list">
|
|
132
|
+
<li>
|
|
133
|
+
<h5><span class="tsd-kind-parameter">id</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li>
|
|
134
|
+
<li>
|
|
135
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5></li></ul></div>
|
|
136
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4></li></ul></li></ul></li>
|
|
137
|
+
<li>
|
|
138
|
+
<h5><span class="tsd-kind-parameter">edgeConstructor</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">src</span>, <span class="tsd-kind-parameter">dest</span>, <span class="tsd-kind-parameter">weight</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">)</span></h5>
|
|
139
|
+
<ul class="tsd-parameters">
|
|
140
|
+
<li class="tsd-parameter-signature">
|
|
141
|
+
<ul class="tsd-signatures">
|
|
142
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">src</span>, <span class="tsd-kind-parameter">dest</span>, <span class="tsd-kind-parameter">weight</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></li>
|
|
143
|
+
<li class="tsd-description">
|
|
144
|
+
<div class="tsd-parameters">
|
|
145
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
146
|
+
<ul class="tsd-parameter-list">
|
|
147
|
+
<li>
|
|
148
|
+
<h5><span class="tsd-kind-parameter">src</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li>
|
|
149
|
+
<li>
|
|
150
|
+
<h5><span class="tsd-kind-parameter">dest</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li>
|
|
151
|
+
<li>
|
|
152
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">weight</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
103
153
|
<li>
|
|
104
|
-
<
|
|
154
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5></li></ul></div>
|
|
155
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4></li></ul></li></ul></li></ul></div>
|
|
105
156
|
<h4 class="tsd-returns-title">Returns <a href="DirectedGraph.html" class="tsd-signature-type tsd-kind-class">DirectedGraph</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
106
157
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#constructor">constructor</a></p>
|
|
107
158
|
<ul>
|
|
108
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
159
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L81">src/data-structures/graph/directed-graph.ts:81</a></li></ul></aside></li></ul></section></section>
|
|
109
160
|
<section class="tsd-panel-group tsd-member-group">
|
|
110
161
|
<h2>Properties</h2>
|
|
111
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
112
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
162
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_edgeConstructor" class="tsd-anchor"></a>
|
|
163
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>_edge<wbr/>Constructor</span><a href="#_edgeConstructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
164
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_edge<wbr/>Constructor</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">src</span>, <span class="tsd-kind-parameter">dest</span>, <span class="tsd-kind-parameter">weight</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">)</span></div>
|
|
165
|
+
<div class="tsd-type-declaration">
|
|
166
|
+
<h4>Type declaration</h4>
|
|
167
|
+
<ul class="tsd-parameters">
|
|
168
|
+
<li class="tsd-parameter-signature">
|
|
169
|
+
<ul class="tsd-signatures">
|
|
170
|
+
<li class="tsd-signature" id="_edgeConstructor.__type.new__edgeConstructor"><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">src</span>, <span class="tsd-kind-parameter">dest</span>, <span class="tsd-kind-parameter">weight</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></li>
|
|
171
|
+
<li class="tsd-description">
|
|
172
|
+
<div class="tsd-parameters">
|
|
173
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
174
|
+
<ul class="tsd-parameter-list">
|
|
175
|
+
<li>
|
|
176
|
+
<h5><span class="tsd-kind-parameter">src</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li>
|
|
177
|
+
<li>
|
|
178
|
+
<h5><span class="tsd-kind-parameter">dest</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li>
|
|
179
|
+
<li>
|
|
180
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">weight</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
181
|
+
<li>
|
|
182
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5></li></ul></div>
|
|
183
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
|
|
184
|
+
<ul>
|
|
185
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L79">src/data-structures/graph/directed-graph.ts:79</a></li></ul></aside></section>
|
|
186
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_inEdgeMap" class="tsd-anchor"></a>
|
|
187
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_in<wbr/>Edge<wbr/>Map</span><a href="#_inEdgeMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
113
188
|
<div class="tsd-signature"><span class="tsd-kind-property">_in<wbr/>Edge<wbr/>Map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
114
189
|
<ul>
|
|
115
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
116
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
117
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
190
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L93">src/data-structures/graph/directed-graph.ts:93</a></li></ul></aside></section>
|
|
191
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_outEdgeMap" class="tsd-anchor"></a>
|
|
192
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_out<wbr/>Edge<wbr/>Map</span><a href="#_outEdgeMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
118
193
|
<div class="tsd-signature"><span class="tsd-kind-property">_out<wbr/>Edge<wbr/>Map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
119
194
|
<ul>
|
|
120
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
121
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
122
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
123
|
-
<div class="tsd-signature"><span class="tsd-kind-property">
|
|
124
|
-
<
|
|
195
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L87">src/data-structures/graph/directed-graph.ts:87</a></li></ul></aside></section>
|
|
196
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_vertexConstructor" class="tsd-anchor"></a>
|
|
197
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>_vertex<wbr/>Constructor</span><a href="#_vertexConstructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
198
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_vertex<wbr/>Constructor</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">)</span></div>
|
|
199
|
+
<div class="tsd-type-declaration">
|
|
200
|
+
<h4>Type declaration</h4>
|
|
201
|
+
<ul class="tsd-parameters">
|
|
202
|
+
<li class="tsd-parameter-signature">
|
|
203
|
+
<ul class="tsd-signatures">
|
|
204
|
+
<li class="tsd-signature" id="_vertexConstructor.__type-1.new__vertexConstructor"><span class="tsd-signature-symbol">new </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></li>
|
|
205
|
+
<li class="tsd-description">
|
|
206
|
+
<div class="tsd-parameters">
|
|
207
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
208
|
+
<ul class="tsd-parameter-list">
|
|
209
|
+
<li>
|
|
210
|
+
<h5><span class="tsd-kind-parameter">id</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li>
|
|
211
|
+
<li>
|
|
212
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5></li></ul></div>
|
|
213
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
|
|
125
214
|
<ul>
|
|
126
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
215
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L78">src/data-structures/graph/directed-graph.ts:78</a></li></ul></aside></section></section>
|
|
216
|
+
<section class="tsd-panel-group tsd-member-group">
|
|
217
|
+
<h2>Accessors</h2>
|
|
218
|
+
<section class="tsd-panel tsd-member"><a id="inEdgeMap" class="tsd-anchor"></a>
|
|
219
|
+
<h3 class="tsd-anchor-link"><span>in<wbr/>Edge<wbr/>Map</span><a href="#inEdgeMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
220
|
+
<ul class="tsd-signatures">
|
|
221
|
+
<li class="tsd-signature" id="inEdgeMap.inEdgeMap-1"><span class="tsd-signature-symbol">get</span> inEdgeMap<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
|
|
222
|
+
<li class="tsd-description">
|
|
223
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
224
|
+
<ul>
|
|
225
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L95">src/data-structures/graph/directed-graph.ts:95</a></li></ul></aside></li></ul></section>
|
|
226
|
+
<section class="tsd-panel tsd-member"><a id="outEdgeMap" class="tsd-anchor"></a>
|
|
227
|
+
<h3 class="tsd-anchor-link"><span>out<wbr/>Edge<wbr/>Map</span><a href="#outEdgeMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
228
|
+
<ul class="tsd-signatures">
|
|
229
|
+
<li class="tsd-signature" id="outEdgeMap.outEdgeMap-1"><span class="tsd-signature-symbol">get</span> outEdgeMap<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
|
|
230
|
+
<li class="tsd-description">
|
|
231
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
232
|
+
<ul>
|
|
233
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L89">src/data-structures/graph/directed-graph.ts:89</a></li></ul></aside></li></ul></section>
|
|
234
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="vertices" class="tsd-anchor"></a>
|
|
235
|
+
<h3 class="tsd-anchor-link"><span>vertices</span><a href="#vertices" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
236
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
237
|
+
<li class="tsd-signature" id="vertices.vertices-1"><span class="tsd-signature-symbol">get</span> vertices<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">></span></li>
|
|
238
|
+
<li class="tsd-description">
|
|
239
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
240
|
+
<p>Inherited from AbstractGraph.vertices</p>
|
|
241
|
+
<ul>
|
|
242
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L102">src/data-structures/graph/abstract-graph.ts:102</a></li></ul></aside></li></ul></section></section>
|
|
127
243
|
<section class="tsd-panel-group tsd-member-group">
|
|
128
244
|
<h2>Methods</h2>
|
|
245
|
+
<section class="tsd-panel tsd-member"><a id="_createEdge" class="tsd-anchor"></a>
|
|
246
|
+
<h3 class="tsd-anchor-link"><span>_create<wbr/>Edge</span><a href="#_createEdge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
247
|
+
<ul class="tsd-signatures">
|
|
248
|
+
<li class="tsd-signature tsd-anchor-link" id="_createEdge._createEdge-1"><span class="tsd-kind-call-signature">_create<wbr/>Edge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">src</span>, <span class="tsd-kind-parameter">dest</span>, <span class="tsd-kind-parameter">weight</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><a href="#_createEdge._createEdge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
249
|
+
<li class="tsd-description">
|
|
250
|
+
<div class="tsd-comment tsd-typography"><p>In TypeScript, a subclass inherits the interface implementation of its parent class, without needing to implement the same interface again in the subclass. This behavior differs from Java's approach. In Java, if a parent class implements an interface, the subclass needs to explicitly implement the same interface, even if the parent class has already implemented it.
|
|
251
|
+
This means that using abstract methods in the parent class cannot constrain the grandchild classes. Defining methods within an interface also cannot constrain the descendant classes. When inheriting from this class, developers need to be aware that this method needs to be overridden.</p>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="tsd-parameters">
|
|
254
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
255
|
+
<ul class="tsd-parameter-list">
|
|
256
|
+
<li>
|
|
257
|
+
<h5><span class="tsd-kind-parameter">src</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5>
|
|
258
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
259
|
+
<li>
|
|
260
|
+
<h5><span class="tsd-kind-parameter">dest</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5>
|
|
261
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
262
|
+
<li>
|
|
263
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">weight</span>: <span class="tsd-signature-type">number</span></h5>
|
|
264
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
265
|
+
<li>
|
|
266
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
267
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
268
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4>
|
|
269
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
270
|
+
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#_createEdge">_createEdge</a></p>
|
|
271
|
+
<ul>
|
|
272
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L117">src/data-structures/graph/directed-graph.ts:117</a></li></ul></aside></li></ul></section>
|
|
273
|
+
<section class="tsd-panel tsd-member"><a id="_createVertex" class="tsd-anchor"></a>
|
|
274
|
+
<h3 class="tsd-anchor-link"><span>_create<wbr/>Vertex</span><a href="#_createVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
275
|
+
<ul class="tsd-signatures">
|
|
276
|
+
<li class="tsd-signature tsd-anchor-link" id="_createVertex._createVertex-1"><span class="tsd-kind-call-signature">_create<wbr/>Vertex</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><a href="#_createVertex._createVertex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
277
|
+
<li class="tsd-description">
|
|
278
|
+
<div class="tsd-comment tsd-typography"><p>In TypeScript, a subclass inherits the interface implementation of its parent class, without needing to implement the same interface again in the subclass. This behavior differs from Java's approach. In Java, if a parent class implements an interface, the subclass needs to explicitly implement the same interface, even if the parent class has already implemented it.
|
|
279
|
+
This means that using abstract methods in the parent class cannot constrain the grandchild classes. Defining methods within an interface also cannot constrain the descendant classes. When inheriting from this class, developers need to be aware that this method needs to be overridden.</p>
|
|
280
|
+
</div>
|
|
281
|
+
<div class="tsd-parameters">
|
|
282
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
283
|
+
<ul class="tsd-parameter-list">
|
|
284
|
+
<li>
|
|
285
|
+
<h5><span class="tsd-kind-parameter">id</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5>
|
|
286
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
287
|
+
<li>
|
|
288
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
289
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
290
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4>
|
|
291
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
292
|
+
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#_createVertex">_createVertex</a></p>
|
|
293
|
+
<ul>
|
|
294
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L105">src/data-structures/graph/directed-graph.ts:105</a></li></ul></aside></li></ul></section>
|
|
295
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="_getVertex" class="tsd-anchor"></a>
|
|
296
|
+
<h3 class="tsd-anchor-link"><span>_get<wbr/>Vertex</span><a href="#_getVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
297
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
298
|
+
<li class="tsd-signature tsd-anchor-link" id="_getVertex._getVertex-1"><span class="tsd-kind-call-signature">_get<wbr/>Vertex</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><a href="#_getVertex._getVertex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
299
|
+
<li class="tsd-description">
|
|
300
|
+
<div class="tsd-parameters">
|
|
301
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
302
|
+
<ul class="tsd-parameter-list">
|
|
303
|
+
<li>
|
|
304
|
+
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5></li></ul></div>
|
|
305
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4><aside class="tsd-sources">
|
|
306
|
+
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#_getVertex">_getVertex</a></p>
|
|
307
|
+
<ul>
|
|
308
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L128">src/data-structures/graph/abstract-graph.ts:128</a></li></ul></aside></li></ul></section>
|
|
309
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="_getVertexId" class="tsd-anchor"></a>
|
|
310
|
+
<h3 class="tsd-anchor-link"><span>_get<wbr/>Vertex<wbr/>Id</span><a href="#_getVertexId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
311
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
312
|
+
<li class="tsd-signature tsd-anchor-link" id="_getVertexId._getVertexId-1"><span class="tsd-kind-call-signature">_get<wbr/>Vertex<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><a href="#_getVertexId._getVertexId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
313
|
+
<li class="tsd-description">
|
|
314
|
+
<div class="tsd-parameters">
|
|
315
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
316
|
+
<ul class="tsd-parameter-list">
|
|
317
|
+
<li>
|
|
318
|
+
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5></li></ul></div>
|
|
319
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h4><aside class="tsd-sources">
|
|
320
|
+
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#_getVertexId">_getVertexId</a></p>
|
|
321
|
+
<ul>
|
|
322
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L137">src/data-structures/graph/abstract-graph.ts:137</a></li></ul></aside></li></ul></section>
|
|
323
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setInEdgeMap" class="tsd-anchor"></a>
|
|
324
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>In<wbr/>Edge<wbr/>Map</span><a href="#_setInEdgeMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
325
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
326
|
+
<li class="tsd-signature tsd-anchor-link" id="_setInEdgeMap._setInEdgeMap-1"><span class="tsd-kind-call-signature">_set<wbr/>In<wbr/>Edge<wbr/>Map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setInEdgeMap._setInEdgeMap-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
327
|
+
<li class="tsd-description">
|
|
328
|
+
<div class="tsd-parameters">
|
|
329
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
330
|
+
<ul class="tsd-parameter-list">
|
|
331
|
+
<li>
|
|
332
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
333
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
334
|
+
<ul>
|
|
335
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L475">src/data-structures/graph/directed-graph.ts:475</a></li></ul></aside></li></ul></section>
|
|
336
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setOutEdgeMap" class="tsd-anchor"></a>
|
|
337
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Out<wbr/>Edge<wbr/>Map</span><a href="#_setOutEdgeMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
338
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
339
|
+
<li class="tsd-signature tsd-anchor-link" id="_setOutEdgeMap._setOutEdgeMap-1"><span class="tsd-kind-call-signature">_set<wbr/>Out<wbr/>Edge<wbr/>Map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setOutEdgeMap._setOutEdgeMap-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
340
|
+
<li class="tsd-description">
|
|
341
|
+
<div class="tsd-parameters">
|
|
342
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
343
|
+
<ul class="tsd-parameter-list">
|
|
344
|
+
<li>
|
|
345
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
346
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
347
|
+
<ul>
|
|
348
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L471">src/data-structures/graph/directed-graph.ts:471</a></li></ul></aside></li></ul></section>
|
|
349
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVertices" class="tsd-anchor"></a>
|
|
350
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Vertices</span><a href="#_setVertices" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
351
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
352
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVertices._setVertices-1"><span class="tsd-kind-call-signature">_set<wbr/>Vertices</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVertices._setVertices-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
353
|
+
<li class="tsd-description">
|
|
354
|
+
<div class="tsd-comment tsd-typography"><p>--- start find cycles ---</p>
|
|
355
|
+
</div>
|
|
356
|
+
<div class="tsd-parameters">
|
|
357
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
358
|
+
<ul class="tsd-parameter-list">
|
|
359
|
+
<li>
|
|
360
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
361
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
362
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
363
|
+
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#_setVertices">_setVertices</a></p>
|
|
364
|
+
<ul>
|
|
365
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L975">src/data-structures/graph/abstract-graph.ts:975</a></li></ul></aside></li></ul></section>
|
|
129
366
|
<section class="tsd-panel tsd-member"><a id="addEdge" class="tsd-anchor"></a>
|
|
130
367
|
<h3 class="tsd-anchor-link"><span>add<wbr/>Edge</span><a href="#addEdge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
131
368
|
<ul class="tsd-signatures">
|
|
132
369
|
<li class="tsd-signature tsd-anchor-link" id="addEdge.addEdge-1"><span class="tsd-kind-call-signature">add<wbr/>Edge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">edge</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#addEdge.addEdge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
133
370
|
<li class="tsd-description">
|
|
134
|
-
<div class="tsd-comment tsd-typography"><p>The <code>addEdge</code> function adds
|
|
371
|
+
<div class="tsd-comment tsd-typography"><p>The <code>addEdge</code> function adds a directed edge to a graph if the source and destination vertices exist.</p>
|
|
135
372
|
</div>
|
|
136
373
|
<div class="tsd-parameters">
|
|
137
374
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
138
375
|
<ul class="tsd-parameter-list">
|
|
139
376
|
<li>
|
|
140
377
|
<h5><span class="tsd-kind-parameter">edge</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h5>
|
|
141
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>edge</code> is of type <code>E</code>, which represents
|
|
142
|
-
|
|
378
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>edge</code> is of type <code>E</code>, which represents a directed edge in a graph. It
|
|
379
|
+
contains two properties:</p>
|
|
143
380
|
</div>
|
|
144
381
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
145
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>addEdge</code>
|
|
146
|
-
graph, and <code>false</code> if either the source or destination
|
|
382
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method <code>addEdge</code> returns a boolean value. It returns <code>true</code> if the edge was successfully added to the
|
|
383
|
+
graph, and <code>false</code> if either the source or destination vertex of the edge is not present in the graph.</p>
|
|
147
384
|
|
|
148
385
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
149
386
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#addEdge">addEdge</a></p>
|
|
150
387
|
<ul>
|
|
151
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
388
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L155">src/data-structures/graph/directed-graph.ts:155</a></li></ul></aside></li></ul></section>
|
|
152
389
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addVertex" class="tsd-anchor"></a>
|
|
153
390
|
<h3 class="tsd-anchor-link"><span>add<wbr/>Vertex</span><a href="#addVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
154
391
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
155
392
|
<li class="tsd-signature tsd-anchor-link" id="addVertex.addVertex-1"><span class="tsd-kind-call-signature">add<wbr/>Vertex</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newVertex</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#addVertex.addVertex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
156
393
|
<li class="tsd-description">
|
|
157
|
-
<div class="tsd-comment tsd-typography"><p>The addVertex function adds a new vertex to a graph if it does not already exist.</p>
|
|
158
|
-
</div>
|
|
159
394
|
<div class="tsd-parameters">
|
|
160
395
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
161
396
|
<ul class="tsd-parameter-list">
|
|
162
397
|
<li>
|
|
163
|
-
<h5><span class="tsd-kind-parameter">newVertex</span>: <span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
164
|
-
<
|
|
165
|
-
</div>
|
|
166
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
167
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value. If the newVertex is already contained in the graph, it will return
|
|
168
|
-
false. Otherwise, it will add the newVertex to the graph and return true.</p>
|
|
169
|
-
|
|
170
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
398
|
+
<h5><span class="tsd-kind-parameter">newVertex</span>: <span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5></li></ul></div>
|
|
399
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
171
400
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#addVertex">addVertex</a></p>
|
|
172
401
|
<ul>
|
|
173
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
402
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L158">src/data-structures/graph/abstract-graph.ts:158</a></li></ul></aside></li></ul></section>
|
|
174
403
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="bellmanFord" class="tsd-anchor"></a>
|
|
175
404
|
<h3 class="tsd-anchor-link"><span>bellman<wbr/>Ford</span><a href="#bellmanFord" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
176
405
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -227,28 +456,66 @@ vertex.</p>
|
|
|
227
456
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
228
457
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#bellmanFord">bellmanFord</a></p>
|
|
229
458
|
<ul>
|
|
230
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
459
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L700">src/data-structures/graph/abstract-graph.ts:700</a></li></ul></aside></li></ul></section>
|
|
460
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="createAddEdge" class="tsd-anchor"></a>
|
|
461
|
+
<h3 class="tsd-anchor-link"><span>create<wbr/>Add<wbr/>Edge</span><a href="#createAddEdge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
462
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
463
|
+
<li class="tsd-signature tsd-anchor-link" id="createAddEdge.createAddEdge-1"><span class="tsd-kind-call-signature">create<wbr/>Add<wbr/>Edge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">src</span>, <span class="tsd-kind-parameter">dest</span>, <span class="tsd-kind-parameter">weight</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#createAddEdge.createAddEdge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
464
|
+
<li class="tsd-description">
|
|
465
|
+
<div class="tsd-parameters">
|
|
466
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
467
|
+
<ul class="tsd-parameter-list">
|
|
468
|
+
<li>
|
|
469
|
+
<h5><span class="tsd-kind-parameter">src</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5></li>
|
|
470
|
+
<li>
|
|
471
|
+
<h5><span class="tsd-kind-parameter">dest</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5></li>
|
|
472
|
+
<li>
|
|
473
|
+
<h5><span class="tsd-kind-parameter">weight</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
474
|
+
<li>
|
|
475
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5></li></ul></div>
|
|
476
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
477
|
+
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#createAddEdge">createAddEdge</a></p>
|
|
478
|
+
<ul>
|
|
479
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L213">src/data-structures/graph/abstract-graph.ts:213</a></li></ul></aside></li></ul></section>
|
|
480
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="createAddVertex" class="tsd-anchor"></a>
|
|
481
|
+
<h3 class="tsd-anchor-link"><span>create<wbr/>Add<wbr/>Vertex</span><a href="#createAddVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
482
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
483
|
+
<li class="tsd-signature tsd-anchor-link" id="createAddVertex.createAddVertex-1"><span class="tsd-kind-call-signature">create<wbr/>Add<wbr/>Vertex</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#createAddVertex.createAddVertex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
484
|
+
<li class="tsd-description">
|
|
485
|
+
<div class="tsd-parameters">
|
|
486
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
487
|
+
<ul class="tsd-parameter-list">
|
|
488
|
+
<li>
|
|
489
|
+
<h5><span class="tsd-kind-parameter">id</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li>
|
|
490
|
+
<li>
|
|
491
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5></li></ul></div>
|
|
492
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
493
|
+
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#createAddVertex">createAddVertex</a></p>
|
|
494
|
+
<ul>
|
|
495
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L153">src/data-structures/graph/abstract-graph.ts:153</a></li></ul></aside></li></ul></section>
|
|
231
496
|
<section class="tsd-panel tsd-member"><a id="degreeOf" class="tsd-anchor"></a>
|
|
232
497
|
<h3 class="tsd-anchor-link"><span>degree<wbr/>Of</span><a href="#degreeOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
233
498
|
<ul class="tsd-signatures">
|
|
234
499
|
<li class="tsd-signature tsd-anchor-link" id="degreeOf.degreeOf-1"><span class="tsd-kind-call-signature">degree<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#degreeOf.degreeOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
235
500
|
<li class="tsd-description">
|
|
236
|
-
<div class="tsd-comment tsd-typography"><p>The function "degreeOf" returns the total degree of a vertex, which is the sum of its out-degree
|
|
501
|
+
<div class="tsd-comment tsd-typography"><p>The function "degreeOf" returns the total degree of a vertex in a directed graph, which is the sum of its out-degree
|
|
502
|
+
and in-degree.</p>
|
|
237
503
|
</div>
|
|
238
504
|
<div class="tsd-parameters">
|
|
239
505
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
240
506
|
<ul class="tsd-parameter-list">
|
|
241
507
|
<li>
|
|
242
508
|
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
243
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
509
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
510
|
+
<code>V</code>.</p>
|
|
244
511
|
</div>
|
|
245
512
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
246
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>
|
|
513
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The sum of the out-degree and in-degree of the given vertex or vertex ID.</p>
|
|
247
514
|
|
|
248
515
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
249
516
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#degreeOf">degreeOf</a></p>
|
|
250
517
|
<ul>
|
|
251
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
518
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L297">src/data-structures/graph/directed-graph.ts:297</a></li></ul></aside></li></ul></section>
|
|
252
519
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="dijkstra" class="tsd-anchor"></a>
|
|
253
520
|
<h3 class="tsd-anchor-link"><span>dijkstra</span><a href="#dijkstra" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
254
521
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -293,7 +560,7 @@ shortest paths from the source vertex to all other vertices in the graph. If <co
|
|
|
293
560
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
294
561
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#dijkstra">dijkstra</a></p>
|
|
295
562
|
<ul>
|
|
296
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
563
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L564">src/data-structures/graph/abstract-graph.ts:564</a></li></ul></aside></li></ul></section>
|
|
297
564
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="dijkstraWithoutHeap" class="tsd-anchor"></a>
|
|
298
565
|
<h3 class="tsd-anchor-link"><span>dijkstra<wbr/>Without<wbr/>Heap</span><a href="#dijkstraWithoutHeap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
299
566
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -337,41 +604,42 @@ shortest paths from the source vertex to all other vertices in the graph. If <co
|
|
|
337
604
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
338
605
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#dijkstraWithoutHeap">dijkstraWithoutHeap</a></p>
|
|
339
606
|
<ul>
|
|
340
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
607
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L437">src/data-structures/graph/abstract-graph.ts:437</a></li></ul></aside></li></ul></section>
|
|
341
608
|
<section class="tsd-panel tsd-member"><a id="edgeSet" class="tsd-anchor"></a>
|
|
342
609
|
<h3 class="tsd-anchor-link"><span>edge<wbr/>Set</span><a href="#edgeSet" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
343
610
|
<ul class="tsd-signatures">
|
|
344
611
|
<li class="tsd-signature tsd-anchor-link" id="edgeSet.edgeSet-1"><span class="tsd-kind-call-signature">edge<wbr/>Set</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><a href="#edgeSet.edgeSet-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
345
612
|
<li class="tsd-description">
|
|
346
|
-
<div class="tsd-comment tsd-typography"><p>The <code>edgeSet</code> function returns an array of all
|
|
613
|
+
<div class="tsd-comment tsd-typography"><p>The <code>edgeSet</code> function returns an array of all directed edges in the graph.</p>
|
|
347
614
|
</div>
|
|
348
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>The <code>edgeSet()</code> method returns an array of
|
|
615
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>The <code>edgeSet()</code> method returns an array of <code>E</code> objects.</p>
|
|
349
616
|
|
|
350
617
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
351
618
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#edgeSet">edgeSet</a></p>
|
|
352
619
|
<ul>
|
|
353
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
620
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L417">src/data-structures/graph/directed-graph.ts:417</a></li></ul></aside></li></ul></section>
|
|
354
621
|
<section class="tsd-panel tsd-member"><a id="edgesOf" class="tsd-anchor"></a>
|
|
355
622
|
<h3 class="tsd-anchor-link"><span>edges<wbr/>Of</span><a href="#edgesOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
356
623
|
<ul class="tsd-signatures">
|
|
357
624
|
<li class="tsd-signature tsd-anchor-link" id="edgesOf.edgesOf-1"><span class="tsd-kind-call-signature">edges<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><a href="#edgesOf.edgesOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
358
625
|
<li class="tsd-description">
|
|
359
|
-
<div class="tsd-comment tsd-typography"><p>The function "edgesOf" returns an array of both outgoing and incoming edges of a given vertex or vertex ID.</p>
|
|
626
|
+
<div class="tsd-comment tsd-typography"><p>The function "edgesOf" returns an array of both outgoing and incoming directed edges of a given vertex or vertex ID.</p>
|
|
360
627
|
</div>
|
|
361
628
|
<div class="tsd-parameters">
|
|
362
629
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
363
630
|
<ul class="tsd-parameter-list">
|
|
364
631
|
<li>
|
|
365
632
|
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
366
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
633
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
634
|
+
<code>V</code>.</p>
|
|
367
635
|
</div>
|
|
368
636
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
369
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>
|
|
637
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of directed edges.</p>
|
|
370
638
|
|
|
371
639
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
372
640
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#edgesOf">edgesOf</a></p>
|
|
373
641
|
<ul>
|
|
374
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
642
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L327">src/data-structures/graph/directed-graph.ts:327</a></li></ul></aside></li></ul></section>
|
|
375
643
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="floyd" class="tsd-anchor"></a>
|
|
376
644
|
<h3 class="tsd-anchor-link"><span>floyd</span><a href="#floyd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
377
645
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -396,7 +664,7 @@ path between vertices in the</p>
|
|
|
396
664
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
397
665
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#floyd">floyd</a></p>
|
|
398
666
|
<ul>
|
|
399
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
667
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L806">src/data-structures/graph/abstract-graph.ts:806</a></li></ul></aside></li></ul></section>
|
|
400
668
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getAllPathsBetween" class="tsd-anchor"></a>
|
|
401
669
|
<h3 class="tsd-anchor-link"><span>get<wbr/>All<wbr/>Paths<wbr/>Between</span><a href="#getAllPathsBetween" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
402
670
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -425,122 +693,122 @@ and v2).</p>
|
|
|
425
693
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
426
694
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getAllPathsBetween">getAllPathsBetween</a></p>
|
|
427
695
|
<ul>
|
|
428
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
696
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L254">src/data-structures/graph/abstract-graph.ts:254</a></li></ul></aside></li></ul></section>
|
|
429
697
|
<section class="tsd-panel tsd-member"><a id="getDestinations" class="tsd-anchor"></a>
|
|
430
698
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Destinations</span><a href="#getDestinations" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
431
699
|
<ul class="tsd-signatures">
|
|
432
700
|
<li class="tsd-signature tsd-anchor-link" id="getDestinations.getDestinations-1"><span class="tsd-kind-call-signature">get<wbr/>Destinations</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertex</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[]</span><a href="#getDestinations.getDestinations-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
433
701
|
<li class="tsd-description">
|
|
434
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>getDestinations</code> returns an array of
|
|
702
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>getDestinations</code> returns an array of directed vertices that are the destinations of outgoing edges
|
|
703
|
+
from a given vertex.</p>
|
|
435
704
|
</div>
|
|
436
705
|
<div class="tsd-parameters">
|
|
437
706
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
438
707
|
<ul class="tsd-parameter-list">
|
|
439
708
|
<li>
|
|
440
709
|
<h5><span class="tsd-kind-parameter">vertex</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
441
|
-
<div class="tsd-comment tsd-typography"><p>The <code>vertex</code> parameter
|
|
442
|
-
find the destinations. It can be either a <code>V</code> object, a <code>VertexId</code> (which is a unique identifier for a vertex), or
|
|
443
|
-
<code>null</code> if we want to find destinations from all vertices.</p>
|
|
710
|
+
<div class="tsd-comment tsd-typography"><p>The <code>vertex</code> parameter can be one of the following:</p>
|
|
444
711
|
</div>
|
|
445
712
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
446
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of
|
|
713
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of DirectedVertex objects.</p>
|
|
447
714
|
|
|
448
715
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
449
716
|
<ul>
|
|
450
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
717
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L356">src/data-structures/graph/directed-graph.ts:356</a></li></ul></aside></li></ul></section>
|
|
451
718
|
<section class="tsd-panel tsd-member"><a id="getEdge" class="tsd-anchor"></a>
|
|
452
719
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Edge</span><a href="#getEdge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
453
720
|
<ul class="tsd-signatures">
|
|
454
721
|
<li class="tsd-signature tsd-anchor-link" id="getEdge.getEdge-1"><span class="tsd-kind-call-signature">get<wbr/>Edge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">srcOrId</span>, <span class="tsd-kind-parameter">destOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><a href="#getEdge.getEdge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
455
722
|
<li class="tsd-description">
|
|
456
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>getEdge</code> returns the
|
|
723
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>getEdge</code> returns the directed edge between two vertices, given their source and destination.</p>
|
|
457
724
|
</div>
|
|
458
725
|
<div class="tsd-parameters">
|
|
459
726
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
460
727
|
<ul class="tsd-parameter-list">
|
|
461
728
|
<li>
|
|
462
729
|
<h5><span class="tsd-kind-parameter">srcOrId</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
463
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
464
|
-
|
|
730
|
+
<div class="tsd-comment tsd-typography"><p>The source vertex or its ID. It can be either a
|
|
731
|
+
DirectedVertex object or a VertexId.</p>
|
|
465
732
|
</div>
|
|
466
733
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
467
734
|
<li>
|
|
468
735
|
<h5><span class="tsd-kind-parameter">destOrId</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
469
|
-
<div class="tsd-comment tsd-typography"><p>The <code>destOrId</code> parameter is
|
|
470
|
-
|
|
736
|
+
<div class="tsd-comment tsd-typography"><p>The <code>destOrId</code> parameter is the destination vertex or its
|
|
737
|
+
ID. It can be either a <code>DirectedVertex</code> object or a <code>VertexId</code> value.</p>
|
|
471
738
|
</div>
|
|
472
739
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
473
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4><p>
|
|
740
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4><p>a E object or null.</p>
|
|
474
741
|
|
|
475
742
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
476
743
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getEdge">getEdge</a></p>
|
|
477
744
|
<ul>
|
|
478
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
745
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L130">src/data-structures/graph/directed-graph.ts:130</a></li></ul></aside></li></ul></section>
|
|
479
746
|
<section class="tsd-panel tsd-member"><a id="getEdgeDest" class="tsd-anchor"></a>
|
|
480
747
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Edge<wbr/>Dest</span><a href="#getEdgeDest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
481
748
|
<ul class="tsd-signatures">
|
|
482
749
|
<li class="tsd-signature tsd-anchor-link" id="getEdgeDest.getEdgeDest-1"><span class="tsd-kind-call-signature">get<wbr/>Edge<wbr/>Dest</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><a href="#getEdgeDest.getEdgeDest-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
483
750
|
<li class="tsd-description">
|
|
484
|
-
<div class="tsd-comment tsd-typography"><p>The function "getEdgeDest" returns the vertex
|
|
751
|
+
<div class="tsd-comment tsd-typography"><p>The function "getEdgeDest" returns the destination vertex of a directed edge.</p>
|
|
485
752
|
</div>
|
|
486
753
|
<div class="tsd-parameters">
|
|
487
754
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
488
755
|
<ul class="tsd-parameter-list">
|
|
489
756
|
<li>
|
|
490
757
|
<h5><span class="tsd-kind-parameter">e</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h5>
|
|
491
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
758
|
+
<div class="tsd-comment tsd-typography"><p>E - This is an object representing a directed edge in a graph. It contains information
|
|
759
|
+
about the source vertex, destination vertex, and any associated data.</p>
|
|
492
760
|
</div>
|
|
493
761
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
494
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4><p>either a
|
|
762
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4><p>either a DirectedVertex object or null.</p>
|
|
495
763
|
|
|
496
764
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
497
765
|
<p>Implementation of <a href="../interfaces/IDirectedGraph.html">IDirectedGraph</a>.<a href="../interfaces/IDirectedGraph.html#getEdgeDest">getEdgeDest</a></p>
|
|
498
766
|
<ul>
|
|
499
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
767
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L346">src/data-structures/graph/directed-graph.ts:346</a></li></ul></aside></li></ul></section>
|
|
500
768
|
<section class="tsd-panel tsd-member"><a id="getEdgeSrc" class="tsd-anchor"></a>
|
|
501
769
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Edge<wbr/>Src</span><a href="#getEdgeSrc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
502
770
|
<ul class="tsd-signatures">
|
|
503
771
|
<li class="tsd-signature tsd-anchor-link" id="getEdgeSrc.getEdgeSrc-1"><span class="tsd-kind-call-signature">get<wbr/>Edge<wbr/>Src</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">e</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><a href="#getEdgeSrc.getEdgeSrc-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
504
772
|
<li class="tsd-description">
|
|
505
|
-
<div class="tsd-comment tsd-typography"><p>The function "getEdgeSrc" returns the source vertex of
|
|
773
|
+
<div class="tsd-comment tsd-typography"><p>The function "getEdgeSrc" returns the source vertex of a directed edge, or null if the edge does not exist.</p>
|
|
506
774
|
</div>
|
|
507
775
|
<div class="tsd-parameters">
|
|
508
776
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
509
777
|
<ul class="tsd-parameter-list">
|
|
510
778
|
<li>
|
|
511
779
|
<h5><span class="tsd-kind-parameter">e</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h5>
|
|
512
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
780
|
+
<div class="tsd-comment tsd-typography"><p>A directed edge object of type E.</p>
|
|
513
781
|
</div>
|
|
514
782
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
515
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4><p>
|
|
783
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4><p>either a DirectedVertex object or null.</p>
|
|
516
784
|
|
|
517
785
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
518
786
|
<p>Implementation of <a href="../interfaces/IDirectedGraph.html">IDirectedGraph</a>.<a href="../interfaces/IDirectedGraph.html#getEdgeSrc">getEdgeSrc</a></p>
|
|
519
787
|
<ul>
|
|
520
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
788
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L336">src/data-structures/graph/directed-graph.ts:336</a></li></ul></aside></li></ul></section>
|
|
521
789
|
<section class="tsd-panel tsd-member"><a id="getEndsOfEdge" class="tsd-anchor"></a>
|
|
522
790
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Ends<wbr/>Of<wbr/>Edge</span><a href="#getEndsOfEdge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
523
791
|
<ul class="tsd-signatures">
|
|
524
792
|
<li class="tsd-signature tsd-anchor-link" id="getEndsOfEdge.getEndsOfEdge-1"><span class="tsd-kind-call-signature">get<wbr/>Ends<wbr/>Of<wbr/>Edge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">edge</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">]</span><a href="#getEndsOfEdge.getEndsOfEdge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
525
793
|
<li class="tsd-description">
|
|
526
|
-
<div class="tsd-comment tsd-typography"><p>The function "getEndsOfEdge" returns the source and destination vertices of
|
|
527
|
-
otherwise it returns null.</p>
|
|
794
|
+
<div class="tsd-comment tsd-typography"><p>The function "getEndsOfEdge" returns the source and destination vertices of a directed edge if it exists in the
|
|
795
|
+
graph, otherwise it returns null.</p>
|
|
528
796
|
</div>
|
|
529
797
|
<div class="tsd-parameters">
|
|
530
798
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
531
799
|
<ul class="tsd-parameter-list">
|
|
532
800
|
<li>
|
|
533
801
|
<h5><span class="tsd-kind-parameter">edge</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h5>
|
|
534
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
802
|
+
<div class="tsd-comment tsd-typography"><p>A directed edge object with a generic type E.</p>
|
|
535
803
|
</div>
|
|
536
804
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
537
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">]</span></h4><p>an array containing
|
|
538
|
-
|
|
805
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">]</span></h4><p>an array containing the starting and ending vertices of the given directed edge, or null if the edge does
|
|
806
|
+
not exist in the graph.</p>
|
|
539
807
|
|
|
540
808
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
541
809
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getEndsOfEdge">getEndsOfEdge</a></p>
|
|
542
810
|
<ul>
|
|
543
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
811
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L458">src/data-structures/graph/directed-graph.ts:458</a></li></ul></aside></li></ul></section>
|
|
544
812
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinCostBetween" class="tsd-anchor"></a>
|
|
545
813
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Min<wbr/>Cost<wbr/>Between</span><a href="#getMinCostBetween" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
546
814
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -578,7 +846,7 @@ vertices are not</p>
|
|
|
578
846
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
579
847
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getMinCostBetween">getMinCostBetween</a></p>
|
|
580
848
|
<ul>
|
|
581
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
849
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L312">src/data-structures/graph/abstract-graph.ts:312</a></li></ul></aside></li></ul></section>
|
|
582
850
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinPathBetween" class="tsd-anchor"></a>
|
|
583
851
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Min<wbr/>Path<wbr/>Between</span><a href="#getMinPathBetween" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
584
852
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -614,29 +882,29 @@ two vertices (<code>v1</code> and <code>v2</code>). If no path is found, it retu
|
|
|
614
882
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
615
883
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getMinPathBetween">getMinPathBetween</a></p>
|
|
616
884
|
<ul>
|
|
617
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
885
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L369">src/data-structures/graph/abstract-graph.ts:369</a></li></ul></aside></li></ul></section>
|
|
618
886
|
<section class="tsd-panel tsd-member"><a id="getNeighbors" class="tsd-anchor"></a>
|
|
619
887
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Neighbors</span><a href="#getNeighbors" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
620
888
|
<ul class="tsd-signatures">
|
|
621
889
|
<li class="tsd-signature tsd-anchor-link" id="getNeighbors.getNeighbors-1"><span class="tsd-kind-call-signature">get<wbr/>Neighbors</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[]</span><a href="#getNeighbors.getNeighbors-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
622
890
|
<li class="tsd-description">
|
|
623
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>getNeighbors</code> returns an array of neighboring vertices
|
|
891
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>getNeighbors</code> returns an array of neighboring vertices of a given vertex in a directed graph.</p>
|
|
624
892
|
</div>
|
|
625
893
|
<div class="tsd-parameters">
|
|
626
894
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
627
895
|
<ul class="tsd-parameter-list">
|
|
628
896
|
<li>
|
|
629
897
|
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
630
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a
|
|
631
|
-
|
|
898
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>V</code>
|
|
899
|
+
object or a <code>VertexId</code>.</p>
|
|
632
900
|
</div>
|
|
633
901
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
634
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of
|
|
902
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of DirectedVertex objects.</p>
|
|
635
903
|
|
|
636
904
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
637
905
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getNeighbors">getNeighbors</a></p>
|
|
638
906
|
<ul>
|
|
639
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
907
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L433">src/data-structures/graph/directed-graph.ts:433</a></li></ul></aside></li></ul></section>
|
|
640
908
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathSumWeight" class="tsd-anchor"></a>
|
|
641
909
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Path<wbr/>Sum<wbr/>Weight</span><a href="#getPathSumWeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
642
910
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -657,53 +925,21 @@ two vertices (<code>v1</code> and <code>v2</code>). If no path is found, it retu
|
|
|
657
925
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
658
926
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getPathSumWeight">getPathSumWeight</a></p>
|
|
659
927
|
<ul>
|
|
660
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
928
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L290">src/data-structures/graph/abstract-graph.ts:290</a></li></ul></aside></li></ul></section>
|
|
661
929
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getVertex" class="tsd-anchor"></a>
|
|
662
930
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Vertex</span><a href="#getVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
663
931
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
664
|
-
<li class="tsd-signature tsd-anchor-link" id="getVertex.getVertex-1"><span class="tsd-kind-call-signature">get<wbr/>Vertex</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">
|
|
932
|
+
<li class="tsd-signature tsd-anchor-link" id="getVertex.getVertex-1"><span class="tsd-kind-call-signature">get<wbr/>Vertex</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><a href="#getVertex.getVertex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
665
933
|
<li class="tsd-description">
|
|
666
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>getVertex</code> returns the vertex object associated with a given vertex ID or vertex object, or null if it
|
|
667
|
-
does not exist.</p>
|
|
668
|
-
</div>
|
|
669
934
|
<div class="tsd-parameters">
|
|
670
935
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
671
936
|
<ul class="tsd-parameter-list">
|
|
672
937
|
<li>
|
|
673
|
-
<h5><span class="tsd-kind-parameter">
|
|
674
|
-
<
|
|
675
|
-
</div>
|
|
676
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
677
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4><p>The function <code>getVertex</code> returns the vertex object (<code>V</code>) corresponding to the given <code>vertexOrId</code> parameter.
|
|
678
|
-
If the vertex is found in the <code>_vertices</code> map, it is returned. Otherwise, <code>null</code> is returned.</p>
|
|
679
|
-
|
|
680
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
938
|
+
<h5><span class="tsd-kind-parameter">vertexId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h5></li></ul></div>
|
|
939
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h4><aside class="tsd-sources">
|
|
681
940
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getVertex">getVertex</a></p>
|
|
682
941
|
<ul>
|
|
683
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
684
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getVertexId" class="tsd-anchor"></a>
|
|
685
|
-
<h3 class="tsd-anchor-link"><span>get<wbr/>Vertex<wbr/>Id</span><a href="#getVertexId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
686
|
-
<ul class="tsd-signatures tsd-is-inherited">
|
|
687
|
-
<li class="tsd-signature tsd-anchor-link" id="getVertexId.getVertexId-1"><span class="tsd-kind-call-signature">get<wbr/>Vertex<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><a href="#getVertexId.getVertexId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
688
|
-
<li class="tsd-description">
|
|
689
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>getVertexId</code> returns the id of a vertex, whether it is passed as an instance of <code>AbstractVertex</code> or as
|
|
690
|
-
a <code>VertexId</code>.</p>
|
|
691
|
-
</div>
|
|
692
|
-
<div class="tsd-parameters">
|
|
693
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
694
|
-
<ul class="tsd-parameter-list">
|
|
695
|
-
<li>
|
|
696
|
-
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
697
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a vertex object (<code>V</code>) or a vertex ID
|
|
698
|
-
(<code>VertexId</code>).</p>
|
|
699
|
-
</div>
|
|
700
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
701
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a></h4><p>the id of the vertex.</p>
|
|
702
|
-
|
|
703
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
704
|
-
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#getVertexId">getVertexId</a></p>
|
|
705
|
-
<ul>
|
|
706
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c1b5969/src/data-structures/graph/abstract-graph.ts#L90">src/data-structures/graph/abstract-graph.ts:90</a></li></ul></aside></li></ul></section>
|
|
942
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L133">src/data-structures/graph/abstract-graph.ts:133</a></li></ul></aside></li></ul></section>
|
|
707
943
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="hasEdge" class="tsd-anchor"></a>
|
|
708
944
|
<h3 class="tsd-anchor-link"><span>has<wbr/>Edge</span><a href="#hasEdge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
709
945
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -732,7 +968,7 @@ vertices <code>v1</code> and <code>v2</code>, and <code>false</code> otherwise.<
|
|
|
732
968
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
733
969
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#hasEdge">hasEdge</a></p>
|
|
734
970
|
<ul>
|
|
735
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
971
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L208">src/data-structures/graph/abstract-graph.ts:208</a></li></ul></aside></li></ul></section>
|
|
736
972
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="hasVertex" class="tsd-anchor"></a>
|
|
737
973
|
<h3 class="tsd-anchor-link"><span>has<wbr/>Vertex</span><a href="#hasVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
738
974
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -754,20 +990,21 @@ vertices <code>v1</code> and <code>v2</code>, and <code>false</code> otherwise.<
|
|
|
754
990
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
755
991
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#hasVertex">hasVertex</a></p>
|
|
756
992
|
<ul>
|
|
757
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
993
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L147">src/data-structures/graph/abstract-graph.ts:147</a></li></ul></aside></li></ul></section>
|
|
758
994
|
<section class="tsd-panel tsd-member"><a id="inDegreeOf" class="tsd-anchor"></a>
|
|
759
995
|
<h3 class="tsd-anchor-link"><span>in<wbr/>Degree<wbr/>Of</span><a href="#inDegreeOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
760
996
|
<ul class="tsd-signatures">
|
|
761
997
|
<li class="tsd-signature tsd-anchor-link" id="inDegreeOf.inDegreeOf-1"><span class="tsd-kind-call-signature">in<wbr/>Degree<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#inDegreeOf.inDegreeOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
762
998
|
<li class="tsd-description">
|
|
763
|
-
<div class="tsd-comment tsd-typography"><p>The function "inDegreeOf" returns the number of incoming edges for a given vertex.</p>
|
|
999
|
+
<div class="tsd-comment tsd-typography"><p>The function "inDegreeOf" returns the number of incoming edges for a given vertex or vertex ID in a directed graph.</p>
|
|
764
1000
|
</div>
|
|
765
1001
|
<div class="tsd-parameters">
|
|
766
1002
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
767
1003
|
<ul class="tsd-parameter-list">
|
|
768
1004
|
<li>
|
|
769
1005
|
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
770
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
1006
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
1007
|
+
<code>V</code>.</p>
|
|
771
1008
|
</div>
|
|
772
1009
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
773
1010
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The number of incoming edges of the specified vertex or vertex ID.</p>
|
|
@@ -775,42 +1012,43 @@ vertices <code>v1</code> and <code>v2</code>, and <code>false</code> otherwise.<
|
|
|
775
1012
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
776
1013
|
<p>Implementation of <a href="../interfaces/IDirectedGraph.html">IDirectedGraph</a>.<a href="../interfaces/IDirectedGraph.html#inDegreeOf">inDegreeOf</a></p>
|
|
777
1014
|
<ul>
|
|
778
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1015
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L307">src/data-structures/graph/directed-graph.ts:307</a></li></ul></aside></li></ul></section>
|
|
779
1016
|
<section class="tsd-panel tsd-member"><a id="incomingEdgesOf" class="tsd-anchor"></a>
|
|
780
1017
|
<h3 class="tsd-anchor-link"><span>incoming<wbr/>Edges<wbr/>Of</span><a href="#incomingEdgesOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
781
1018
|
<ul class="tsd-signatures">
|
|
782
1019
|
<li class="tsd-signature tsd-anchor-link" id="incomingEdgesOf.incomingEdgesOf-1"><span class="tsd-kind-call-signature">incoming<wbr/>Edges<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><a href="#incomingEdgesOf.incomingEdgesOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
783
1020
|
<li class="tsd-description">
|
|
784
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
1021
|
+
<div class="tsd-comment tsd-typography"><p>The function returns an array of incoming edges of a given vertex or vertex ID.</p>
|
|
785
1022
|
</div>
|
|
786
1023
|
<div class="tsd-parameters">
|
|
787
1024
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
788
1025
|
<ul class="tsd-parameter-list">
|
|
789
1026
|
<li>
|
|
790
1027
|
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
791
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a
|
|
792
|
-
|
|
1028
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>V</code>
|
|
1029
|
+
object or a <code>VertexId</code>.</p>
|
|
793
1030
|
</div>
|
|
794
1031
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
795
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>The method <code>incomingEdgesOf</code> returns an array of
|
|
1032
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>The method <code>incomingEdgesOf</code> returns an array of <code>E</code> objects.</p>
|
|
796
1033
|
|
|
797
1034
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
798
1035
|
<p>Implementation of <a href="../interfaces/IDirectedGraph.html">IDirectedGraph</a>.<a href="../interfaces/IDirectedGraph.html#incomingEdgesOf">incomingEdgesOf</a></p>
|
|
799
1036
|
<ul>
|
|
800
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1037
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L268">src/data-structures/graph/directed-graph.ts:268</a></li></ul></aside></li></ul></section>
|
|
801
1038
|
<section class="tsd-panel tsd-member"><a id="outDegreeOf" class="tsd-anchor"></a>
|
|
802
1039
|
<h3 class="tsd-anchor-link"><span>out<wbr/>Degree<wbr/>Of</span><a href="#outDegreeOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
803
1040
|
<ul class="tsd-signatures">
|
|
804
1041
|
<li class="tsd-signature tsd-anchor-link" id="outDegreeOf.outDegreeOf-1"><span class="tsd-kind-call-signature">out<wbr/>Degree<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#outDegreeOf.outDegreeOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
805
1042
|
<li class="tsd-description">
|
|
806
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
1043
|
+
<div class="tsd-comment tsd-typography"><p>The function "outDegreeOf" returns the number of outgoing edges from a given vertex.</p>
|
|
807
1044
|
</div>
|
|
808
1045
|
<div class="tsd-parameters">
|
|
809
1046
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
810
1047
|
<ul class="tsd-parameter-list">
|
|
811
1048
|
<li>
|
|
812
1049
|
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
813
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
1050
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>VertexId</code> or a
|
|
1051
|
+
<code>V</code>.</p>
|
|
814
1052
|
</div>
|
|
815
1053
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
816
1054
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The number of outgoing edges from the specified vertex or vertex ID.</p>
|
|
@@ -818,29 +1056,29 @@ vertices <code>v1</code> and <code>v2</code>, and <code>false</code> otherwise.<
|
|
|
818
1056
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
819
1057
|
<p>Implementation of <a href="../interfaces/IDirectedGraph.html">IDirectedGraph</a>.<a href="../interfaces/IDirectedGraph.html#outDegreeOf">outDegreeOf</a></p>
|
|
820
1058
|
<ul>
|
|
821
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1059
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L317">src/data-structures/graph/directed-graph.ts:317</a></li></ul></aside></li></ul></section>
|
|
822
1060
|
<section class="tsd-panel tsd-member"><a id="outgoingEdgesOf" class="tsd-anchor"></a>
|
|
823
1061
|
<h3 class="tsd-anchor-link"><span>outgoing<wbr/>Edges<wbr/>Of</span><a href="#outgoingEdgesOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
824
1062
|
<ul class="tsd-signatures">
|
|
825
1063
|
<li class="tsd-signature tsd-anchor-link" id="outgoingEdgesOf.outgoingEdgesOf-1"><span class="tsd-kind-call-signature">outgoing<wbr/>Edges<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">vertexOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span><a href="#outgoingEdgesOf.outgoingEdgesOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
826
1064
|
<li class="tsd-description">
|
|
827
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>outgoingEdgesOf</code> returns an array of outgoing edges from a given vertex or vertex ID.</p>
|
|
1065
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>outgoingEdgesOf</code> returns an array of outgoing directed edges from a given vertex or vertex ID.</p>
|
|
828
1066
|
</div>
|
|
829
1067
|
<div class="tsd-parameters">
|
|
830
1068
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
831
1069
|
<ul class="tsd-parameter-list">
|
|
832
1070
|
<li>
|
|
833
1071
|
<h5><span class="tsd-kind-parameter">vertexOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
834
|
-
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can
|
|
835
|
-
|
|
1072
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>vertexOrId</code> can be either a <code>V</code>
|
|
1073
|
+
object or a <code>VertexId</code>.</p>
|
|
836
1074
|
</div>
|
|
837
1075
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
838
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>The method <code>outgoingEdgesOf</code> returns an array of
|
|
1076
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>The method <code>outgoingEdgesOf</code> returns an array of <code>E</code> objects.</p>
|
|
839
1077
|
|
|
840
1078
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
841
1079
|
<p>Implementation of <a href="../interfaces/IDirectedGraph.html">IDirectedGraph</a>.<a href="../interfaces/IDirectedGraph.html#outgoingEdgesOf">outgoingEdgesOf</a></p>
|
|
842
1080
|
<ul>
|
|
843
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1081
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L282">src/data-structures/graph/directed-graph.ts:282</a></li></ul></aside></li></ul></section>
|
|
844
1082
|
<section class="tsd-panel tsd-member"><a id="removeAllEdges" class="tsd-anchor"></a>
|
|
845
1083
|
<h3 class="tsd-anchor-link"><span>remove<wbr/>All<wbr/>Edges</span><a href="#removeAllEdges" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
846
1084
|
<ul class="tsd-signatures">
|
|
@@ -853,21 +1091,20 @@ vertices <code>v1</code> and <code>v2</code>, and <code>false</code> otherwise.<
|
|
|
853
1091
|
<ul class="tsd-parameter-list">
|
|
854
1092
|
<li>
|
|
855
1093
|
<h5><span class="tsd-kind-parameter">src</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
856
|
-
<div class="tsd-comment tsd-typography"><p>The <code>src</code> parameter
|
|
857
|
-
It can be either a <code>VertexId</code> or a <code>V</code> type, which represents the identifier or object of the vertex.</p>
|
|
1094
|
+
<div class="tsd-comment tsd-typography"><p>The <code>src</code> parameter can be either a <code>VertexId</code> or a <code>V</code>.</p>
|
|
858
1095
|
</div>
|
|
859
1096
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
860
1097
|
<li>
|
|
861
1098
|
<h5><span class="tsd-kind-parameter">dest</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
862
|
-
<div class="tsd-comment tsd-typography"><p>The <code>dest</code> parameter represents the destination vertex of an edge. It
|
|
863
|
-
<code>VertexId</code> or a
|
|
1099
|
+
<div class="tsd-comment tsd-typography"><p>The <code>dest</code> parameter represents the destination vertex of an edge. It
|
|
1100
|
+
can be either a <code>VertexId</code> or a <code>V</code>.</p>
|
|
864
1101
|
</div>
|
|
865
1102
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
866
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>An empty array is being returned.</p>
|
|
1103
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">E</span><span class="tsd-signature-symbol">[]</span></h4><p>An empty array of DirectedEdge objects is being returned.</p>
|
|
867
1104
|
|
|
868
1105
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
869
1106
|
<ul>
|
|
870
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1107
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L258">src/data-structures/graph/directed-graph.ts:258</a></li></ul></aside></li></ul></section>
|
|
871
1108
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="removeAllVertices" class="tsd-anchor"></a>
|
|
872
1109
|
<h3 class="tsd-anchor-link"><span>remove<wbr/>All<wbr/>Vertices</span><a href="#removeAllVertices" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
873
1110
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -890,60 +1127,61 @@ were removed.</p>
|
|
|
890
1127
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
891
1128
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#removeAllVertices">removeAllVertices</a></p>
|
|
892
1129
|
<ul>
|
|
893
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1130
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L185">src/data-structures/graph/abstract-graph.ts:185</a></li></ul></aside></li></ul></section>
|
|
894
1131
|
<section class="tsd-panel tsd-member"><a id="removeEdge" class="tsd-anchor"></a>
|
|
895
1132
|
<h3 class="tsd-anchor-link"><span>remove<wbr/>Edge</span><a href="#removeEdge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
896
1133
|
<ul class="tsd-signatures">
|
|
897
1134
|
<li class="tsd-signature tsd-anchor-link" id="removeEdge.removeEdge-1"><span class="tsd-kind-call-signature">remove<wbr/>Edge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">edge</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><a href="#removeEdge.removeEdge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
898
1135
|
<li class="tsd-description">
|
|
899
|
-
<div class="tsd-comment tsd-typography"><p>The removeEdge function removes
|
|
900
|
-
found.</p>
|
|
1136
|
+
<div class="tsd-comment tsd-typography"><p>The <code>removeEdge</code> function removes a directed edge from a graph and returns the removed edge, or null if the edge was
|
|
1137
|
+
not found.</p>
|
|
901
1138
|
</div>
|
|
902
1139
|
<div class="tsd-parameters">
|
|
903
1140
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
904
1141
|
<ul class="tsd-parameter-list">
|
|
905
1142
|
<li>
|
|
906
1143
|
<h5><span class="tsd-kind-parameter">edge</span>: <span class="tsd-signature-type tsd-kind-type-parameter">E</span></h5>
|
|
907
|
-
<div class="tsd-comment tsd-typography"><p>The <code>edge</code> parameter is an object
|
|
908
|
-
|
|
1144
|
+
<div class="tsd-comment tsd-typography"><p>The <code>edge</code> parameter is an object of type <code>E</code>, which represents a directed edge in a
|
|
1145
|
+
graph. It has two properties:</p>
|
|
909
1146
|
</div>
|
|
910
1147
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
911
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4><p>The
|
|
1148
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4><p>The function <code>removeEdge</code> returns a <code>E</code> object if an edge is successfully removed, or <code>null</code>
|
|
1149
|
+
if no edge is removed.</p>
|
|
912
1150
|
|
|
913
1151
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
914
1152
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#removeEdge">removeEdge</a></p>
|
|
915
1153
|
<ul>
|
|
916
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1154
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L231">src/data-structures/graph/directed-graph.ts:231</a></li></ul></aside></li></ul></section>
|
|
917
1155
|
<section class="tsd-panel tsd-member"><a id="removeEdgeBetween" class="tsd-anchor"></a>
|
|
918
1156
|
<h3 class="tsd-anchor-link"><span>remove<wbr/>Edge<wbr/>Between</span><a href="#removeEdgeBetween" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
919
1157
|
<ul class="tsd-signatures">
|
|
920
1158
|
<li class="tsd-signature tsd-anchor-link" id="removeEdgeBetween.removeEdgeBetween-1"><span class="tsd-kind-call-signature">remove<wbr/>Edge<wbr/>Between</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">srcOrId</span>, <span class="tsd-kind-parameter">destOrId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span><a href="#removeEdgeBetween.removeEdgeBetween-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
921
1159
|
<li class="tsd-description">
|
|
922
|
-
<div class="tsd-comment tsd-typography"><p>The function removes an edge between two vertices in a directed graph and returns the removed
|
|
1160
|
+
<div class="tsd-comment tsd-typography"><p>The <code>removeEdgeBetween</code> function removes an edge between two vertices in a directed graph and returns the removed
|
|
1161
|
+
edge, or null if the edge was not found.</p>
|
|
923
1162
|
</div>
|
|
924
1163
|
<div class="tsd-parameters">
|
|
925
1164
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
926
1165
|
<ul class="tsd-parameter-list">
|
|
927
1166
|
<li>
|
|
928
1167
|
<h5><span class="tsd-kind-parameter">srcOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
929
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
1168
|
+
<div class="tsd-comment tsd-typography"><p>The <code>srcOrId</code> parameter represents either a <code>V</code>
|
|
1169
|
+
object or a <code>VertexId</code> value. It is used to specify the source vertex of the edge that you want to remove.</p>
|
|
930
1170
|
</div>
|
|
931
1171
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
932
1172
|
<li>
|
|
933
1173
|
<h5><span class="tsd-kind-parameter">destOrId</span>: <a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span></h5>
|
|
934
|
-
<div class="tsd-comment tsd-typography"><p>The <code>destOrId</code> parameter
|
|
935
|
-
|
|
936
|
-
(<code>VertexId</code>).</p>
|
|
1174
|
+
<div class="tsd-comment tsd-typography"><p>The <code>destOrId</code> parameter represents the destination vertex of the
|
|
1175
|
+
edge that you want to remove. It can be either a <code>V</code> object or a <code>VertexId</code> value.</p>
|
|
937
1176
|
</div>
|
|
938
1177
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
939
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4><p>The function <code>removeEdgeBetween</code> returns the removed edge (<code>E</code>) if
|
|
940
|
-
|
|
941
|
-
edge does not exist, it returns <code>null</code>.</p>
|
|
1178
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">E</span></h4><p>The function <code>removeEdgeBetween</code> returns the removed edge (<code>E</code>) if it exists, or <code>null</code> if
|
|
1179
|
+
the edge does not exist.</p>
|
|
942
1180
|
|
|
943
1181
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
944
1182
|
<p>Overrides <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#removeEdgeBetween">removeEdgeBetween</a></p>
|
|
945
1183
|
<ul>
|
|
946
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1184
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L194">src/data-structures/graph/directed-graph.ts:194</a></li></ul></aside></li></ul></section>
|
|
947
1185
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="removeVertex" class="tsd-anchor"></a>
|
|
948
1186
|
<h3 class="tsd-anchor-link"><span>remove<wbr/>Vertex</span><a href="#removeVertex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
949
1187
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -965,7 +1203,7 @@ edge does not exist, it returns <code>null</code>.</p>
|
|
|
965
1203
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
966
1204
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#removeVertex">removeVertex</a></p>
|
|
967
1205
|
<ul>
|
|
968
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1206
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L173">src/data-structures/graph/abstract-graph.ts:173</a></li></ul></aside></li></ul></section>
|
|
969
1207
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="setEdgeWeight" class="tsd-anchor"></a>
|
|
970
1208
|
<h3 class="tsd-anchor-link"><span>set<wbr/>Edge<wbr/>Weight</span><a href="#setEdgeWeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
971
1209
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1000,7 +1238,7 @@ the weight of the edge and return true. If the edge does not exist, the function
|
|
|
1000
1238
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1001
1239
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#setEdgeWeight">setEdgeWeight</a></p>
|
|
1002
1240
|
<ul>
|
|
1003
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1241
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L233">src/data-structures/graph/abstract-graph.ts:233</a></li></ul></aside></li></ul></section>
|
|
1004
1242
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="tarjan" class="tsd-anchor"></a>
|
|
1005
1243
|
<h3 class="tsd-anchor-link"><span>tarjan</span><a href="#tarjan" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1006
1244
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1062,36 +1300,21 @@ are arrays of vertices that form cycles within the SCCs.</p>
|
|
|
1062
1300
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1063
1301
|
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#tarjan">tarjan</a></p>
|
|
1064
1302
|
<ul>
|
|
1065
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1303
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/abstract-graph.ts#L869">src/data-structures/graph/abstract-graph.ts:869</a></li></ul></aside></li></ul></section>
|
|
1066
1304
|
<section class="tsd-panel tsd-member"><a id="topologicalSort" class="tsd-anchor"></a>
|
|
1067
1305
|
<h3 class="tsd-anchor-link"><span>topological<wbr/>Sort</span><a href="#topologicalSort" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1068
1306
|
<ul class="tsd-signatures">
|
|
1069
1307
|
<li class="tsd-signature tsd-anchor-link" id="topologicalSort.topologicalSort-1"><span class="tsd-kind-call-signature">topological<wbr/>Sort</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">(</span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#topologicalSort.topologicalSort-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1070
1308
|
<li class="tsd-description">
|
|
1071
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
1072
|
-
|
|
1073
|
-
The <code>topologicalSort</code> function performs a topological sort on a graph and returns the sorted vertices in reverse
|
|
1074
|
-
order, or null if the graph contains a cycle.</p>
|
|
1075
|
-
</div>
|
|
1076
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">(</span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>topologicalSort()</code> returns an array of vertices in topological order if there is no cycle in
|
|
1077
|
-
the graph. If there is a cycle, it returns <code>null</code>.</p>
|
|
1078
|
-
|
|
1079
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1080
|
-
<ul>
|
|
1081
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c1b5969/src/data-structures/graph/directed-graph.ts#L324">src/data-structures/graph/directed-graph.ts:324</a></li></ul></aside></li></ul></section>
|
|
1082
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="vertexSet" class="tsd-anchor"></a>
|
|
1083
|
-
<h3 class="tsd-anchor-link"><span>vertex<wbr/>Set</span><a href="#vertexSet" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1084
|
-
<ul class="tsd-signatures tsd-is-inherited">
|
|
1085
|
-
<li class="tsd-signature tsd-anchor-link" id="vertexSet.vertexSet-1"><span class="tsd-kind-call-signature">vertex<wbr/>Set</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Map</span><span class="tsd-signature-symbol"><</span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">></span><a href="#vertexSet.vertexSet-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1086
|
-
<li class="tsd-description">
|
|
1087
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>vertexSet()</code> returns a map of vertices.</p>
|
|
1309
|
+
<div class="tsd-comment tsd-typography"><p>The <code>topologicalSort</code> function performs a topological sort on a directed graph and returns the sorted vertices in
|
|
1310
|
+
reverse order, or null if the graph contains a cycle.</p>
|
|
1088
1311
|
</div>
|
|
1089
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">
|
|
1312
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">(</span><a href="../types/VertexId.html" class="tsd-signature-type tsd-kind-type-alias">VertexId</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">V</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>topologicalSort()</code> returns an array of <code>V</code> or <code>VertexId</code> objects in
|
|
1313
|
+
topological order, or <code>null</code> if there is a cycle in the graph.</p>
|
|
1090
1314
|
|
|
1091
1315
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1092
|
-
<p>Inherited from <a href="AbstractGraph.html">AbstractGraph</a>.<a href="AbstractGraph.html#vertexSet">vertexSet</a></p>
|
|
1093
1316
|
<ul>
|
|
1094
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1317
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/graph/directed-graph.ts#L377">src/data-structures/graph/directed-graph.ts:377</a></li></ul></aside></li></ul></section></section></div>
|
|
1095
1318
|
<div class="col-sidebar">
|
|
1096
1319
|
<div class="page-menu">
|
|
1097
1320
|
<div class="tsd-navigation settings">
|
|
@@ -1112,12 +1335,25 @@ the graph. If there is a cycle, it returns <code>null</code>.</p>
|
|
|
1112
1335
|
<div class="tsd-accordion-details">
|
|
1113
1336
|
<ul>
|
|
1114
1337
|
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
1115
|
-
<li><a href="#
|
|
1116
|
-
<li><a href="#
|
|
1117
|
-
<li><a href="#
|
|
1338
|
+
<li><a href="#_edgeConstructor" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_edge<wbr/>Constructor</span></a></li>
|
|
1339
|
+
<li><a href="#_inEdgeMap" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_in<wbr/>Edge<wbr/>Map</span></a></li>
|
|
1340
|
+
<li><a href="#_outEdgeMap" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_out<wbr/>Edge<wbr/>Map</span></a></li>
|
|
1341
|
+
<li><a href="#_vertexConstructor" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_vertex<wbr/>Constructor</span></a></li>
|
|
1342
|
+
<li><a href="#inEdgeMap" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>in<wbr/>Edge<wbr/>Map</span></a></li>
|
|
1343
|
+
<li><a href="#outEdgeMap" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>out<wbr/>Edge<wbr/>Map</span></a></li>
|
|
1344
|
+
<li><a href="#vertices" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>vertices</span></a></li>
|
|
1345
|
+
<li><a href="#_createEdge" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Edge</span></a></li>
|
|
1346
|
+
<li><a href="#_createVertex" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Vertex</span></a></li>
|
|
1347
|
+
<li><a href="#_getVertex" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Vertex</span></a></li>
|
|
1348
|
+
<li><a href="#_getVertexId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Vertex<wbr/>Id</span></a></li>
|
|
1349
|
+
<li><a href="#_setInEdgeMap" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>In<wbr/>Edge<wbr/>Map</span></a></li>
|
|
1350
|
+
<li><a href="#_setOutEdgeMap" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Out<wbr/>Edge<wbr/>Map</span></a></li>
|
|
1351
|
+
<li><a href="#_setVertices" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Vertices</span></a></li>
|
|
1118
1352
|
<li><a href="#addEdge" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Edge</span></a></li>
|
|
1119
1353
|
<li><a href="#addVertex" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Vertex</span></a></li>
|
|
1120
1354
|
<li><a href="#bellmanFord" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>bellman<wbr/>Ford</span></a></li>
|
|
1355
|
+
<li><a href="#createAddEdge" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Add<wbr/>Edge</span></a></li>
|
|
1356
|
+
<li><a href="#createAddVertex" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Add<wbr/>Vertex</span></a></li>
|
|
1121
1357
|
<li><a href="#degreeOf" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>degree<wbr/>Of</span></a></li>
|
|
1122
1358
|
<li><a href="#dijkstra" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>dijkstra</span></a></li>
|
|
1123
1359
|
<li><a href="#dijkstraWithoutHeap" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>dijkstra<wbr/>Without<wbr/>Heap</span></a></li>
|
|
@@ -1135,7 +1371,6 @@ the graph. If there is a cycle, it returns <code>null</code>.</p>
|
|
|
1135
1371
|
<li><a href="#getNeighbors" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Neighbors</span></a></li>
|
|
1136
1372
|
<li><a href="#getPathSumWeight" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>Sum<wbr/>Weight</span></a></li>
|
|
1137
1373
|
<li><a href="#getVertex" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Vertex</span></a></li>
|
|
1138
|
-
<li><a href="#getVertexId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Vertex<wbr/>Id</span></a></li>
|
|
1139
1374
|
<li><a href="#hasEdge" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has<wbr/>Edge</span></a></li>
|
|
1140
1375
|
<li><a href="#hasVertex" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has<wbr/>Vertex</span></a></li>
|
|
1141
1376
|
<li><a href="#inDegreeOf" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>in<wbr/>Degree<wbr/>Of</span></a></li>
|
|
@@ -1149,14 +1384,14 @@ the graph. If there is a cycle, it returns <code>null</code>.</p>
|
|
|
1149
1384
|
<li><a href="#removeVertex" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>Vertex</span></a></li>
|
|
1150
1385
|
<li><a href="#setEdgeWeight" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>set<wbr/>Edge<wbr/>Weight</span></a></li>
|
|
1151
1386
|
<li><a href="#tarjan" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>tarjan</span></a></li>
|
|
1152
|
-
<li><a href="#topologicalSort" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>topological<wbr/>Sort</span></a></li>
|
|
1153
|
-
<li><a href="#vertexSet" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>vertex<wbr/>Set</span></a></li></ul></div></details></div>
|
|
1387
|
+
<li><a href="#topologicalSort" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>topological<wbr/>Sort</span></a></li></ul></div></details></div>
|
|
1154
1388
|
<div class="site-menu">
|
|
1155
1389
|
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>data-<wbr/>structure-<wbr/>typed</span></a>
|
|
1156
1390
|
<ul class="tsd-small-nested-navigation">
|
|
1157
1391
|
<li><a href="../enums/CP.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>CP</span></a></li>
|
|
1158
1392
|
<li><a href="../enums/FamilyPosition.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Family<wbr/>Position</span></a></li>
|
|
1159
1393
|
<li><a href="../enums/LoopType.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Loop<wbr/>Type</span></a></li>
|
|
1394
|
+
<li><a href="../enums/TopologicalProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Topological<wbr/>Property</span></a></li>
|
|
1160
1395
|
<li><a href="AVLTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AVLTree</span></a></li>
|
|
1161
1396
|
<li><a href="AVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>AVLTree<wbr/>Node</span></a></li>
|
|
1162
1397
|
<li><a href="AaTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Aa<wbr/>Tree</span></a></li>
|
|
@@ -1193,7 +1428,6 @@ the graph. If there is a cycle, it returns <code>null</code>.</p>
|
|
|
1193
1428
|
<li><a href="Pair.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Pair</span></a></li>
|
|
1194
1429
|
<li><a href="PriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Priority<wbr/>Queue</span></a></li>
|
|
1195
1430
|
<li><a href="Queue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Queue</span></a></li>
|
|
1196
|
-
<li><a href="RBTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree</span></a></li>
|
|
1197
1431
|
<li><a href="SegmentTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree</span></a></li>
|
|
1198
1432
|
<li><a href="SegmentTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree<wbr/>Node</span></a></li>
|
|
1199
1433
|
<li><a href="SinglyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List</span></a></li>
|
|
@@ -1212,13 +1446,13 @@ the graph. If there is a cycle, it returns <code>null</code>.</p>
|
|
|
1212
1446
|
<li><a href="UndirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Graph</span></a></li>
|
|
1213
1447
|
<li><a href="UndirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Vertex</span></a></li>
|
|
1214
1448
|
<li><a href="Vector2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Vector2D</span></a></li>
|
|
1215
|
-
<li><a href="../interfaces/
|
|
1216
|
-
<li><a href="../interfaces/
|
|
1449
|
+
<li><a href="../interfaces/IBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>IBinary<wbr/>Tree</span></a></li>
|
|
1450
|
+
<li><a href="../interfaces/IBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBinary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
1217
1451
|
<li><a href="../interfaces/IDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IDirected<wbr/>Graph</span></a></li>
|
|
1218
1452
|
<li><a href="../interfaces/IGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IGraph</span></a></li>
|
|
1219
|
-
<li><a href="../interfaces/
|
|
1220
|
-
<li><a href="../
|
|
1221
|
-
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><
|
|
1453
|
+
<li><a href="../interfaces/IUNDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IUNDirected<wbr/>Graph</span></a></li>
|
|
1454
|
+
<li><a href="../types/AVLTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Deleted</span></a></li>
|
|
1455
|
+
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTComparator</span></a></li>
|
|
1222
1456
|
<li><a href="../types/BSTDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTDeleted<wbr/>Result</span></a></li>
|
|
1223
1457
|
<li><a href="../types/BinaryTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted</span></a></li>
|
|
1224
1458
|
<li><a href="../types/BinaryTreeNodeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Id</span></a></li>
|
|
@@ -1226,19 +1460,21 @@ the graph. If there is a cycle, it returns <code>null</code>.</p>
|
|
|
1226
1460
|
<li><a href="../types/DFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>DFSOrder<wbr/>Pattern</span></a></li>
|
|
1227
1461
|
<li><a href="../types/DijkstraResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Dijkstra<wbr/>Result</span></a></li>
|
|
1228
1462
|
<li><a href="../types/Direction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Direction</span></a></li>
|
|
1463
|
+
<li><a href="../types/EdgeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Edge<wbr/>Id</span></a></li>
|
|
1464
|
+
<li><a href="../types/HeapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Heap<wbr/>Options</span></a></li>
|
|
1465
|
+
<li><a href="../types/NavigatorParams.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Navigator<wbr/>Params</span></a></li>
|
|
1229
1466
|
<li><a href="../types/NodeOrPropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Node<wbr/>Or<wbr/>Property<wbr/>Name</span></a></li>
|
|
1230
1467
|
<li><a href="../types/PriorityQueueComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Comparator</span></a></li>
|
|
1231
1468
|
<li><a href="../types/PriorityQueueDFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>QueueDFSOrder<wbr/>Pattern</span></a></li>
|
|
1469
|
+
<li><a href="../types/PriorityQueueOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Options</span></a></li>
|
|
1470
|
+
<li><a href="../types/RecursiveAVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveAVLTree<wbr/>Node</span></a></li>
|
|
1471
|
+
<li><a href="../types/RecursiveBSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveBSTNode</span></a></li>
|
|
1472
|
+
<li><a href="../types/RecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
1232
1473
|
<li><a href="../types/ResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
1233
1474
|
<li><a href="../types/ResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
1234
1475
|
<li><a href="../types/SegmentTreeNodeVal.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Segment<wbr/>Tree<wbr/>Node<wbr/>Val</span></a></li>
|
|
1235
|
-
<li><a href="../types/SpecifyOptional.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Specify<wbr/>Optional</span></a></li>
|
|
1236
|
-
<li><a href="../types/Thunk.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Thunk</span></a></li>
|
|
1237
|
-
<li><a href="../types/ToThunkFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>To<wbr/>Thunk<wbr/>Fn</span></a></li>
|
|
1238
1476
|
<li><a href="../types/TopologicalStatus.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Topological<wbr/>Status</span></a></li>
|
|
1239
1477
|
<li><a href="../types/TreeMultiSetDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Deleted<wbr/>Result</span></a></li>
|
|
1240
|
-
<li><a href="../types/TrlAsyncFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Async<wbr/>Fn</span></a></li>
|
|
1241
|
-
<li><a href="../types/TrlFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Fn</span></a></li>
|
|
1242
1478
|
<li><a href="../types/Turning.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Turning</span></a></li>
|
|
1243
1479
|
<li><a href="../types/VertexId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Vertex<wbr/>Id</span></a></li></ul></nav></div></div></div>
|
|
1244
1480
|
<div class="tsd-generator">
|