Package util

Class Utility

java.lang.Object
util.Utility

public class Utility
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Utility()  
  • Method Summary

    Modifier and Type Method Description
    double[] calcAbsolutePerf​(double[] arr1, double[] arr2)  
    double[] calcRelativePerf​(double[] arr)  
    double diff​(double currentValue, double newValue)  
    java.util.List<java.lang.Integer> filter​(double[] values, double asp)  
    int getIndexOfMaxValue​(java.util.List<java.lang.Double> values, java.util.Set<java.lang.Integer> except)
    Returns the index of the maximum value in an array list that is not in a set of tabu indexes.
    int getIndexOfMinValue​(double[] values)  
    int getIndexOfMinValue​(java.util.List<java.lang.Double> values)  
    int getIndexOfMinValue​(java.util.List<java.lang.Double> values, java.util.Set<java.lang.Integer> except)  
    double max​(double[] array)  
    double max​(java.util.List<java.lang.Double> list)  
    double mean​(double[] array)  
    double mean​(java.util.List<java.lang.Double> list)  
    double[] meanHeurPerf​(java.util.List<double[]> perfList)
    Compute the mean of heuristic performance.
    double median​(java.util.List<java.lang.Double> list)  
    double min​(double[] array)  
    double min​(java.util.List<? extends java.lang.Number> list)  
    double percDiff​(double currentValue, double newValue)  
    double std​(java.util.List<java.lang.Double> list)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • diff

      public double diff​(double currentValue, double newValue)
    • percDiff

      public double percDiff​(double currentValue, double newValue)
    • calcAbsolutePerf

      public double[] calcAbsolutePerf​(double[] arr1, double[] arr2)
    • calcRelativePerf

      public double[] calcRelativePerf​(double[] arr)
    • filter

      public java.util.List<java.lang.Integer> filter​(double[] values, double asp)
    • getIndexOfMinValue

      public int getIndexOfMinValue​(java.util.List<java.lang.Double> values)
    • getIndexOfMinValue

      public int getIndexOfMinValue​(java.util.List<java.lang.Double> values, java.util.Set<java.lang.Integer> except)
    • getIndexOfMinValue

      public int getIndexOfMinValue​(double[] values)
    • min

      public double min​(double[] array)
    • min

      public double min​(java.util.List<? extends java.lang.Number> list)
    • mean

      public double mean​(double[] array)
    • mean

      public double mean​(java.util.List<java.lang.Double> list)
    • std

      public double std​(java.util.List<java.lang.Double> list)
    • median

      public double median​(java.util.List<java.lang.Double> list)
    • getIndexOfMaxValue

      public int getIndexOfMaxValue​(java.util.List<java.lang.Double> values, java.util.Set<java.lang.Integer> except)
      Returns the index of the maximum value in an array list that is not in a set of tabu indexes.
      Parameters:
      values - array list of the values
      except - set of tabu indexes
      Returns:
      the index of the maximum value which is not in except
    • max

      public double max​(double[] array)
    • max

      public double max​(java.util.List<java.lang.Double> list)
    • meanHeurPerf

      public double[] meanHeurPerf​(java.util.List<double[]> perfList)
      Compute the mean of heuristic performance. Return
      Parameters:
      perfList - a list of arrays where heurPerfList[t] is the array representing the heuristic performance computed by thread t and perfList[t][h] is the heuristic performance for heuristic 'h' computed by thread 't'
      Returns:
      an array of the average performance for all heuristics where the value at index idx is the average performance of the heuristic at index idx in the universal set.