Package com.powsybl.timeseries.ast
Class NodeCalcVisitors
java.lang.Object
com.powsybl.timeseries.ast.NodeCalcVisitors
This utility class implements the core iterative algorithm to perform
a post-order
NodeCalc
tree traversal using a
NodeCalcVisitor
.- Author:
- Jon Harper <jon.harper at rte-france.com>
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R,
A> R visit
(NodeCalc root, A arg, NodeCalcVisitor<R, A> visitor) Perform the post-order tree traversal ofroot
usingvisitor
.
-
Field Details
-
RECURSION_THRESHOLD
public static final int RECURSION_THRESHOLD -
NULL
-
-
Method Details
-
visit
Perform the post-order tree traversal ofroot
usingvisitor
. The argumentarg
is supplied to the visitors at each visit of a node.For each node, the iterate method is first called to traverse the tree. Then, after all the children have been visited, the visit method is called with the result of visiting all the children.
- Parameters:
root
- The NodeCalc treearg
- an optional argumentvisitor
- The NodeCalcVisitor- Returns:
- network factory with the given name
-