AddNeighbor adds a neighbor to the node
(neighbor *Node)
| 24 | |
| 25 | // AddNeighbor adds a neighbor to the node |
| 26 | func (n *Node) AddNeighbor(neighbor *Node) { |
| 27 | n.neighbors = append(n.neighbors, neighbor) |
| 28 | } |
| 29 | |
| 30 | // GetNeighbors returns the node's neighbors |
| 31 | func (n *Node) GetNeighbors() []*Node { |