|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FitnessFunction
A tag interface for all types of FitnessFunctions. This provides a common base for any type that can be used as a FitnessFunction with a Population. It should not be implemented directly. Instead all FitnessFunctions should implement either the IndividualFitnessFunction or the BatchFitnessFunction interface.
When a Population is constructed with an IndividualFitnessFunction the fitness of each Individual in the Population will evaluated in turn by the provided FitnessFunction. When a Population is constructed with a BatchFitnessFunction, the entire Population will be passed to the provided FitnessFunction which will set the fitness of each Individual in the Population.
Note: The Population code uses the instanceof operator to explicitly handle each different implementation of this interface. Thus if additional implementations are created, the Population class will have to be modified to deal with them also. However, it is anticipated that most (all?) cases can be handled by either implementing the IndividalFitnessFunction or the BatchFitnessFunction interfaces.
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||