Graph provides a structure to store the graph. It is safe to use its empty object.
| 7 | // Graph provides a structure to store the graph. |
| 8 | // It is safe to use its empty object. |
| 9 | type Graph struct { |
| 10 | vertices int |
| 11 | edges map[int]map[int]int // Stores weight of an edge |
| 12 | Directed bool // Differentiate directed/undirected graphs |
| 13 | } |
| 14 | |
| 15 | // Constructor functions for graphs (undirected by default) |
| 16 | func New(v int) *Graph { |
nothing calls this directly
no outgoing calls
no test coverage detected