MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / Graph

Struct Graph

graph/coloring/graph.go:14–17  ·  view source on GitHub ↗

Graph provides a structure to store an undirected graph. It is safe to use its empty object.

Source from the content-addressed store, hash-verified

12// Graph provides a structure to store an undirected graph.
13// It is safe to use its empty object.
14type Graph struct {
15 vertices int
16 edges map[int]map[int]struct{}
17}
18
19// AddVertex will add a new vertex in the graph, if the vertex already
20// exist it will do nothing

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected