Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
97
func
(g *graph) IsVertex(vertex VertexId) (exist bool) {
98
_, exist = g.edges[vertex]
99
100
return
101
}
102
103
func
(g *graph) VerticesCount() int {
104
return
len(g.edges)
Callers
2
RemoveVertex
Method · 0.95
TestUndirectedGraph
Function · 0.80
Calls
no outgoing calls
Tested by
1
TestUndirectedGraph
Function · 0.64