net.sourceforge.cilib.problem
Class FunctionMaximisationProblem

java.lang.Object
  extended by net.sourceforge.cilib.problem.OptimisationProblemAdapter
      extended by net.sourceforge.cilib.problem.FunctionOptimisationProblem
          extended by net.sourceforge.cilib.problem.FunctionMaximisationProblem
All Implemented Interfaces:
Serializable, OptimisationProblem, Problem, Cloneable
Direct Known Subclasses:
DeratingFunctionMaximisationProblem

public class FunctionMaximisationProblem
extends FunctionOptimisationProblem

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.problem.FunctionOptimisationProblem
function
 
Fields inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
dataSetBuilder, fitnessEvaluations
 
Constructor Summary
FunctionMaximisationProblem()
           
FunctionMaximisationProblem(FunctionMaximisationProblem copy)
           
 
Method Summary
protected  Fitness calculateFitness(Type solution)
          Determine the Fitness of the current Problem instance based on the provided solution.
 FunctionMaximisationProblem getClone()
          Create a cloned copy of the current object and return it.
 double getError(Type solution)
           Returns the error for the given solution.
 
Methods inherited from class net.sourceforge.cilib.problem.FunctionOptimisationProblem
accept, getBehaviouralDomain, getDomain, getFunction, setFunction
 
Methods inherited from class net.sourceforge.cilib.problem.OptimisationProblemAdapter
changeEnvironment, getChangeStrategy, getDataSetBuilder, getFitness, getFitnessEvaluations, setChangeStrategy, setDataSetBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionMaximisationProblem

public FunctionMaximisationProblem()

FunctionMaximisationProblem

public FunctionMaximisationProblem(FunctionMaximisationProblem copy)
Method Detail

getClone

public FunctionMaximisationProblem getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface OptimisationProblem
Specified by:
getClone in interface Problem
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class FunctionOptimisationProblem
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

calculateFitness

protected Fitness calculateFitness(Type solution)
Determine the Fitness of the current Problem instance based on the provided solution.

Specified by:
calculateFitness in class OptimisationProblemAdapter
Parameters:
solution - The Type representing the candidate solution.
Returns:
The Fitness of the solution in the current Problem.
See Also:
OptimisationProblemAdapter.getFitness(Type, boolean)

getError

public double getError(Type solution)

Returns the error for the given solution. That is, a lower error value is returned if the given solution is a better maximiser for the function.

The lowest possible error (corresponding to the best solution) should be 0. However, if the function incorrectly reports its maximum value then it is possible for error values to be negative.

Specified by:
getError in class FunctionOptimisationProblem
Parameters:
solution - The solution for which an error is saught.
Returns:
The error.


Copyright © 2009 CIRG. All Rights Reserved.