Click or drag to resize

TreeNodeExtensions Class

Implements algorithms common for all trees.
Inheritance Hierarchy
SystemObject
  Altaxo.CollectionsTreeNodeExtensions

Namespace: Altaxo.Collections
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static class TreeNodeExtensions

The TreeNodeExtensions type exposes the following members.

Methods
 NameDescription
Public Extension MethodAnyBetweenHereAndLeavesT 
Public Extension MethodAnyBetweenLeavesAndHereT 
Public Extension MethodAreAllNodesFromSameLevelT Determines whether all nodes in the provided enumeration have the same level (see LevelT(T) for an explanation of level).
Public Extension MethodElementAtT Gets a node inside a tree by using an index array.
Public Extension MethodEnsureValidityOfNodeIndexT Ensures that a list of indices that point to a node in a tree is valid.
Public Extension MethodFirstAncestorImplementingM, T Returns the firsts ancestor of this node that has the type M.
Public Extension MethodFixAndTestParentChildRelationsT Fixes the and test the parent-child relationship in a tree.
Public Extension MethodFromHereToLeavesDoT 
Public Extension MethodFromLeavesToHereDoT 
Public methodStatic memberHaveSameParentT Determines whether a couple of nodes share the same parent node.
Public Extension MethodIndexOfT(T) Gets the index of a given node inside a tree.
Public Extension MethodIndexOfT(T, IListInt32) Gets the index of a given node inside a tree.
Public Extension MethodInsertT Inserts the specified node at a certain index in the tree.
Public Extension MethodInsertAfterT Inserts the specified node after a certain index in the tree.
Public Extension MethodInsertLastT Inserts the specified node after all other siblings of the node at a certain index in the tree.
Public Extension MethodIsStructuralEquivalentToT, M 
Public Extension MethodIsValidIndexT(T, IEnumerableInt32) Determines whether the given index is valid or not.
Public Extension MethodIsValidIndexT(T, IEnumerableInt32, T) Determines whether the given index is valid or not.
Public Extension MethodLevelT Determines the level of the specified node. The root node (= node that has no parent) will return a level of 0, the child nodes of the root node a level of 1 and so on.
Public methodStatic memberMoveNodesUpDownT This procedure will move nodes some indices up or down. All nodes to move should have the same parent.
Public methodStatic memberNodesOfSameHighestLevelT Returns only the nodes with the highest hierarchy level among all the provided nodes (i.e. the nodes most close to the leaf nodes of the true). First, the nodes collection is iterated through to determine the highest node level. Then only those nodes with the hightest node level are returned.
Public Extension MethodProjectTreeToNewTreeS, D(S, FuncS, D, ActionD, D) Projects a tree (source tree) to a new tree (destination tree).
Public Extension MethodProjectTreeToNewTreeS, D(S, IListInt32, FuncS, IListInt32, D, ActionD, D) Projects a tree (source tree) to a new tree (destination tree). The creation function for the new tree nodes gets information about the node indices.
Public Extension MethodProjectTreeToTreeS, D(S, D, ActionS, D) Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.
Public Extension MethodProjectTreeToTreeS, D(S, D, ActionS, D, FuncD, D) Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.
Public Extension MethodProjectTreeToTreeS, D(S, D, ActionS, D, FuncD, D, ActionD, D, Int32) Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.
Public Extension MethodProjectTreeToTreeS, D(S, D, ActionS, D, FuncD, D, ActionD, D, Int32, ListValueTupleD, D, Int32) Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.
Public methodStatic memberProjectTreeToTreeS, D(S, D, FuncS, IEnumeratorS, FuncD, IEnumeratorD, ActionS, D, FuncD, D, ActionD, D, Int32, ListValueTupleD, D, Int32) Projects a source tree onto a destination tree. Nodes are updated, added, or deleted in the destination tree to match the source tree.
Public Extension MethodRemoveT Frees this node, i.e. removes the node from it's parent collection.
Public Extension MethodRootNodeT Gets the root node of a tree to which the given node node belongs.
Public Extension MethodTakeFromFirstLeavesToHereT(T) Enumerates through all tree nodes from the upmost leaf of the tree down to the provided node node. The provided node node is included in the enumeration. Attention: Since the order of the nodes must be reversed, this enumeration is only efficient for ITreeListNodeT types.
Public Extension MethodTakeFromFirstLeavesToHereT(T, Boolean) Enumerates through all tree nodes from the upmost leaf of the tree down to the provided node node. If includeThisNode is true, the provided node node is included in the enumeration.
Public Extension MethodTakeFromHereToFirstLeavesT(T) Enumerates through all tree nodes from (and including) the provided node node up to the leaves of the tree.
Public Extension MethodTakeFromHereToFirstLeavesT(T, Boolean) Enumerates through all tree nodes from the provided node node up to the leaves of the tree. If includeThisNode is true, the provided node node is included in the enumeration.
Public Extension MethodTakeFromHereToLastLeavesT(T) Enumerates through all tree nodes from (and including) the provided node node to the leaves of the tree. The downmost leaves will be enumerated first.
Public Extension MethodTakeFromHereToLastLeavesT(T, Boolean) Enumerates through all tree nodes from the provided node node to the leaves of the tree. The downmost leaves will be enumerated first. If includeThisNode is true, the provided node node is included in the enumeration. Attention: Since the order of the nodes must be reversed, this enumeration is only efficient for ITreeListNodeT types.
Public Extension MethodTakeFromHereToLeavesT Enumerates through all tree nodes from the provided node node up to the leaves of the tree. If includeThisNode is true, the provided node node is included in the enumeration. The direction of the enumeration of the child nodes depend on the return value of a function directionSelector, which is applied to the parent node.
Public Extension MethodTakeFromHereToLeavesWithIndexT Enumerates through all tree nodes from the provided node node up to the leaves of the tree. If includeThisNode is true, the provided node node is included in the enumeration. The direction of the enumeration of the child nodes depend on the return value of a function directionSelector, which is applied to the parent node. In addition to the node itself, the enumeration also delivers the index of the node in the parent's collection.
Public Extension MethodTakeFromHereToRootT Enumerates through all tree nodes from (and including) the provided node node down to the root node.
Public Extension MethodTakeFromLastLeavesToHereT(T, Boolean) Enumerates through all tree nodes from the downmost leaf of the tree down to the provided node node. If includeThisNode is true, the provided node node is included in the enumeration. Attention: Since the order of the nodes must be reversed, this enumeration is only efficient for ITreeListNodeT types.
Public Extension MethodTakeFromLastLeavesToHereT, D(T, D, Boolean, FuncT, D, D) Enumerates through all tree nodes from the downmost leaf of the tree down to the provided node node. Local data is provided for each enumerated node. The local data is calculated from the root node up to the enumerated node. If includeThisNode is true, the provided node node is included in the enumeration. Attention: Since the order of the nodes must be reversed, this enumeration is only efficient for ITreeListNodeT types.
Public Extension MethodTakeFromLeavesToHereT Enumerates through all tree nodes from the downmost leaf of the tree down to the provided node node. The provided node node is included in the enumeration. Attention: Since the order of the nodes must be reversed, this enumeration is only efficient for ITreeListNodeT types.
Public Extension MethodTakeFromRootToHereT Enumerates through all tree nodes from the root node of the tree to (and including) the provided node node.
Top
See Also