Search Results for

    Show / Hide Table of Contents

    Class TreeSearchAlgorithm<TInternalNode, TLeafNode>

    A base class for algorithms that search trees.

    Inheritance
    object
    TreeSearchAlgorithm<TInternalNode, TLeafNode>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Collections
    Assembly: Flame.dll
    Syntax
    public abstract class TreeSearchAlgorithm<TInternalNode, TLeafNode>
    Type Parameters
    Name Description
    TInternalNode

    The type of an internal tree node.

    TLeafNode

    The type of a leaf node.

    Constructors

    | Edit this page View Source

    TreeSearchAlgorithm(Func<TInternalNode, Tuple<IEnumerable<TInternalNode>, IEnumerable<TLeafNode>>>)

    Creates a tree search algorithm.

    Declaration
    public TreeSearchAlgorithm(Func<TInternalNode, Tuple<IEnumerable<TInternalNode>, IEnumerable<TLeafNode>>> getChildren)
    Parameters
    Type Name Description
    Func<TInternalNode, Tuple<IEnumerable<TInternalNode>, IEnumerable<TLeafNode>>> getChildren

    A function that takes an internal node and produces its children.

    Properties

    | Edit this page View Source

    GetChildren

    Gets the children of an internal node as an (internal nodes, leaf nodes) pair.

    Declaration
    public Func<TInternalNode, Tuple<IEnumerable<TInternalNode>, IEnumerable<TLeafNode>>> GetChildren { get; }
    Property Value
    Type Description
    Func<TInternalNode, Tuple<IEnumerable<TInternalNode>, IEnumerable<TLeafNode>>>

    Methods

    | Edit this page View Source

    Search(TInternalNode)

    Searches through a tree rooted at a particular node.

    Declaration
    public abstract TLeafNode Search(TInternalNode root)
    Parameters
    Type Name Description
    TInternalNode root

    The root of the tree to search through.

    Returns
    Type Description
    TLeafNode

    A leaf node.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX