Class TreeTraverser
java.lang.Object
solvers.queueingnet.treeAlgorithms.TreeTraverser
- Direct Known Subclasses:
SingleThreadTCSolver, SingleThreadTMVASolver
Tree traverser abstract class which implements generic single-threaded tree traversal, leaving the
actual node computations to the extending class.
- Author:
- Ben Homer, 2014.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcomputeSubnetNode(Node node, PopulationVector pv) Abstract method which an extending class will override to define subnetwork node computations.abstract voidinitLeafNode(Node node, PopulationVector pv) Abstract method which an extending class will override to define leaf node computations.voiditerativeTraverse(Node root, PopulationVector pv) Iteratively traverses a tree from the specified node in a post-order fashion, performing computations at each node.voidrecursiveTraverse(Node node, PopulationVector pv) Recursively traverses a tree from the specified node in a post-order fashion, performing computations at each node.
-
Constructor Details
-
TreeTraverser
public TreeTraverser()
-
-
Method Details
-
recursiveTraverse
Recursively traverses a tree from the specified node in a post-order fashion, performing computations at each node.- Parameters:
node- The node the traversal starts from.pv- The population vector to use for node computations.
-
iterativeTraverse
Iteratively traverses a tree from the specified node in a post-order fashion, performing computations at each node.- Parameters:
root- The node the traversal starts from.pv- The population vector to use for node computations.
-
initLeafNode
Abstract method which an extending class will override to define leaf node computations.- Parameters:
node- The leaf node.pv- The population vector to use for the computation.
-
computeSubnetNode
Abstract method which an extending class will override to define subnetwork node computations.- Parameters:
node- The subnetwork node.pv- The population vector to use for the computation.
-