AddVertex puts 'v' into 'd'
(v Vertex)
| 57 | |
| 58 | // AddVertex puts 'v' into 'd' |
| 59 | func (d *DAG) AddVertex(v Vertex) bool { |
| 60 | if v == nil { |
| 61 | return false |
| 62 | } |
| 63 | d.vertices[v] = v |
| 64 | return true |
| 65 | } |
| 66 | |
| 67 | // RemoveVertex deletes 'v' from 'd' |
| 68 | // the in&out edges are also deleted |
no outgoing calls