Skip to content

DepthFirstPreOrderTraversal<TNode> Class ​

Definition ​

Strategy for traversing nodes in a tree depth first, pre-order, that is, depth first with parent nodes being enumerated before their children.

c#
public sealed class DepthFirstPreOrderTraversal<TNode> : ITraversal<TNode>
   where TNode : Node<TNode>

View source

Type Parameters ​

NameDescription
TNodeThe type of nodes in the tree.

Fields ​

NameDescription
InstanceThe singleton DepthFirstPreOrderTraversal<TNode> instance.

Methods ​

NameDescription
Enumerate(TNode, Boolean, Func<TNode, Boolean>)Enumerates over a node and its descendants.

See Also ​