Search Results for

    Show / Hide Table of Contents

    Class TreeNode<T>

    A node of a tree, root or non-root, in the underlying forest representing the heap.

    Inheritance
    System.Object
    TreeNode<T>
    TreeNodeTests.TreeNodeMock
    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.PriorityQueues.BinomialHeap
    Assembly: MoreStructures.dll
    Syntax
    public class TreeNode<T>
    Type Parameters
    Name Description
    T

    Properties

    | Improve this Doc View Source

    Children

    A of the children of this node. Empty if leaf.

    Declaration
    public LinkedList<TreeNode<T>> Children { get; }
    Property Value
    Type Description
    MoreStructures.PriorityQueues.LinkedList<TreeNode<T>>
    | Improve this Doc View Source

    IsALoser

    Whether this node has lost a child since last reset, and will be promoted to roots next time they will lose a child. Only applies to, and it is taken into account from, Fibonacci heaps.

    Declaration
    public bool IsALoser { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsInAHeap

    Whether this node is in the heap, either as a root or as a non-root node in a tree of the forest, or it is a dangling or detached node.

    Declaration
    public bool IsInAHeap { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Parent

    A back-reference to the parent node. Null if a root.

    Declaration
    public TreeNode<T> Parent { get; set; }
    Property Value
    Type Description
    TreeNode<T>
    | Improve this Doc View Source

    ParentListNode

    A back-reference to the wrapper, in the of children of the Parent of this node. Null if a root.

    Declaration
    public LinkedListNode<TreeNode<T>>? ParentListNode { get; set; }
    Property Value
    Type Description
    System.Nullable<LinkedListNode<TreeNode<T>>>
    | Improve this Doc View Source

    PrioritizedItem

    The item of type T, with its priority and push timestamp.

    Declaration
    public PrioritizedItem<T> PrioritizedItem { get; set; }
    Property Value
    Type Description
    MoreStructures.PriorityQueues.PrioritizedItem<T>
    | Improve this Doc View Source

    RootsListNode

    A back-reference to the wrapper, in the of tree roots in the underlying forest representing the heap. Null if not a root.

    Declaration
    public LinkedListNode<TreeNode<T>>? RootsListNode { get; set; }
    Property Value
    Type Description
    System.Nullable<LinkedListNode<TreeNode<T>>>

    Methods

    | Improve this Doc View Source

    AddChild(TreeNode<T>)

    Add the provides treeNode to the Children of this instance.

    Declaration
    public void AddChild(TreeNode<T> treeNode)
    Parameters
    Type Name Description
    TreeNode<T> treeNode

    The TreeNode<T> instance to become a child.

    | Improve this Doc View Source

    DeepCopy()

    Deep copies this TreeNode<T> and its entire structure.

    Declaration
    public TreeNode<T> DeepCopy()
    Returns
    Type Description
    TreeNode<T>

    A new instance of TreeNode<T>, pointing to a new, separate but equivalent structure.

    Remarks

    This method is supposed to be used for a temporary copy of the heap, in order to iterate over it without modifying the original heap.
    It is not conceived to support full clones of a heap, such the one required by .
    It doesn't copy Parent for the top-level TreeNode<T>, nor its RootsListNode or ParentListNode: those have to be set, according to the scenario, by the caller of DeepCopy().

    | Improve this Doc View Source

    DetachFromParent()

    Removes this node from the Children of its Parent.

    Declaration
    public void DetachFromParent()
    | Improve this Doc View Source

    ToString()


    Includes the PrioritizedItem, IsInAHeap and IsALoser.

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

    Extension Methods

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