Interface IVisitStrategy<TNode, TVisitContext>
A visit strategy of IRecImmDictIndexedTreeNode<TEdge, TNode> structures. Can be any way of moving through the structure and touching nodes: partial or exaustive, hierarchical or random, upwards or downwards, etc.
Namespace: MoreStructures.RecImmTrees.Visitor
Assembly: MoreStructures.dll
Syntax
public interface IVisitStrategy<in TNode, out TVisitContext>
Type Parameters
Name | Description |
---|---|
TNode | The type of nodes of the specific structure. |
TVisitContext | The type of visit context. Depends on the IVisitStrategy<TNode, TVisitContext> used. |
Methods
| Improve this Doc View SourceVisit(TNode)
Lazily visits the structure of the provided node
, returning an enumerable of the
sequence of IRecImmDictIndexedTreeNode<TEdge, TNode> of the structure, in the order defined by
this IVisitStrategy<TNode, TVisitContext>.
Declaration
IEnumerable<TVisitContext> Visit(TNode node)
Parameters
Type | Name | Description |
---|---|---|
TNode | node | The node on where to start visit the structure. |
Returns
Type | Description |
---|---|
IEnumerable<TVisitContext> | A sequence emitting (node, visit context) couples, in the visit order defined by the visit strategy. |