Class TreeTraverser

java.lang.Object
solvers.queueingnet.treeAlgorithms.TreeTraverser
Direct Known Subclasses:
SingleThreadTCSolver, SingleThreadTMVASolver

public abstract class TreeTraverser extends Object
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 Details

    • TreeTraverser

      public TreeTraverser()
  • Method Details

    • recursiveTraverse

      public void recursiveTraverse(Node node, PopulationVector pv)
      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

      public void iterativeTraverse(Node root, PopulationVector pv)
      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

      public abstract void initLeafNode(Node node, PopulationVector pv)
      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

      public abstract void computeSubnetNode(Node node, PopulationVector pv)
      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.