// Returns active Edges public List <Edge> getLeaves() { List <Edge> leaves = new List <Edge>(); leaves.AddRange(root.getLeaves()); return(leaves); }
// Returns the active edges that stem from this node public List <Edge> getLeaves() { List <Edge> leaves = new List <Edge>(); if (hasSons) { leaves.AddRange(leftSon.getLeaves()); leaves.AddRange(rightSon.getLeaves()); } else { leaves.Add(edge); return(leaves); } return(leaves); }