net.sourceforge.cilib.problem
Class FunctionMaximisationProblem
java.lang.Object
net.sourceforge.cilib.problem.OptimisationProblemAdapter
net.sourceforge.cilib.problem.FunctionOptimisationProblem
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FunctionMaximisationProblem
public FunctionMaximisationProblem()
FunctionMaximisationProblem
public FunctionMaximisationProblem(FunctionMaximisationProblem copy)
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.