MCPcopy Index your code
hub / github.com/trekhleb/javascript-algorithms / findEdge

Method findEdge

src/data-structures/graph/Graph.js:122–130  ·  view source on GitHub ↗

* @param {GraphVertex} startVertex * @param {GraphVertex} endVertex * @return {(GraphEdge|null)}

(startVertex, endVertex)

Source from the content-addressed store, hash-verified

120 * @return {(GraphEdge|null)}
121 */
122 findEdge(startVertex, endVertex) {
123 const vertex = this.getVertexByKey(startVertex.getKey());
124
125 if (!vertex) {
126 return null;
127 }
128
129 return vertex.findEdge(endVertex);
130 }
131
132 /**
133 * @return {number}

Callers 7

getAdjacencyMatrixMethod · 0.95
Graph.test.jsFile · 0.45
dijkstraFunction · 0.45
bellmanFordFunction · 0.45
floydWarshallFunction · 0.45
graphBridgesFunction · 0.45

Calls 2

getVertexByKeyMethod · 0.95
getKeyMethod · 0.45

Tested by

no test coverage detected