public class MetricsUtil
extends java.lang.Object
Constructor and Description |
---|
MetricsUtil() |
Modifier and Type | Method and Description |
---|---|
double |
distance(double[] a,
double[] b)
This method returns the distance (taken the euclidean distance) between
two points given as
double [] |
double |
distanceToClosedPoint(double[] point,
double[][] front)
Gets the distance between a point and the nearest one in
a given front (the front is given as
double [][] ) |
double |
distanceToNearestPoint(double[] point,
double[][] front)
Gets the distance between a point and the nearest one in
a given front, and this distance is greater than 0.0
|
double[] |
getMaximumValues(double[][] front,
int noObjectives)
Gets the maximun values for each objectives in a given pareto
front
|
double[] |
getMinimumValues(double[][] front,
int noObjectives)
Gets the minimun values for each objectives in a given pareto
front
|
double[][] |
getNormalizedFront(double[][] front,
double[] maximumValue,
double[] minimumValue)
This method receives a pareto front and two points, one whit maximun values
and the other with minimun values allowed, and returns a the normalized
pareto front.
|
double[][] |
invertedFront(double[][] front)
This method receives a normalized pareto front and return the inverted one.
|
double[][] |
readFront(java.lang.String path)
This method reads a Pareto Front for a file.
|
SolutionSet |
readNonDominatedSolutionSet(java.lang.String path)
Reads a set of non dominated solutions from a file
|
public double[][] readFront(java.lang.String path)
path
- The path to the file that contains the pareto frontpublic double[] getMaximumValues(double[][] front, int noObjectives)
front
- The pareto frontnoObjectives
- Number of objectives in the pareto frontpublic double[] getMinimumValues(double[][] front, int noObjectives)
front
- The pareto frontnoObjectives
- Number of objectives in the pareto frontpublic double distance(double[] a, double[] b)
double []
a
- A pointb
- A pointpublic double distanceToClosedPoint(double[] point, double[][] front)
double [][]
)point
- The pointfront
- The front that contains the other points to calculate the
distancespublic double distanceToNearestPoint(double[] point, double[][] front)
point
- The pointfront
- The front that contains the other points to calculate the
distancespublic double[][] getNormalizedFront(double[][] front, double[] maximumValue, double[] minimumValue)
front
- A pareto front.maximumValue
- The maximun values allowedminimumValue
- The mininum values allowedpublic double[][] invertedFront(double[][] front)
front
- The pareto front to inversepublic SolutionSet readNonDominatedSolutionSet(java.lang.String path)
path
- The path of the file containing the data