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

Method TouchVertex

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

Source from the content-addressed store, hash-verified

64}
65
66func (g *graph) TouchVertex(vertex VertexId) {
67 if _, ok := g.edges[vertex]; !ok {
68 g.edges[vertex] = make(map[VertexId]int)
69 }
70}
71
72func (g *graph) AddVertex(vertex VertexId) error {
73 i, _ := g.edges[vertex]

Callers 2

AddEdgeMethod · 0.95
TestUndirectedGraphFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestUndirectedGraphFunction · 0.64