|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epochx.core.GPReproduction<TYPE>
public class GPReproduction<TYPE>
This class controls the reproduction operation.
ProgramSelector| Constructor Summary | |
|---|---|
GPReproduction(GPModel<TYPE> model)
Constructs an instance of GEReproduction which will setup the reproduction operation. |
|
| Method Summary | |
|---|---|
int |
getReversions()
Number of times the reproduction was rejected and re-attempted. |
void |
onGenerationStart()
Called after each generation. |
CandidateProgram<TYPE> |
reproduce()
Selects a CandidateProgram from the population using the
ProgramSelector returned by a call to
getProgramSelector() on the model given at construction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GPReproduction(GPModel<TYPE> model)
model - the GEModel which defines the ProgramSelector to use to
select the program to be reproduced.| Method Detail |
|---|
public CandidateProgram<TYPE> reproduce()
CandidateProgram from the population using the
ProgramSelector returned by a call to
getProgramSelector() on the model given at construction.
After a program is selected for reproduction, the model's life cycle
listener is requested to confirm or modify the selection by a call to
onReproduction(). This gives over total control to decide
whether a reproduction is allowed to proceed, and gives an opportunity
for manipulation of the reproduced child program. If
onReproduction() returns null then the child
is discarded and a new parent is selected and reproduced. The number of
times the reproduction was reverted before being accepted is available
through a call to getReversions().
public int getReversions()
After a program is selected for reproduction, the model's life cycle
listener is requested to confirm or modify the selection by a call to
onReproduction(). This gives over total control to decide
whether a reproduction is allowed to proceed, and gives an opportunity
for manipulation of the reproduced child program. If
onReproduction() returns null then the child
is discarded and a new parent is selected and reproduced. The number of
times the reproduction was reverted before being accepted is available
through a call to this method.
public void onGenerationStart()
onGenerationStart in interface GenerationListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||