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)doublediff(double currentValue, double newValue)java.util.List<java.lang.Integer>filter(double[] values, double asp)intgetIndexOfMaxValue(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.intgetIndexOfMinValue(double[] values)intgetIndexOfMinValue(java.util.List<java.lang.Double> values)intgetIndexOfMinValue(java.util.List<java.lang.Double> values, java.util.Set<java.lang.Integer> except)doublemax(double[] array)doublemax(java.util.List<java.lang.Double> list)doublemean(double[] array)doublemean(java.util.List<java.lang.Double> list)double[]meanHeurPerf(java.util.List<double[]> perfList)Compute the mean of heuristic performance.doublemedian(java.util.List<java.lang.Double> list)doublemin(double[] array)doublemin(java.util.List<? extends java.lang.Number> list)doublepercDiff(double currentValue, double newValue)doublestd(java.util.List<java.lang.Double> list)
-
Constructor Details
-
Utility
public Utility()
-
-
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 valuesexcept- 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
idxis the average performance of the heuristic at indexidxin the universal set.
-