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

Method IsVertex

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

Source from the content-addressed store, hash-verified

95}
96
97func (g *graph) IsVertex(vertex VertexId) (exist bool) {
98 _, exist = g.edges[vertex]
99
100 return
101}
102
103func (g *graph) VerticesCount() int {
104 return len(g.edges)

Callers 2

RemoveVertexMethod · 0.95
TestUndirectedGraphFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestUndirectedGraphFunction · 0.64