|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epochx.core.GPElitism<TYPE>
public class GPElitism<TYPE>
This class has the task of retrieving the set of elites from a population.
| Constructor Summary | |
|---|---|
GPElitism(GPModel<TYPE> model)
Constructs an instance of GPElitism which will perform the elitism operation. |
|
| Method Summary | |
|---|---|
java.util.List<CandidateProgram<TYPE>> |
getElites(java.util.List<CandidateProgram<TYPE>> pop)
Gets the best CandidatePrograms from the given population
and returns them. |
void |
onGenerationStart()
Called after each generation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GPElitism(GPModel<TYPE> model)
model - the GPModel which defines the run parameters and life
cycle listeners.| Method Detail |
|---|
public java.util.List<CandidateProgram<TYPE>> getElites(java.util.List<CandidateProgram<TYPE>> pop)
CandidatePrograms from the given population
and returns them. The number of programs returned will be determined by
a call to the model's getNoElites() method. If this method
returns a value greater than the allowable population size then the
population size will be used. Elites in EpochX are defined as the very
best programs in a population.
After selection and before returning, the model's life cycle listener
will be informed of the elitism operation with a call to
onElitism(). Unlike many of the other life cycle methods,
it is not possible to 'revert' an elitism event by returning null. This
is because elitism is a deterministic operation, and so re-running would
lead to the same result.
pop - the population from which elites need to be retrieved.
public void onGenerationStart()
onGenerationStart in interface GenerationListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||