2023-08-12 03:35:25 +00:00
<!DOCTYPE html> < html class = "default" lang = "en" > < head > < meta charSet = "utf-8" / > < meta http-equiv = "x-ua-compatible" content = "IE=edge" / > < title > DirectedGraph | data-structure-typed< / title > < meta name = "description" content = "Documentation for data-structure-typed" / > < meta name = "viewport" content = "width=device-width, initial-scale=1" / > < link rel = "stylesheet" href = "../assets/style.css" / > < link rel = "stylesheet" href = "../assets/highlight.css" / > < script defer src = "../assets/main.js" > < / script > < script async src = "../assets/search.js" id = "tsd-search-script" > < / script > < / head > < body > < script > document . documentElement . dataset . theme = localStorage . getItem ( "tsd-theme" ) || "os" < / script > < header class = "tsd-page-toolbar" >
< div class = "tsd-toolbar-contents container" >
< div class = "table-cell" id = "tsd-search" data-base = ".." >
< div class = "field" > < label for = "tsd-search-field" class = "tsd-widget tsd-toolbar-icon search no-caption" > < svg width = "16" height = "16" viewBox = "0 0 16 16" fill = "none" > < path d = "M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill = "var(--color-text)" > < / path > < / svg > < / label > < input type = "text" id = "tsd-search-field" aria-label = "Search" / > < / div >
< div class = "field" >
< div id = "tsd-toolbar-links" > < / div > < / div >
< ul class = "results" >
< li class = "state loading" > Preparing search index...< / li >
< li class = "state failure" > The search index is not available< / li > < / ul > < a href = "../index.html" class = "title" > data-structure-typed< / a > < / div >
< div class = "table-cell" id = "tsd-widgets" > < a href = "#" class = "tsd-widget tsd-toolbar-icon menu no-caption" data-toggle = "menu" aria-label = "Menu" > < svg width = "16" height = "16" viewBox = "0 0 16 16" fill = "none" > < rect x = "1" y = "3" width = "14" height = "2" fill = "var(--color-text)" > < / rect > < rect x = "1" y = "7" width = "14" height = "2" fill = "var(--color-text)" > < / rect > < rect x = "1" y = "11" width = "14" height = "2" fill = "var(--color-text)" > < / rect > < / svg > < / a > < / div > < / div > < / header >
< div class = "container container-main" >
< div class = "col-content" >
< div class = "tsd-page-title" >
< ul class = "tsd-breadcrumb" >
< li > < a href = "../modules.html" > data-structure-typed< / a > < / li >
< li > < a href = "DirectedGraph.html" > DirectedGraph< / a > < / li > < / ul >
< h1 > Class DirectedGraph< V, E> < / h1 > < / div >
< section class = "tsd-panel" >
< h4 > Type Parameters< / h4 >
< ul class = "tsd-type-parameter-list" >
< li >
< 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 >
< li >
< 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 >
< section class = "tsd-panel tsd-hierarchy" >
< h4 > Hierarchy< / h4 >
< ul class = "tsd-hierarchy" >
< li > < a href = "AbstractGraph.html" class = "tsd-signature-type tsd-kind-class" > AbstractGraph< / 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 >
< ul class = "tsd-hierarchy" >
< li > < span class = "target" > DirectedGraph< / span > < / li > < / ul > < / li > < / ul > < / section >
< section class = "tsd-panel" >
< h4 > Implements< / h4 >
< ul class = "tsd-hierarchy" >
< li > < span class = "tsd-signature-type " > IDirectedGraph< / 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 > < / li > < / ul > < / section > < aside class = "tsd-sources" >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L43" > src/data-structures/graph/directed-graph.ts:43< / a > < / li > < / ul > < / aside >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel-group tsd-index-group" >
< section class = "tsd-panel tsd-index-panel" >
< details class = "tsd-index-content tsd-index-accordion" open > < summary class = "tsd-accordion-summary tsd-index-summary" >
< h5 class = "tsd-index-heading uppercase" role = "button" aria-expanded = "false" tabIndex = 0 > < svg width = "16" height = "16" viewBox = "0 0 16 16" fill = "none" > < path d = "M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill = "var(--color-text)" > < / path > < / svg > Index< / h5 > < / summary >
< div class = "tsd-accordion-details" >
< section class = "tsd-index-section" >
< h3 class = "tsd-index-heading" > Constructors< / h3 >
< div class = "tsd-index-list" > < a href = "DirectedGraph.html#constructor" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < g id = "icon-512" > < rect fill = "var(--color-icon-background)" stroke = "#4D7FFF" stroke-width = "1.5" x = "1" y = "1" width = "22" height = "22" rx = "12" > < / 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 > constructor< / span > < / a >
< / div > < / section >
< section class = "tsd-index-section" >
< h3 class = "tsd-index-heading" > Properties< / h3 >
< div class = "tsd-index-list" > < a href = "DirectedGraph.html#_inEdgeMap" class = "tsd-index-link tsd-is-protected" > < 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 > _in< wbr / > Edge< wbr / > Map< / span > < / a >
< a href = "DirectedGraph.html#_outEdgeMap" class = "tsd-index-link tsd-is-protected" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-1024" > < / use > < / svg > < span > _out< wbr / > Edge< wbr / > Map< / span > < / a >
< a href = "DirectedGraph.html#_vertices" class = "tsd-index-link tsd-is-protected tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-1024" > < / use > < / svg > < span > _vertices< / span > < / a >
< / div > < / section >
< section class = "tsd-index-section" >
< h3 class = "tsd-index-heading" > Methods< / h3 >
< div class = "tsd-index-list" > < a href = "DirectedGraph.html#addEdge" 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 > add< wbr / > Edge< / span > < / a >
< 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 >
< 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 >
< a href = "DirectedGraph.html#containsEdge" class = "tsd-index-link tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > contains< wbr / > Edge< / span > < / a >
< a href = "DirectedGraph.html#containsVertex" class = "tsd-index-link tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > contains< wbr / > Vertex< / span > < / a >
< 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 >
< 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 >
< 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 >
< a href = "DirectedGraph.html#edgeSet" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > edge< wbr / > Set< / span > < / a >
< a href = "DirectedGraph.html#edgesOf" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > edges< wbr / > Of< / span > < / a >
< a href = "DirectedGraph.html#floyd" class = "tsd-index-link tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > floyd< / span > < / a >
< a href = "DirectedGraph.html#getAllPathsBetween" 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 / > All< wbr / > Paths< wbr / > Between< / span > < / a >
< a href = "DirectedGraph.html#getDestinations" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Destinations< / span > < / a >
< a href = "DirectedGraph.html#getEdge" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Edge< / span > < / a >
< a href = "DirectedGraph.html#getEdgeDest" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Edge< wbr / > Dest< / span > < / a >
< a href = "DirectedGraph.html#getEdgeSrc" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Edge< wbr / > Src< / span > < / a >
< a href = "DirectedGraph.html#getEndsOfEdge" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Ends< wbr / > Of< wbr / > Edge< / span > < / a >
< a href = "DirectedGraph.html#getMinCostBetween" 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 / > Min< wbr / > Cost< wbr / > Between< / span > < / a >
< a href = "DirectedGraph.html#getMinPathBetween" 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 / > Min< wbr / > Path< wbr / > Between< / span > < / a >
< 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< a href = "DirectedGraph.html#incomingEdgesOf" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > incoming< wbr / > Edges< wbr / > Of< / span > < / a >
< a href = "DirectedGraph.html#outDegreeOf" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > out< wbr / > Degree< wbr / > Of< / span > < / a >
< a href = "DirectedGraph.html#outgoingEdgesOf" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > outgoing< wbr / > Edges< wbr / > Of< / span > < / a >
< a href = "DirectedGraph.html#removeAllEdges" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > All< wbr / > Edges< / span > < / a >
< a href = "DirectedGraph.html#removeAllVertices" class = "tsd-index-link tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > All< wbr / > Vertices< / span > < / a >
< a href = "DirectedGraph.html#removeEdge" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > Edge< / span > < / a >
< a href = "DirectedGraph.html#removeEdgeBetween" class = "tsd-index-link" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > Edge< wbr / > Between< / span > < / a >
< a href = "DirectedGraph.html#removeVertex" class = "tsd-index-link 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< / div > < / section > < / div > < / details > < / section > < / section >
< section class = "tsd-panel-group tsd-member-group" >
< h2 > Constructors< / h2 >
< section class = "tsd-panel tsd-member" > < a id = "constructor" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< section class = "tsd-panel" >
< h4 > Type Parameters< / h4 >
< ul class = "tsd-type-parameter-list" >
< li >
< 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 tsd-kind-type-parameter" > V< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 > < / li >
< li >
< 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 tsd-kind-type-parameter" > E< / span > < span class = "tsd-signature-symbol" > > < / span > < / h4 > < / li > < / ul > < / section >
< 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" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#constructor" > constructor< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L49" > src/data-structures/graph/directed-graph.ts:49< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel-group tsd-member-group" >
< h2 > Properties< / h2 >
< section class = "tsd-panel tsd-member tsd-is-protected" > < a id = "_inEdgeMap" class = "tsd-anchor" > < / a >
< h3 class = "tsd-anchor-link" > < code class = "tsd-tag ts-flagProtected" > Protected< / 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 >
< 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" >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L47" > src/data-structures/graph/directed-graph.ts:47< / a > < / li > < / ul > < / aside > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-protected" > < a id = "_outEdgeMap" class = "tsd-anchor" > < / a >
< h3 class = "tsd-anchor-link" > < code class = "tsd-tag ts-flagProtected" > Protected< / 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 >
< 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" >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L45" > src/data-structures/graph/directed-graph.ts:45< / a > < / li > < / ul > < / aside > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-protected tsd-is-inherited" > < a id = "_vertices" class = "tsd-anchor" > < / a >
< h3 class = "tsd-anchor-link" > < code class = "tsd-tag ts-flagProtected" > Protected< / code > < 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 >
< div class = "tsd-signature" > < span class = "tsd-kind-property" > _vertices< / 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 " > VertexId< / 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-symbol" > = ...< / span > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#_vertices" > _vertices< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L59" > src/data-structures/graph/abstract-graph.ts:59< / a > < / li > < / ul > < / aside > < / section > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel-group tsd-member-group" >
< h2 > Methods< / h2 >
< section class = "tsd-panel tsd-member" > < a id = "addEdge" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The < code > addEdge< / code > function adds an edge to a graph if the source and destination vertices exist.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > edge< / span > : < span class = "tsd-signature-type tsd-kind-type-parameter" > E< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > edge< / code > is of type < code > E< / code > , which represents an edge in the graph. It contains
information about the source vertex (< code > src< / code > ) and the destination vertex (< code > dest< / code > ) of the edge.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > boolean< / span > < / h4 > < p > The < code > addEdge< / code > function returns a boolean value. It returns < code > true< / code > if the edge was successfully added to the
graph, and < code > false< / code > if either the source or destination vertices of the edge are not present in the graph.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#addEdge" > addEdge< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L86" > src/data-structures/graph/directed-graph.ts:86< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "addVertex" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The addVertex function adds a new vertex to a graph if it does not already exist.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > newVertex< / span > : < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter " newVertex" is of type V, which represents a vertex in a graph.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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
false. Otherwise, it will add the newVertex to the graph and return true.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#addVertex" > addVertex< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L114" > src/data-structures/graph/abstract-graph.ts:114< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "bellmanFord" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "bellmanFord.bellmanFord-1" > < span class = "tsd-kind-call-signature" > bellman< wbr / > Ford< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > src< / span > , < span class = "tsd-kind-parameter" > scanNegativeCycle< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > getMin< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > genPath< / 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 > < br / > < span > < / span > < span class = "tsd-kind-property" > distMap< / 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > hasNegativeCycle< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > undefined< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > boolean< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > min< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > number< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > minPath< / 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-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > paths< / 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-symbol" > []< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > preMap< / 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" > V< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span class = "tsd-signature-symbol" > }< / span > < a href = "#bellmanFord.bellmanFord-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > BellmanFord time:O(VE) space:O(V)
one to rest pairs
The < code > bellmanFord< / code > function implements the Bellman-Ford algorithm to find the shortest path from a source vertex to
all other vertices in a graph, and optionally detects negative cycles and generates the minimum path.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > src< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > src< / code > parameter is the source vertex from which the Bellman-Ford algorithm will
start calculating the shortest paths. It can be either a vertex object or a vertex ID.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > scanNegativeCycle< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > A boolean flag indicating whether to scan for negative cycles in the graph.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > getMin< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > getMin< / code > parameter is a boolean flag that determines whether the algorithm should
calculate the minimum distance from the source vertex to all other vertices in the graph. If < code > getMin< / code > is set to
< code > true< / code > , the algorithm will find the minimum distance and update the < code > min< / code > variable with the minimum< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > genPath< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > A boolean flag indicating whether to generate paths for all vertices from the source
vertex.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-symbol" > { < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > distMap< / 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > hasNegativeCycle< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > undefined< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > boolean< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > min< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > number< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > minPath< / 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-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > paths< / 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-symbol" > []< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > preMap< / 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" > V< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span class = "tsd-signature-symbol" > }< / span > < / h4 > < p > The function < code > bellmanFord< / code > returns an object with the following properties:< / p >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > dist< 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > has< wbr / > Negative< wbr / > Cycle< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > undefined< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > boolean< / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > min< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > number< / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > min< wbr / > Path< / 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 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > paths< / 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-symbol" > []< / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > pre< 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" > V< / span > < span class = "tsd-signature-symbol" > > < / span > < / h5 > < / li > < / ul >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#bellmanFord" > bellmanFord< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L636" > src/data-structures/graph/abstract-graph.ts:636< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "containsEdge" class = "tsd-anchor" > < / a >
< h3 class = "tsd-anchor-link" > < span > contains< wbr / > Edge< / span > < a href = "#containsEdge" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / h3 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "containsEdge.containsEdge-1" > < span class = "tsd-kind-call-signature" > contains< wbr / > Edge< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > v1< / span > , < span class = "tsd-kind-parameter" > v2< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > boolean< / span > < a href = "#containsEdge.containsEdge-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function checks if there is an edge between two vertices in a graph.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > v1< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter v1 can be either a VertexId or a V. A VertexId represents the identifier of
a vertex in a graph, while V represents the type of the vertex itself.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > v2< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > v2< / code > represents the second vertex in an edge. It can be either a < code > VertexId< / code >
or a < code > V< / code > type.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > boolean< / span > < / h4 > < p > The function < code > containsEdge< / code > returns a boolean value. It returns < code > true< / code > if there is an edge between the
vertices < code > v1< / code > and < code > v2< / code > , and < code > false< / code > otherwise.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#containsEdge" > containsEdge< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L163" > src/data-structures/graph/abstract-graph.ts:163< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "containsVertex" class = "tsd-anchor" > < / a >
< h3 class = "tsd-anchor-link" > < span > contains< wbr / > Vertex< / span > < a href = "#containsVertex" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / h3 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "containsVertex.containsVertex-1" > < span class = "tsd-kind-call-signature" > contains< 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" > boolean< / span > < a href = "#containsVertex.containsVertex-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function checks if a vertex exists in a graph.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > vertexOrId< / code > can accept either a vertex object (< code > V< / code > ) or a vertex ID
(< code > VertexId< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > boolean< / span > < / h4 > < p > The method < code > containsVertex< / code > returns a boolean value.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#containsVertex" > containsVertex< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L94" > src/data-structures/graph/abstract-graph.ts:94< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "degreeOf" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< 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 and in-degree.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > vertexOrId< / code > can be either a < code > VertexId< / code > or a < code > V< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 specified vertex or vertex ID.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#degreeOf" > degreeOf< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L226" > src/data-structures/graph/directed-graph.ts:226< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "dijkstra" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "dijkstra.dijkstra-1" > < span class = "tsd-kind-call-signature" > dijkstra< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > src< / span > , < span class = "tsd-kind-parameter" > dest< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > getMinDist< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > genPaths< / span > < span class = "tsd-signature-symbol" > ?< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type " > DijkstraResult< / 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 = "#dijkstra.dijkstra-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > Dijkstra algorithm time: O(logVE) space: O(V + E)
The < code > dijkstra< / code > function implements Dijkstra' s algorithm to find the shortest path between a source vertex and an
optional destination vertex, and optionally returns the minimum distance, the paths, and other information.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > src< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > src< / code > parameter represents the source vertex from which the Dijkstra algorithm will
start. It can be either a vertex object or a vertex ID.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > dest< / span > : < span class = "tsd-signature-type" > null< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > dest< / code > parameter is the destination vertex or vertex ID. It specifies the
vertex to which the shortest path is calculated from the source vertex. If no destination is provided, the algorithm
will calculate the shortest paths to all other vertices from the source vertex.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > getMinDist< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > getMinDist< / code > parameter is a boolean flag that determines whether the minimum
distance from the source vertex to the destination vertex should be calculated and returned in the result. If
< code > getMinDist< / code > is set to < code > true< / code > , the < code > minDist< / code > property in the result will contain the minimum distance< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > genPaths< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > genPaths< / code > parameter is a boolean flag that determines whether or not to generate
paths in the Dijkstra algorithm. If < code > genPaths< / code > is set to < code > true< / code > , the algorithm will calculate and return the
shortest paths from the source vertex to all other vertices in the graph. If < code > genPaths @returns The function < / code > dijkstra< code > returns an object of type< / code > DijkstraResult< V > `.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type " > DijkstraResult< / 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 >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#dijkstra" > dijkstra< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L511" > src/data-structures/graph/abstract-graph.ts:511< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "dijkstraWithoutHeap" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "dijkstraWithoutHeap.dijkstraWithoutHeap-1" > < span class = "tsd-kind-call-signature" > dijkstra< wbr / > Without< wbr / > Heap< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > src< / span > , < span class = "tsd-kind-parameter" > dest< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > getMinDist< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > genPaths< / span > < span class = "tsd-signature-symbol" > ?< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type " > DijkstraResult< / 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 = "#dijkstraWithoutHeap.dijkstraWithoutHeap-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > Dijkstra algorithm time: O(VE) space: O(V + E)
The function < code > dijkstraWithoutHeap< / code > implements Dijkstra' s algorithm to find the shortest path between two vertices in
a graph without using a heap data structure.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > src< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The source vertex from which to start the Dijkstra' s algorithm. It can be either a
vertex object or a vertex ID.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > dest< / span > : < span class = "tsd-signature-type" > null< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > dest< / code > parameter in the < code > dijkstraWithoutHeap< / code > function is an optional
parameter that specifies the destination vertex for the Dijkstra algorithm. It can be either a vertex object or its
identifier. If no destination is provided, the value is set to < code > null< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > getMinDist< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > getMinDist< / code > parameter is a boolean flag that determines whether the minimum
distance from the source vertex to the destination vertex should be calculated and returned in the result. If
< code > getMinDist< / code > is set to < code > true< / code > , the < code > minDist< / code > property in the result will contain the minimum distance< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > genPaths< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > genPaths< / code > parameter is a boolean flag that determines whether or not to generate
paths in the Dijkstra algorithm. If < code > genPaths< / code > is set to < code > true< / code > , the algorithm will calculate and return the
shortest paths from the source vertex to all other vertices in the graph. If < code > genPaths @returns The function < / code > dijkstraWithoutHeap< code > returns an object of type< / code > DijkstraResult< V > `.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type " > DijkstraResult< / 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 >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#dijkstraWithoutHeap" > dijkstraWithoutHeap< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L385" > src/data-structures/graph/abstract-graph.ts:385< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "edgeSet" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The < code > edgeSet< / code > function returns an array of all the edges in the graph.< / p >
< / div >
< 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 edges (< code > E[]< / code > ).< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#edgeSet" > edgeSet< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L379" > src/data-structures/graph/directed-graph.ts:379< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "edgesOf" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< 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 >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > vertexOrId< / code > can be either a < code > VertexId< / code > or a < code > V< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 function < code > edgesOf< / code > returns an array of edges.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#edgesOf" > edgesOf< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L253" > src/data-structures/graph/directed-graph.ts:253< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "floyd" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "floyd.floyd-1" > < span class = "tsd-kind-call-signature" > floyd< / 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 > < br / > < span > < / span > < span class = "tsd-kind-property" > costs< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > number< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > predecessor< / 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 > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span class = "tsd-signature-symbol" > }< / span > < a href = "#floyd.floyd-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > Floyd algorithm time: O(V^3) space: O(V^2), not support graph with negative weight cycle
all pairs
The function implements the Floyd-Warshall algorithm to find the shortest path between all pairs of vertices in a
graph.< / p >
< / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-symbol" > { < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > costs< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > number< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > predecessor< / 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 > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span class = "tsd-signature-symbol" > }< / span > < / h4 > < p > The function < code > floyd()< / code > returns an object with two properties: < code > costs< / code > and < code > predecessor< / code > . The < code > costs< / code >
property is a 2D array of numbers representing the shortest path costs between vertices in a graph. The
< code > predecessor< / code > property is a 2D array of vertices (or < code > null< / code > ) representing the predecessor vertices in the shortest
path between vertices in the< / p >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > costs< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > number< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > []< / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > predecessor< / 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 > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > []< / span > < span class = "tsd-signature-symbol" > []< / span > < / h5 > < / li > < / ul >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#floyd" > floyd< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L734" > src/data-structures/graph/abstract-graph.ts:734< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "getAllPathsBetween" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "getAllPathsBetween.getAllPathsBetween-1" > < span class = "tsd-kind-call-signature" > get< wbr / > All< wbr / > Paths< wbr / > Between< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > v1< / span > , < span class = "tsd-kind-parameter" > v2< / 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-symbol" > []< / span > < a href = "#getAllPathsBetween.getAllPathsBetween-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > getAllPathsBetween< / code > finds all paths between two vertices in a graph using depth-first search.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > v1< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > v1< / code > represents either a vertex object (< code > V< / code > ) or a vertex ID (< code > VertexId< / code > ).
It is the starting vertex for finding paths.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > v2< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > v2< / code > represents the destination vertex or its ID. It is the vertex that we
want to find paths to from the starting vertex < code > v1< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < 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 > an array of arrays of vertices (V[][]). Each inner array represents a path between the given vertices (v1
and v2).< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getAllPathsBetween" > getAllPathsBetween< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L202" > src/data-structures/graph/abstract-graph.ts:202< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "getDestinations" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > getDestinations< / code > returns an array of destination vertices connected to a given vertex.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertex< / span > : < span class = "tsd-signature-type" > null< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > vertex< / code > parameter represents the starting vertex from which we want to
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
< code > null< / code > if we want to find destinations from all vertices.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 vertices (V[]).< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L282" > src/data-structures/graph/directed-graph.ts:282< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "getEdge" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > getEdge< / code > returns the first edge between two vertices, given their source and destination.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > srcOrId< / span > : < span class = "tsd-signature-type" > null< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > srcOrId< / code > parameter can be either a vertex object (< code > V< / code > ), a vertex ID
(< code > VertexId< / code > ), or < code > null< / code > . It represents the source vertex of the edge.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > destOrId< / span > : < span class = "tsd-signature-type" > null< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > destOrId< / code > parameter is either a vertex object (< code > V< / code > ), a vertex ID
(< code > VertexId< / code > ), or < code > null< / code > . It represents the destination vertex of the edge.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 > an edge (E) or null.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getEdge" > getEdge< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L61" > src/data-structures/graph/directed-graph.ts:61< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "getEdgeDest" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function " getEdgeDest" returns the vertex associated with the destination of an edge.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > e< / span > : < span class = "tsd-signature-type tsd-kind-type-parameter" > E< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > e< / code > is of type < code > E< / code > , which represents an edge in a graph.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 vertex object (of type V) or null.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Implementation of IDirectedGraph.getEdgeDest< / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L271" > src/data-structures/graph/directed-graph.ts:271< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "getEdgeSrc" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function " getEdgeSrc" returns the source vertex of an edge, or null if the edge does not exist.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > e< / span > : < span class = "tsd-signature-type tsd-kind-type-parameter" > E< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > E - an edge object< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 source vertex of the given edge, or null if the edge does not exist.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Implementation of IDirectedGraph.getEdgeSrc< / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L262" > src/data-structures/graph/directed-graph.ts:262< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "getEndsOfEdge" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function " getEndsOfEdge" returns the source and destination vertices of an edge if it exists in the graph,
otherwise it returns null.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > edge< / span > : < span class = "tsd-signature-type tsd-kind-type-parameter" > E< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter " edge" is of type E, which represents an edge in a graph.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 two vertices [V, V] if the edge is found in the graph. If the edge is not found, it
returns null.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getEndsOfEdge" > getEndsOfEdge< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L416" > src/data-structures/graph/directed-graph.ts:416< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "getMinCostBetween" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "getMinCostBetween.getMinCostBetween-1" > < span class = "tsd-kind-call-signature" > get< wbr / > Min< wbr / > Cost< wbr / > Between< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > v1< / span > , < span class = "tsd-kind-parameter" > v2< / span > , < span class = "tsd-kind-parameter" > isWeight< / 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-type" > number< / span > < a href = "#getMinCostBetween.getMinCostBetween-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > getMinCostBetween< / code > calculates the minimum cost between two vertices in a graph, either based on edge
weights or using a breadth-first search algorithm.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > v1< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > v1< / code > represents the starting vertex or vertex ID of the graph.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > v2< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > v2< / code > represents the second vertex in the graph. It can be either a vertex
object or a vertex ID.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > isWeight< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > isWeight is an optional parameter that indicates whether the graph edges have weights.
If isWeight is set to true, the function will calculate the minimum cost between v1 and v2 based on the weights of
the edges. If isWeight is set to false or not provided, the function will calculate the< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > null< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type" > number< / span > < / h4 > < p > The function < code > getMinCostBetween< / code > returns a number representing the minimum cost between two vertices (< code > v1< / code >
and < code > v2< / code > ) in a graph. If the < code > isWeight< / code > parameter is < code > true< / code > , it calculates the minimum weight between the vertices.
If < code > isWeight< / code > is < code > false< / code > or not provided, it calculates the minimum number of edges between the vertices. If the
vertices are not< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getMinCostBetween" > getMinCostBetween< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L260" > src/data-structures/graph/abstract-graph.ts:260< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "getMinPathBetween" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "getMinPathBetween.getMinPathBetween-1" > < span class = "tsd-kind-call-signature" > get< wbr / > Min< wbr / > Path< wbr / > Between< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > v1< / span > , < span class = "tsd-kind-parameter" > v2< / span > , < span class = "tsd-kind-parameter" > isWeight< / 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-type tsd-kind-type-parameter" > V< / span > < span class = "tsd-signature-symbol" > []< / span > < a href = "#getMinPathBetween.getMinPathBetween-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > getMinPathBetween< / code > returns the minimum path between two vertices in a graph, either based on weight or
using a breadth-first search algorithm.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > v1< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > v1< / code > represents the starting vertex or its ID.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > v2< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > v2< / code > represents the destination vertex or its ID. It is the vertex that we
want to find the minimum path to from the source vertex < code > v1< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > isWeight< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > A boolean flag indicating whether to consider the weight of edges in finding the
minimum path. If set to true, the function will use Dijkstra' s algorithm to find the minimum weighted path. If set
to false, the function will use breadth-first search (BFS) to find the minimum path. If< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 > < span class = "tsd-signature-symbol" > []< / span > < / h4 > < p > The function < code > getMinPathBetween< / code > returns an array of vertices (< code > V[]< / code > ) representing the minimum path between
two vertices (< code > v1< / code > and < code > v2< / code > ). If no path is found, it returns < code > null< / code > .< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getMinPathBetween" > getMinPathBetween< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L317" > src/data-structures/graph/abstract-graph.ts:317< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "getNeighbors" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > getNeighbors< / code > returns an array of neighboring vertices for a given vertex or vertex ID.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< 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
(< code > VertexId< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 vertices (V[]).< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getNeighbors" > getNeighbors< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L393" > src/data-structures/graph/directed-graph.ts:393< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "getPathSumWeight" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "getPathSumWeight.getPathSumWeight-1" > < span class = "tsd-kind-call-signature" > get< wbr / > Path< wbr / > Sum< wbr / > Weight< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > path< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > number< / span > < a href = "#getPathSumWeight.getPathSumWeight-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function calculates the sum of weights along a given path.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > path< / span > : < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < span class = "tsd-signature-symbol" > []< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > An array of vertices (V) representing a path in a graph.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > number< / span > < / h4 > < p > The function < code > getPathSumWeight< / code > returns the sum of the weights of the edges in the given path.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getPathSumWeight" > getPathSumWeight< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L238" > src/data-structures/graph/abstract-graph.ts:238< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "getVertex" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< 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 >
< li class = "tsd-description" >
< 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
does not exist.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > vertexOrId< / code > can be either a < code > VertexId< / code > or a < code > V< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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.
If the vertex is found in the < code > _vertices< / code > map, it is returned. Otherwise, < code > null< / code > is returned.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getVertex" > getVertex< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L72" > src/data-structures/graph/abstract-graph.ts:72< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "getVertexId" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< 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 > < span class = "tsd-signature-type " > VertexId< / span > < 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 >
< li class = "tsd-description" >
< 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
a < code > VertexId< / code > .< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< 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
(< code > VertexId< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type " > VertexId< / span > < / h4 > < p > the id of the vertex.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#getVertexId" > getVertexId< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L84" > src/data-structures/graph/abstract-graph.ts:84< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "inDegreeOf" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function " inDegreeOf" returns the number of incoming edges for a given vertex.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > vertexOrId< / code > can be either a < code > VertexId< / code > or a < code > V< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Implementation of IDirectedGraph.inDegreeOf< / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L235" > src/data-structures/graph/directed-graph.ts:235< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "incomingEdgesOf" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > incomingEdgesOf< / code > returns an array of incoming edges for a given vertex or vertex ID.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< 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
(< code > VertexId< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 edges (< code > E[]< / code > ).< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Implementation of IDirectedGraph.incomingEdgesOf< / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L199" > src/data-structures/graph/directed-graph.ts:199< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "outDegreeOf" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > outDegreeOf< / code > returns the number of outgoing edges from a given vertex.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > vertexOrId< / code > can be either a < code > VertexId< / code > or a < code > V< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Implementation of IDirectedGraph.outDegreeOf< / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L244" > src/data-structures/graph/directed-graph.ts:244< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "outgoingEdgesOf" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< 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 >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The parameter < code > vertexOrId< / code > can accept either a vertex object (< code > V< / code > ) or a vertex ID
(< code > VertexId< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 outgoing edges from a given vertex or vertex ID.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Implementation of IDirectedGraph.outgoingEdgesOf< / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L213" > src/data-structures/graph/directed-graph.ts:213< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "removeAllEdges" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< li class = "tsd-signature tsd-anchor-link" id = "removeAllEdges.removeAllEdges-1" > < span class = "tsd-kind-call-signature" > remove< wbr / > All< wbr / > Edges< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > src< / span > , < span class = "tsd-kind-parameter" > dest< / 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 = "#removeAllEdges.removeAllEdges-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function removeAllEdges removes all edges between two vertices.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > src< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > src< / code > parameter represents the source vertex from which the edges will be removed.
It can be either a < code > VertexId< / code > or a < code > V< / code > type, which represents the identifier or object of the vertex.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > dest< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > dest< / code > parameter represents the destination vertex of an edge. It can be either a
< code > VertexId< / code > or a vertex object < code > V< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L189" > src/data-structures/graph/directed-graph.ts:189< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "removeAllVertices" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "removeAllVertices.removeAllVertices-1" > < span class = "tsd-kind-call-signature" > remove< wbr / > All< wbr / > Vertices< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > vertices< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > boolean< / span > < a href = "#removeAllVertices.removeAllVertices-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function removes all vertices from a graph and returns a boolean indicating if any vertices were removed.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertices< / span > : < span class = "tsd-signature-type " > VertexId< / 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 >
< div class = "tsd-comment tsd-typography" > < p > The < code > vertices< / code > parameter can be either an array of vertices (< code > V[]< / code > ) or an array
of vertex IDs (< code > VertexId[]< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > boolean< / span > < / h4 > < p > a boolean value. It returns true if at least one vertex was successfully removed, and false if no vertices
were removed.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#removeAllVertices" > removeAllVertices< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L140" > src/data-structures/graph/abstract-graph.ts:140< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "removeEdge" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The removeEdge function removes an edge from a graph and returns the removed edge, or null if the edge was not
found.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > edge< / span > : < span class = "tsd-signature-type tsd-kind-type-parameter" > E< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > edge< / code > parameter is an object that represents an edge in a graph. It has two properties: < code > src< / code >
and < code > dest< / code > , which represent the source and destination vertices of the edge, respectively.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 method < code > removeEdge< / code > returns the removed edge (< code > E< / code > ) if it exists, or < code > null< / code > if the edge does not exist.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#removeEdge" > removeEdge< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L161" > src/data-structures/graph/directed-graph.ts:161< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "removeEdgeBetween" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function removes an edge between two vertices in a directed graph and returns the removed edge.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > srcOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The source vertex or its ID.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > destOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > destOrId< / code > parameter in the < code > removeEdgeBetween< / code > function represents the
destination vertex of the edge that needs to be removed. It can be either a vertex object (< code > V< / code > ) or a vertex ID
(< code > VertexId< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< 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 the edge between the source and
destination vertices is successfully removed. If either the source or destination vertex is not found, or if the
edge does not exist, it returns < code > null< / code > .< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Overrides < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#removeEdgeBetween" > removeEdgeBetween< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L125" > src/data-structures/graph/directed-graph.ts:125< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "removeVertex" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "removeVertex.removeVertex-1" > < span class = "tsd-kind-call-signature" > remove< 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" > boolean< / span > < a href = "#removeVertex.removeVertex-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The < code > removeVertex< / code > function removes a vertex from a graph by its ID or by the vertex object itself.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > vertexOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< 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
(< code > VertexId< / code > ).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > boolean< / span > < / h4 > < p > The method < code > removeVertex< / code > returns a boolean value.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#removeVertex" > removeVertex< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L128" > src/data-structures/graph/abstract-graph.ts:128< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "setEdgeWeight" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "setEdgeWeight.setEdgeWeight-1" > < span class = "tsd-kind-call-signature" > set< wbr / > Edge< wbr / > Weight< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > srcOrId< / span > , < span class = "tsd-kind-parameter" > destOrId< / span > , < span class = "tsd-kind-parameter" > weight< / span > < span class = "tsd-signature-symbol" > )< / span > < span class = "tsd-signature-symbol" > : < / span > < span class = "tsd-signature-type" > boolean< / span > < a href = "#setEdgeWeight.setEdgeWeight-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function sets the weight of an edge between two vertices in a graph.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < span class = "tsd-kind-parameter" > srcOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > srcOrId< / code > parameter can be either a < code > VertexId< / code > or a < code > V< / code > object. It represents
the source vertex of the edge.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > destOrId< / span > : < span class = "tsd-signature-type " > VertexId< / span > < span class = "tsd-signature-symbol" > | < / span > < span class = "tsd-signature-type tsd-kind-type-parameter" > V< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The < code > destOrId< / code > parameter represents the destination vertex of the edge. It can be
either a < code > VertexId< / code > or a vertex object < code > V< / code > .< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < span class = "tsd-kind-parameter" > weight< / span > : < span class = "tsd-signature-type" > number< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > The weight parameter represents the weight of the edge between the source vertex (srcOrId)
and the destination vertex (destOrId).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type" > boolean< / span > < / h4 > < p > a boolean value. If the edge exists between the source and destination vertices, the function will update
the weight of the edge and return true. If the edge does not exist, the function will return false.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#setEdgeWeight" > setEdgeWeight< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L181" > src/data-structures/graph/abstract-graph.ts:181< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "tarjan" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< li class = "tsd-signature tsd-anchor-link" id = "tarjan.tarjan-1" > < span class = "tsd-kind-call-signature" > tarjan< / span > < span class = "tsd-signature-symbol" > (< / span > < span class = "tsd-kind-parameter" > needArticulationPoints< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > needBridges< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > needSCCs< / span > < span class = "tsd-signature-symbol" > ?< / span > , < span class = "tsd-kind-parameter" > needCycles< / 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 > < br / > < span > < / span > < span class = "tsd-kind-property" > SCCs< / 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" > number< / 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-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > articulationPoints< / 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-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > bridges< / 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 > < br / > < span > < / span > < span class = "tsd-kind-property" > cycles< / 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" > number< / 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-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > dfnMap< / 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > lowMap< / 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span class = "tsd-signature-symbol" > }< / span > < a href = "#tarjan.tarjan-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > Tarjan is an algorithm based on DFS,which is used to solve the connectivity problem of graphs.
Tarjan can find cycles in directed or undirected graph
Tarjan can find the articulation points and bridges(critical edges) of undirected graphs in linear time,
Tarjan solve the bi-connected components of undirected graphs;
Tarjan can find the SSC(strongly connected components), articulation points, and bridges of directed graphs.
The < code > tarjan< / code > function is used to perform various graph analysis tasks such as finding articulation points, bridges,
strongly connected components (SCCs), and cycles in a graph.< / p >
< / div >
< div class = "tsd-parameters" >
< h4 class = "tsd-parameters-title" > Parameters< / h4 >
< ul class = "tsd-parameter-list" >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > needArticulationPoints< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > A boolean value indicating whether or not to calculate and return the
articulation points in the graph. Articulation points are the vertices in a graph whose removal would increase the
number of connected components in the graph.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > needBridges< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > A boolean flag indicating whether the algorithm should find and return the bridges
(edges whose removal would increase the number of connected components in the graph).< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > needSCCs< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > A boolean value indicating whether the Strongly Connected Components (SCCs) of the
graph are needed. If set to true, the function will calculate and return the SCCs of the graph. If set to false, the
SCCs will not be calculated or returned.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li >
< li >
< h5 > < code class = "tsd-tag ts-flagOptional" > Optional< / code > < span class = "tsd-kind-parameter" > needCycles< / span > : < span class = "tsd-signature-type" > boolean< / span > < / h5 >
< div class = "tsd-comment tsd-typography" > < p > A boolean flag indicating whether the algorithm should find cycles in the graph. If
set to true, the algorithm will return a map of cycles, where the keys are the low values of the SCCs and the values
are arrays of vertices that form cycles within the SCCs.< / p >
< / div >
< div class = "tsd-comment tsd-typography" > < / div > < / li > < / ul > < / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-symbol" > { < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > SCCs< / 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" > number< / 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-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > articulationPoints< / 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-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > bridges< / 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 > < br / > < span > < / span > < span class = "tsd-kind-property" > cycles< / 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" > number< / 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-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > dfnMap< / 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span > < / span > < span class = "tsd-kind-property" > lowMap< / 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < span class = "tsd-signature-symbol" > ; < / span > < br / > < span class = "tsd-signature-symbol" > }< / span > < / h4 > < p > The function < code > tarjan< / code > returns an object with the following properties:< / p >
< ul class = "tsd-parameters" >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > SCCs< / 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" > number< / 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-symbol" > > < / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > articulation< wbr / > Points< / 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 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > bridges< / 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 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > cycles< / 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" > number< / 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-symbol" > > < / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > dfn< 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < / h5 > < / li >
< li class = "tsd-parameter" >
< h5 > < span class = "tsd-kind-property" > low< 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" > number< / span > < span class = "tsd-signature-symbol" > > < / span > < / h5 > < / li > < / ul >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#tarjan" > tarjan< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L794" > src/data-structures/graph/abstract-graph.ts:794< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member" > < a id = "topologicalSort" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures" >
< 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 > < span class = "tsd-signature-type " > VertexId< / 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-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 >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > when stored with adjacency list time: O(V+E)
when stored with adjacency matrix time: O(V^2)
The < code > topologicalSort< / code > function performs a topological sort on a directed graph and returns the sorted vertices in
reverse order, or null if the graph contains a cycle.< / p >
< / div >
< 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 " > VertexId< / 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-symbol" > []< / span > < / h4 > < p > The function < code > topologicalSort()< / code > returns an array of vertices in topological order if there is no cycle in
the graph. If there is a cycle in the graph, it returns < code > null< / code > .< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/directed-graph.ts#L307" > src/data-structures/graph/directed-graph.ts:307< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section >
2023-08-12 03:35:25 +00:00
< section class = "tsd-panel tsd-member tsd-is-inherited" > < a id = "vertexSet" class = "tsd-anchor" > < / a >
< 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 >
< ul class = "tsd-signatures tsd-is-inherited" >
< 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 > < span class = "tsd-signature-type " > VertexId< / 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 = "#vertexSet.vertexSet-1" aria-label = "Permalink" class = "tsd-anchor-icon" > < svg viewBox = "0 0 24 24" > < use href = "#icon-anchor" > < / use > < / svg > < / a > < / li >
< li class = "tsd-description" >
< div class = "tsd-comment tsd-typography" > < p > The function < code > vertexSet()< / code > returns a map of vertices.< / p >
< / div >
< h4 class = "tsd-returns-title" > Returns < span class = "tsd-signature-type " > Map< / span > < span class = "tsd-signature-symbol" > < < / span > < span class = "tsd-signature-type " > VertexId< / 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 > The method < code > vertexSet()< / code > returns a map of vertex IDs to vertex objects.< / p >
< div class = "tsd-comment tsd-typography" > < / div > < aside class = "tsd-sources" >
< p > Inherited from < a href = "AbstractGraph.html" > AbstractGraph< / a > .< a href = "AbstractGraph.html#vertexSet" > vertexSet< / a > < / p >
< ul >
2023-08-12 14:54:56 +00:00
< li > Defined in < a href = "https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/graph/abstract-graph.ts#L102" > src/data-structures/graph/abstract-graph.ts:102< / a > < / li > < / ul > < / aside > < / li > < / ul > < / section > < / section > < / div >
2023-08-12 03:35:25 +00:00
< div class = "col-sidebar" >
< div class = "page-menu" >
< div class = "tsd-navigation settings" >
< details class = "tsd-index-accordion" > < summary class = "tsd-accordion-summary" >
< h3 > < svg width = "20" height = "20" viewBox = "0 0 24 24" fill = "none" > < path d = "M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill = "var(--color-text)" id = "icon-chevronDown" > < / path > < / svg > Settings< / h3 > < / summary >
< div class = "tsd-accordion-details" >
< div class = "tsd-filter-visibility" >
< h4 class = "uppercase" > Member Visibility< / h4 > < form >
< ul id = "tsd-filter-options" >
< li class = "tsd-filter-item" > < label class = "tsd-filter-input" > < input type = "checkbox" id = "tsd-filter-protected" name = "protected" / > < svg width = "32" height = "32" viewBox = "0 0 32 32" aria-hidden = "true" > < rect class = "tsd-checkbox-background" width = "30" height = "30" x = "1" y = "1" rx = "6" fill = "none" > < / rect > < path class = "tsd-checkbox-checkmark" d = "M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke = "none" stroke-width = "3.5" stroke-linejoin = "round" fill = "none" > < / path > < / svg > < span > Protected< / span > < / label > < / li >
< li class = "tsd-filter-item" > < label class = "tsd-filter-input" > < input type = "checkbox" id = "tsd-filter-private" name = "private" / > < svg width = "32" height = "32" viewBox = "0 0 32 32" aria-hidden = "true" > < rect class = "tsd-checkbox-background" width = "30" height = "30" x = "1" y = "1" rx = "6" fill = "none" > < / rect > < path class = "tsd-checkbox-checkmark" d = "M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke = "none" stroke-width = "3.5" stroke-linejoin = "round" fill = "none" > < / path > < / svg > < span > Private< / span > < / label > < / li >
< li class = "tsd-filter-item" > < label class = "tsd-filter-input" > < input type = "checkbox" id = "tsd-filter-inherited" name = "inherited" checked / > < svg width = "32" height = "32" viewBox = "0 0 32 32" aria-hidden = "true" > < rect class = "tsd-checkbox-background" width = "30" height = "30" x = "1" y = "1" rx = "6" fill = "none" > < / rect > < path class = "tsd-checkbox-checkmark" d = "M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke = "none" stroke-width = "3.5" stroke-linejoin = "round" fill = "none" > < / path > < / svg > < span > Inherited< / span > < / label > < / li >
< li class = "tsd-filter-item" > < label class = "tsd-filter-input" > < input type = "checkbox" id = "tsd-filter-external" name = "external" / > < svg width = "32" height = "32" viewBox = "0 0 32 32" aria-hidden = "true" > < rect class = "tsd-checkbox-background" width = "30" height = "30" x = "1" y = "1" rx = "6" fill = "none" > < / rect > < path class = "tsd-checkbox-checkmark" d = "M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke = "none" stroke-width = "3.5" stroke-linejoin = "round" fill = "none" > < / path > < / svg > < span > External< / span > < / label > < / li > < / ul > < / form > < / div >
< div class = "tsd-theme-toggle" >
< h4 class = "uppercase" > Theme< / h4 > < select id = "tsd-theme" > < option value = "os" > OS< / option > < option value = "light" > Light< / option > < option value = "dark" > Dark< / option > < / select > < / div > < / div > < / details > < / div >
< details open class = "tsd-index-accordion tsd-page-navigation" > < summary class = "tsd-accordion-summary" >
< h3 > < svg width = "20" height = "20" viewBox = "0 0 24 24" fill = "none" > < use href = "#icon-chevronDown" > < / use > < / svg > On This Page< / h3 > < / summary >
< div class = "tsd-accordion-details" >
< ul >
< 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 >
< li > < a href = "#_inEdgeMap" class = "tsd-is-protected" > < 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 >
< li > < a href = "#_outEdgeMap" class = "tsd-is-protected" > < 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 >
< li > < a href = "#_vertices" class = "tsd-is-protected tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-1024" > < / use > < / svg > < span > _vertices< / span > < / a > < / li >
< 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 >
< 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 >
< 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 >
< li > < a href = "#containsEdge" class = "tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > contains< wbr / > Edge< / span > < / a > < / li >
< li > < a href = "#containsVertex" class = "tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > contains< wbr / > Vertex< / span > < / a > < / li >
< 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 >
< 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 >
< 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 >
< li > < a href = "#edgeSet" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > edge< wbr / > Set< / span > < / a > < / li >
< li > < a href = "#edgesOf" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > edges< wbr / > Of< / span > < / a > < / li >
< li > < a href = "#floyd" class = "tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > floyd< / span > < / a > < / li >
< li > < a href = "#getAllPathsBetween" class = "tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > All< wbr / > Paths< wbr / > Between< / span > < / a > < / li >
< li > < a href = "#getDestinations" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Destinations< / span > < / a > < / li >
< li > < a href = "#getEdge" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Edge< / span > < / a > < / li >
< li > < a href = "#getEdgeDest" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Edge< wbr / > Dest< / span > < / a > < / li >
< li > < a href = "#getEdgeSrc" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Edge< wbr / > Src< / span > < / a > < / li >
< li > < a href = "#getEndsOfEdge" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Ends< wbr / > Of< wbr / > Edge< / span > < / a > < / li >
< li > < a href = "#getMinCostBetween" class = "tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Min< wbr / > Cost< wbr / > Between< / span > < / a > < / li >
< li > < a href = "#getMinPathBetween" class = "tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > get< wbr / > Min< wbr / > Path< wbr / > Between< / span > < / a > < / li >
< 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< li > < a href = "#incomingEdgesOf" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > incoming< wbr / > Edges< wbr / > Of< / span > < / a > < / li >
< li > < a href = "#outDegreeOf" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > out< wbr / > Degree< wbr / > Of< / span > < / a > < / li >
< li > < a href = "#outgoingEdgesOf" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > outgoing< wbr / > Edges< wbr / > Of< / span > < / a > < / li >
< li > < a href = "#removeAllEdges" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > All< wbr / > Edges< / span > < / a > < / li >
< li > < a href = "#removeAllVertices" class = "tsd-is-inherited" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > All< wbr / > Vertices< / span > < / a > < / li >
< li > < a href = "#removeEdge" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > Edge< / span > < / a > < / li >
< li > < a href = "#removeEdgeBetween" class = "" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-2048" > < / use > < / svg > < span > remove< wbr / > Edge< wbr / > Between< / span > < / a > < / li >
< 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< div class = "site-menu" >
< 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 >
< ul class = "tsd-small-nested-navigation" >
< 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< li > < a href = "AbstractEdge.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Abstract< wbr / > Edge< / span > < / a > < / li >
< li > < a href = "AbstractGraph.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Abstract< wbr / > Graph< / span > < / a > < / li >
< li > < a href = "AbstractVertex.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Abstract< wbr / > Vertex< / span > < / a > < / li >
< li > < a href = "ArrayDeque.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Array< wbr / > Deque< / span > < / a > < / li >
< li > < a href = "BST.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > BST< / span > < / a > < / li >
< li > < a href = "BSTNode.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > BSTNode< / span > < / a > < / li >
< li > < a href = "BTree.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > BTree< / span > < / a > < / li >
< li > < a href = "BinaryIndexedTree.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Binary< wbr / > Indexed< wbr / > Tree< / span > < / a > < / li >
< li > < a href = "BinaryTree.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Binary< wbr / > Tree< / span > < / a > < / li >
< li > < a href = "BinaryTreeNode.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Binary< wbr / > Tree< wbr / > Node< / span > < / a > < / li >
< li > < a href = "Character.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Character< / span > < / a > < / li >
< li > < a href = "CoordinateMap.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Coordinate< wbr / > Map< / span > < / a > < / li >
< li > < a href = "CoordinateSet.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Coordinate< wbr / > Set< / span > < / a > < / li >
< li > < a href = "Deque.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Deque< / span > < / a > < / li >
< li > < a href = "DirectedEdge.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Directed< wbr / > Edge< / span > < / a > < / li >
< li > < a href = "DirectedGraph.html" class = "current" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Directed< wbr / > Graph< / span > < / a > < / li >
< li > < a href = "DirectedVertex.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Directed< wbr / > Vertex< / span > < / a > < / li >
< li > < a href = "DoublyLinkedList.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Doubly< wbr / > Linked< wbr / > List< / span > < / a > < / li >
< li > < a href = "DoublyLinkedListNode.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Doubly< wbr / > Linked< wbr / > List< wbr / > Node< / span > < / a > < / li >
< li > < a href = "Heap.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Heap< / span > < / a > < / li >
< li > < a href = "Matrix2D.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Matrix2D< / span > < / a > < / li >
< li > < a href = "MatrixNTI2D.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > MatrixNTI2D< / span > < / a > < / li >
< li > < a href = "MaxHeap.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Max< wbr / > Heap< / span > < / a > < / li >
< li > < a href = "MaxPriorityQueue.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Max< wbr / > Priority< wbr / > Queue< / span > < / a > < / li >
< li > < a href = "MinHeap.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Min< wbr / > Heap< / span > < / a > < / li >
< li > < a href = "MinPriorityQueue.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Min< wbr / > Priority< wbr / > Queue< / span > < / a > < / li >
< li > < a href = "Navigator.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Navigator< / span > < / a > < / li >
< li > < a href = "ObjectDeque.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Object< wbr / > Deque< / span > < / a > < / li >
< 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< 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 >
< li > < a href = "SinglyLinkedListNode.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Singly< wbr / > Linked< wbr / > List< wbr / > Node< / span > < / a > < / li >
< li > < a href = "SplayTree.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Splay< wbr / > Tree< / span > < / a > < / li >
< li > < a href = "Stack.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Stack< / span > < / a > < / li >
< li > < a href = "TreeMultiSet.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Tree< wbr / > Multi< wbr / > Set< / span > < / a > < / li >
< li > < a href = "Trie.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Trie< / span > < / a > < / li >
< li > < a href = "TrieNode.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Trie< wbr / > Node< / span > < / a > < / li >
< li > < a href = "TwoThreeTree.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Two< wbr / > Three< wbr / > Tree< / span > < / a > < / li >
< li > < a href = "UndirectedEdge.html" > < svg class = "tsd-kind-icon" viewBox = "0 0 24 24" > < use href = "#icon-128" > < / use > < / svg > < span > Undirected< wbr / > Edge< / span > < / a > < / li >
< 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 >
< 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 >
< 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 > < / ul > < / nav > < / div > < / div > < / div >
< div class = "tsd-generator" >
< p > Generated using < a href = "https://typedoc.org/" target = "_blank" > TypeDoc< / a > < / p > < / div >
< div class = "overlay" > < / div > < / body > < / html >