Search Results for

    Show / Hide Table of Contents

    Class TreePath<TEdge, TNode>

    An immutable sequence of TNode, where each node is child of its predecessor and parent of its successor and where node relationships are stored in TEdge instances.

    Inheritance
    System.Object
    TreePath<TEdge, TNode>
    Implements
    System.IEquatable<TreePath<TEdge, TNode>>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: MoreStructures.RecImmTrees
    Assembly: MoreStructures.dll
    Syntax
    public class TreePath<TEdge, TNode> : IEquatable<TreePath<TEdge, TNode>> where TEdge : IRecImmDictIndexedTreeEdge<TEdge, TNode> where TNode : IRecImmDictIndexedTreeNode<TEdge, TNode>
    Type Parameters
    Name Description
    TEdge

    The type of edges of the specific structure.

    TNode

    The type of nodes of the specific structure.

    Remarks

    Immutability is guaranteed by using ValueReadOnlyDictionary<TKey, TValue>.

    Constructors

    | Improve this Doc View Source

    TreePath()

    Builds an empty path, i.e. an empty sequence of nodes.

    Declaration
    public TreePath()
    | Improve this Doc View Source

    TreePath(TEdge, TNode)

    Builds a path composed of a single node with its incoming edge.

    Declaration
    public TreePath(TEdge edge, TNode node)
    Parameters
    Type Name Description
    TEdge edge

    The edge leading to the node.

    TNode node

    The node defining the singleton path.

    | Improve this Doc View Source

    TreePath(IEnumerable<KeyValuePair<TEdge, TNode>>)

    An immutable sequence of TNode, where each node is child of its predecessor and parent of its successor and where node relationships are stored in TEdge instances.

    Declaration
    public TreePath(IEnumerable<KeyValuePair<TEdge, TNode>> PathNodes)
    Parameters
    Type Name Description
    IEnumerable<KeyValuePair<TEdge, TNode>> PathNodes

    The sequence of nodes respecting the parent-child relationship.

    Remarks

    Immutability is guaranteed by using ValueReadOnlyDictionary<TKey, TValue>.

    | Improve this Doc View Source

    TreePath((TEdge edge, TNode node)[])

    Builds a path composed of the provided couples of edges and nodes.

    Declaration
    public TreePath(params (TEdge edge, TNode node)[] pathNodes)
    Parameters
    Type Name Description
    System.ValueTuple<TEdge, TNode>[] pathNodes

    An array of couples (edge, node).

    Properties

    | Improve this Doc View Source

    PathNodes

    A readonly view of the private collection of path TNode instances.

    Declaration
    public IEnumerable<KeyValuePair<TEdge, TNode>> PathNodes { get; }
    Property Value
    Type Description
    IEnumerable<KeyValuePair<TEdge, TNode>>

    Methods

    | Improve this Doc View Source

    ToString()


    Uses a IStringifier<TEdge, TNode> to generate the string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Implements

    System.IEquatable<T>

    Extension Methods

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