Example #1
0
    // Returns active Edges
    public List <Edge> getLeaves()
    {
        List <Edge> leaves = new List <Edge>();

        leaves.AddRange(root.getLeaves());
        return(leaves);
    }
Example #2
0
    // 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);
    }