net.sourceforge.cilib.problem
Class FunctionMinimisationProblem
java.lang.Object
net.sourceforge.cilib.problem.OptimisationProblemAdapter
net.sourceforge.cilib.problem.FunctionOptimisationProblem
net.sourceforge.cilib.problem.FunctionMinimisationProblem
- All Implemented Interfaces:
- Serializable, OptimisationProblem, Problem, Cloneable
- Direct Known Subclasses:
- GradientFunctionMinimisationProblem
public class FunctionMinimisationProblem
- extends FunctionOptimisationProblem
An implementation of OptimisationProblemAdapter
that can be used to find the minimum of
any Function
.
- Author:
- Edwin Peer
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FunctionMinimisationProblem
public FunctionMinimisationProblem()
FunctionMinimisationProblem
public FunctionMinimisationProblem(FunctionMinimisationProblem copy)
getClone
public FunctionMinimisationProblem 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 minimiser for the function.
The lowest possible error (corresponding to the best solution) should be 0. However, if the
function incorrectly reports its minimum 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.