Search Results for

    Show / Hide Table of Contents

    Interface INodeToLeafPathsBuilder

    An algorithm building all TreePath<TEdge, TNode> from the provided IRecImmDictIndexedTreeNode<TEdge, TNode> to a leaf.

    Namespace: MoreStructures.RecImmTrees.Paths
    Assembly: MoreStructures.dll
    Syntax
    public interface INodeToLeafPathsBuilder

    Methods

    | Improve this Doc View Source

    GetAllNodeToLeafPaths<TEdge, TNode>(TNode)

    Returns all TreePath<TEdge, TNode> from the provided node to a leaf.

    Declaration
    IEnumerable<TreePath<TEdge, TNode>> GetAllNodeToLeafPaths<TEdge, TNode>(TNode node)
        where TEdge : IRecImmDictIndexedTreeEdge<TEdge, TNode> where TNode : IRecImmDictIndexedTreeNode<TEdge, TNode>
    Parameters
    Type Name Description
    TNode node

    The node, to start the structure traversal from.

    Returns
    Type Description
    IEnumerable<TreePath<TEdge, TNode>>

    A sequence of TreePath<TEdge, TNode>.

    Type Parameters
    Name Description
    TEdge

    The type of edges of the specific structure.

    TNode

    The type of nodes of the specific structure.

    Examples

    Given the following tree structure:

    0
    |- 0 -> 1
    |       |- 1 -> 2
    |       |- 2 -> 3
    |       |       |- 3 -> 4
    |       |- 4 -> 5
    |- 5 -> 6
    |- 6 -> 7
            |- 7 -> 8
                    |- 8 -> 9
                    |- 9 -> 10

    The method would return the following node-to-leaf paths:

     (0 -> 1) => (1 -> 2)
     (0 -> 1) => (2 -> 3) => (3 -> 4)
     (0 -> 1) => (4 -> 5)
     (5 -> 6)
     (6 -> 7) => (7 -> 8) => (8 -> 9)
     (6 -> 7) => (7 -> 8) => (9 -> 10)

    Extension Methods

    SuffixStructureNodeExtensions.GetAllSuffixesFor<TEdge, TNode>(TNode, TextWithTerminator)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX