Class Measure

java.lang.Object
dynheurset.measure.Measure
Direct Known Subclasses:
DisimprDurMeasure, DisimprFreqDurMeasure, DisimprFreqMeasure, DisimprMeasure, ImprDurMeasure, ImprFreqDurMeasure, ImprFreqMeasure, ImprMeasure, PerfDurMeasure, PerfFreqDurMeasure, PerfFreqMeasure, PerfMeasure, WtdBestPerfDurMeasure, WtdBestPerfFreqDurMeasure, WtdBestPerfFreqMeasure, WtdBestPerfMeasure, WtdBestRunbestPerfDurMeasure, WtdBestRunbestPerfFreqDurMeasure, WtdBestRunbestPerfFreqMeasure, WtdBestRunbestPerfMeasure, WtdPerfDurMeasure, WtdPerfFreqDurMeasure, WtdPerfFreqMeasure, WtdPerfMeasure

public abstract class Measure
extends java.lang.Object
Measure is the base class for all performance measures that aimed at measuring the quality of low-level heuristics.

Performance measures are should be used to decide which heuristic to include in the active set and which heuristic to permanently removed if needed.

All subclasses of this class should implement the measure(int heurIdx) abstract method.

  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected static double MAX
    A constant used to assign a high value for heuristic that have not been used yet to give them the chance to be used at least once
    RunStat runStat
    The run statistics to record the heuristic performance.
  • Constructor Summary

    Constructors 
    Constructor Description
    Measure()  
  • Method Summary

    Modifier and Type Method Description
    java.util.List<java.lang.Double> measure()
    Loops through all heuristic indexes and returns a List containing the heuristic values as measured by this measure.
    abstract double measure​(int heurIdx)
    Measure the performance of the heuristic indexed by heurIdx in the universal set.
    void setRunStat​(RunStat runStat)
    Sets the runStat field of this measure.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • runStat

      public RunStat runStat
      The run statistics to record the heuristic performance.
    • MAX

      protected static final double MAX
      A constant used to assign a high value for heuristic that have not been used yet to give them the chance to be used at least once
      See Also:
      Constant Field Values
  • Constructor Details

  • Method Details

    • setRunStat

      public void setRunStat​(RunStat runStat)
      Sets the runStat field of this measure.
      Parameters:
      runStat - the observer that record the performance of heuristics
    • measure

      public abstract double measure​(int heurIdx)
      Measure the performance of the heuristic indexed by heurIdx in the universal set.
      Parameters:
      heurIdx - the index of the heuristic in the universal set
      Returns:
      the value of heuristic representing its quality
    • measure

      public java.util.List<java.lang.Double> measure()
      Loops through all heuristic indexes and returns a List containing the heuristic values as measured by this measure.

      The value at index idx in the returned list is the value of the heuristic at index idx in the universal set.

      Returns:
      the values of all heuristics as an array list