Class TMVAComplexityEvaluator

java.lang.Object
solvers.queueingnet.treeAlgorithms.ComplexityEvaluator
solvers.queueingnet.treeAlgorithms.tmva.TMVAComplexityEvaluator

public class TMVAComplexityEvaluator extends ComplexityEvaluator
Class responsible for evaluating the complexity of the tree MVA algorithm if it were to be run on a given tree representing a network.
Author:
Ben Homer, 2014.
  • Constructor Details

    • TMVAComplexityEvaluator

      public TMVAComplexityEvaluator(QNModel qnm, ClassCoverageUtils ccu)
      Constructor.
      Parameters:
      qnm - The queueing network model we are trying to solve.
      ccu - The ClassCoverageUtils object used for calculating the class coverage at certain nodes in the planted tree.
  • Method Details

    • treeHasAcceptableComplexity

      public boolean treeHasAcceptableComplexity(Node root, PopulationVector pv)
      Determines if the TMVA for the specified tree has better complexity characteristics than the standard/sequential MVA algorithm for the same network.
      Specified by:
      treeHasAcceptableComplexity in class ComplexityEvaluator
      Parameters:
      root - The root node of the tree to test.
      pv - The per class population vector of the network.
      Returns:
      A boolean indicating whether the tree has an acceptable expected complexity.
    • getLeafNodeComplexity

      protected ComplexityEvaluator.ComplexityBundle getLeafNodeComplexity(Node node, PopulationVector pv)
      Gets the complexity of a leaf node computation in the TMVA algorithm.
      Specified by:
      getLeafNodeComplexity in class ComplexityEvaluator
      Parameters:
      node - The leaf node.
      pv - The per class population vector of the network.
      Returns:
      A ComplexityBundle containing the expected time and space complexities.
    • getSubnetNodeComplexity

      protected ComplexityEvaluator.ComplexityBundle getSubnetNodeComplexity(Node node, PopulationVector pv)
      Gets the complexity of a subnetwork node computation in the TMVA algorithm.
      Specified by:
      getSubnetNodeComplexity in class ComplexityEvaluator
      Parameters:
      node - The subnetwork node.
      pv - The per class population vector of the network.
      Returns:
      A ComplexityBundle containing the expected time and space complexities.
    • getStandardAlgorithmComplexity

      protected ComplexityEvaluator.ComplexityBundle getStandardAlgorithmComplexity(PopulationVector pv)
      Gets the complexity of running standard/sequential MVA algorithm over a network with the specified population vector.
      Specified by:
      getStandardAlgorithmComplexity in class ComplexityEvaluator
      Parameters:
      pv - The network's population vector.
      Returns:
      A ComplexityBundle containing the expected time and space complexities.
    • printSummary

      protected void printSummary()
      Prints a summary of the complexity evaluators calculations.
      Specified by:
      printSummary in class ComplexityEvaluator