MCPcopy
hub / github.com/arnauddri/algorithms / CheckVertex

Method CheckVertex

data-structures/graph/graph.go:60–64  ·  view source on GitHub ↗
(vertex VertexId)

Source from the content-addressed store, hash-verified

58}
59
60func (g *graph) CheckVertex(vertex VertexId) bool {
61 _, exists := g.edges[vertex]
62
63 return exists
64}
65
66func (g *graph) TouchVertex(vertex VertexId) {
67 if _, ok := g.edges[vertex]; !ok {

Callers 2

AddEdgeMethod · 0.95
TestUndirectedGraphFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestUndirectedGraphFunction · 0.64