MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / containsVertex

Method containsVertex

Data-Structures/Graph/Graph.js:10–12  ·  view source on GitHub ↗
(vertex)

Source from the content-addressed store, hash-verified

8 }
9
10 containsVertex(vertex) {
11 return typeof this.adjacencyMap[vertex] !== 'undefined'
12 }
13
14 addEdge(vertex1, vertex2) {
15 if (this.containsVertex(vertex1) && this.containsVertex(vertex2)) {

Callers 1

addEdgeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected