es.udc.gii.common.eaf.problem.objective
Class ObjectiveFunction

java.lang.Object
  extended by es.udc.gii.common.eaf.problem.objective.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

Constructor Summary
ObjectiveFunction()
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
           
abstract  double evaluate(double[] values)
          Return the objective value of an Individual after compute this objective function with the individual's chromosome.
 int getDimension()
           
abstract  void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectiveFunction

public ObjectiveFunction()
Method Detail

evaluate

public abstract double evaluate(double[] values)
Return the objective value of an Individual after compute this objective function with the individual's chromosome.

Parameters:
values - the array of double values to evaluate.
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

getDimension

public int getDimension()