Constructor functions for graphs (undirected by default)
(v int)
| 14 | |
| 15 | // Constructor functions for graphs (undirected by default) |
| 16 | func New(v int) *Graph { |
| 17 | return &Graph{ |
| 18 | vertices: v, |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | // AddVertex will add a new vertex in the graph. |
| 23 | // If the vertex already exists it will do nothing. |
no outgoing calls