GetParents returns a slice with the parent vertices of the Vertex
()
| 221 | |
| 222 | // GetParents returns a slice with the parent vertices of the Vertex |
| 223 | func (v *Vertex) GetParents() []*Vertex { |
| 224 | var res []*Vertex |
| 225 | for _, p := range v.Parents { |
| 226 | res = append(res, p) |
| 227 | } |
| 228 | return res |
| 229 | } |
| 230 | |
| 231 | // getAncestors return all descendents for a vertex, might contain duplicates |
| 232 | func getAncestors(v *Vertex) []*Vertex { |