MCPcopy
hub / github.com/trekhleb/javascript-algorithms / getKey

Method getKey

src/data-structures/graph/GraphEdge.js:18–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 }
17
18 getKey() {
19 if (this.key) {
20 return this.key;
21 }
22
23 const startVertexKey = this.startVertex.getKey();
24 const endVertexKey = this.endVertex.getKey();
25
26 this.key = `${startVertexKey}_${endVertexKey}`;
27
28 return this.key;
29 }
30
31 /**
32 * @return {GraphEdge}

Callers 15

toStringMethod · 0.95
addVertexMethod · 0.45
addEdgeMethod · 0.45
deleteEdgeMethod · 0.45
findEdgeMethod · 0.45
getVerticesIndicesMethod · 0.45
getAdjacencyMatrixMethod · 0.45
GraphEdge.test.jsFile · 0.45
Graph.test.jsFile · 0.45
dijkstraFunction · 0.45
dijkstra.test.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected