es.udc.gii.common.eaf.algorithm.fitness
Class ObjectiveFunction
java.lang.Object
es.udc.gii.common.eaf.algorithm.fitness.ObjectiveFunction
- All Implemented Interfaces:
- Configurable
public abstract class ObjectiveFunction
- extends java.lang.Object
- implements Configurable
Objective functions are used to determine the value of an Individual
when it is used to resolve a Problem
.
This interface should be extended by the user and the evaluate
method implemented.
The objective function is given a Individual to evaluate and return an objective
value.
Note: Two individuals with equivalent chromosome should always be
assigned the same fitness value by any implementation of this interface.
- Author:
- pilar
Method Summary |
void |
configure(org.apache.commons.configuration.Configuration conf)
|
abstract double |
evaluate(java.util.List values)
Return the objective value of an Individual after compute this objective
function with the individual's chromosome. |
double |
getMaxValue()
|
double |
getMinValue()
|
abstract void |
reset()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxValue
private double maxValue
minValue
private double minValue
ObjectiveFunction
public ObjectiveFunction()
ObjectiveFunction
public ObjectiveFunction(double maxValue,
double minValue)
evaluate
public abstract double evaluate(java.util.List values)
- Return the objective value of an Individual after compute this objective
function with the individual's chromosome.
- Parameters:
individual
- an individual for wich to compute and return the objective function value.
- Returns:
- the objective value of the individual in this objective function.
reset
public abstract void reset()
configure
public void configure(org.apache.commons.configuration.Configuration conf)
- Specified by:
configure
in interface Configurable
getMaxValue
public double getMaxValue()
getMinValue
public double getMinValue()