getAncestors return all descendents for a vertex, might contain duplicates
(v *Vertex)
| 230 | |
| 231 | // getAncestors return all descendents for a vertex, might contain duplicates |
| 232 | func getAncestors(v *Vertex) []*Vertex { |
| 233 | var descendents []*Vertex |
| 234 | for _, parent := range v.GetParents() { |
| 235 | descendents = append(descendents, parent) |
| 236 | descendents = append(descendents, getAncestors(parent)...) |
| 237 | } |
| 238 | return descendents |
| 239 | } |
| 240 | |
| 241 | // GetChildren returns a slice with the child vertices of the Vertex |
| 242 | func (v *Vertex) GetChildren() []*Vertex { |
no test coverage detected