Module org.cicirello.chips_n_salsa
Package org.cicirello.search.evo
Interface FitnessFunction<T extends Copyable<T>>
- Type Parameters:
T
- The type of object under optimization.
- All Known Subinterfaces:
FitnessFunction.Double<T>
,FitnessFunction.Integer<T>
- All Known Implementing Classes:
InverseCostFitnessFunction
,NegativeCostFitnessFunction
,NegativeIntegerCostFitnessFunction
public interface FitnessFunction<T extends Copyable<T>>
Fitness function interfaces. Implement one of the two nested interfaces to provide a fitness
function for use by genetic algorithms and other forms of evolutionary computation. Some of the
SelectionOperator
classes of this library assume that fitness values are positive, so for
maximal compatibility, you should design your fitness function such that fitness values are
always positive. The difference between the two nested interfaces is only the type of the fitness
values (double vs int).-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
FitnessFunction.Double<T extends Copyable<T>>
Fitness function interface for double-valued fitnesses.static interface
FitnessFunction.Integer<T extends Copyable<T>>
Fitness function interface for int-valued fitnesses. -
Method Summary
Modifier and TypeMethodDescriptionGets a reference to the problem that this fitness function is for.
-
Method Details
-
getProblem
Gets a reference to the problem that this fitness function is for.- Returns:
- a reference to the problem.
-