jmetal.qualityIndicator
Class R2

java.lang.Object
  extended by jmetal.qualityIndicator.R2

public class R2
extends java.lang.Object


Field Summary
 MetricsUtil utils_
           
 
Constructor Summary
R2()
          Constructor Creates a new instance of the R2 indicator for a problem with two objectives and 100 lambda vectors
R2(int nVectors)
          Constructor Creates a new instance of the R2 indicator for a problem with two objectives and N lambda vectors
R2(int nObj, java.lang.String file)
          Constructor Creates a new instance of the R2 indicator for nDimensiosn It loads the weight vectors from the file fileName
 
Method Summary
 int getBest(double[][] approximation, double[][] paretoFront)
          Returns the element contributing the most to the R2 indicator
 int getBest(SolutionSet set)
          Returns the element contributing the most to the R2
 int[] getNBest(double[][] approximation, double[][] paretoFront, int N)
          Returns the element contributing the most to the R2 indicator
 int[] getNBest(SolutionSet set, int N)
          Returns the indexes of the N best solutions according to this indicator
 int getWorst(double[][] approximation, double[][] paretoFront)
          Returns the element contributing the less to the R2
 int getWorst(SolutionSet set)
          Returns the element contributing the less to the R2
static void main(java.lang.String[] args)
          This class can be call from the command line.
 double R2(double[][] approximation, double[][] paretoFront)
          Returns the R2 indicator value of a given front
 double R2(SolutionSet set)
          Returns the R2 indicator of a given population, using as a reference point 0, 0.
 double R2Without(SolutionSet set, int index)
          Returns the R2 indicator value of a given front
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

utils_

public MetricsUtil utils_
Constructor Detail

R2

public R2()
Constructor Creates a new instance of the R2 indicator for a problem with two objectives and 100 lambda vectors


R2

public R2(int nVectors)
Constructor Creates a new instance of the R2 indicator for a problem with two objectives and N lambda vectors


R2

public R2(int nObj,
          java.lang.String file)
Constructor Creates a new instance of the R2 indicator for nDimensiosn It loads the weight vectors from the file fileName

Method Detail

getBest

public int getBest(double[][] approximation,
                   double[][] paretoFront)
Returns the element contributing the most to the R2 indicator

Parameters:
front - The front
trueParetoFront - The true Pareto front
numberOfObjectives - The number of objectives
lambda - A vector containing the lambda vectors for R2

getWorst

public int getWorst(double[][] approximation,
                    double[][] paretoFront)
Returns the element contributing the less to the R2

Parameters:
front - The front
trueParetoFront - The true Pareto front
numberOfObjectives - The number of objectives
lambda - A vector containing the lambda vectors for R2

getBest

public int getBest(SolutionSet set)
Returns the element contributing the most to the R2

Parameters:
front - A solution set

getWorst

public int getWorst(SolutionSet set)
Returns the element contributing the less to the R2

Parameters:
front - The front
trueParetoFront - The true Pareto front

getNBest

public int[] getNBest(double[][] approximation,
                      double[][] paretoFront,
                      int N)
Returns the element contributing the most to the R2 indicator

Parameters:
front - The front
trueParetoFront - The true Pareto front
numberOfObjectives - The number of objectives
lambda - A vector containing the lambda vectors for R2

getNBest

public int[] getNBest(SolutionSet set,
                      int N)
Returns the indexes of the N best solutions according to this indicator

Parameters:
SolutionSet - the solution set for which the best solutions are computed

R2

public double R2(double[][] approximation,
                 double[][] paretoFront)
Returns the R2 indicator value of a given front

Parameters:
front - The front
trueParetoFront - The true Pareto front
numberOfObjectives - The number of objectives
lambda - A vector containing the lambda vectors for R2

R2

public double R2(SolutionSet set)
Returns the R2 indicator of a given population, using as a reference point 0, 0. Normalization is using taking into account the population itself

Parameters:
set -
Returns:

R2Without

public double R2Without(SolutionSet set,
                        int index)
Returns the R2 indicator value of a given front

Parameters:
front - The front
trueParetoFront - The true Pareto front
numberOfObjectives - The number of objectives
lambda - A vector containing the lambda vectors for R2

main

public static void main(java.lang.String[] args)
This class can be call from the command line. At least three parameters are required: 1) the name of the file containing the front, 2) the number of objectives 2) a file containing the reference point / the Optimal Pareto front for normalizing 3) the file containing the weight vector