|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Classes that implement this interface can become observers of the GP system. By defining the functions of this interface they can monitor important events such as the creation of new Individuals and the completion of a generation.
| Field Summary | |
static int |
CREATION
Used to indicate that the generation update is for the 0th generation. |
static int |
EVOLVED
Used to indicate that the generation update represents a generation that has been evolved. |
static int |
FROMSTREAM
Used to indicate that the generation update represents a generation loaded from a stream. |
static int |
VIA_CREATION
Used to indicate that an Individual was created via creation. |
static int |
VIA_CROSSOVER
Used to indicate that an Individual was created via crossover. |
static int |
VIA_MUTATION
Used to indicate that an Individual was created via mutation. |
static int |
VIA_REPRODUCTION
Used to indicate that an Individual was created via reproduction. |
| Method Summary | |
void |
diagnosticUpdate(java.lang.String s)
Invoked by the GP system whenever something interesting occurs, the supplied String indictates what happened. |
void |
exception(GPException e)
Invoked by the GP system whenever an exception occurs, override this to do something useful such as print a stack trace. |
void |
generationUpdate(GPParameters gpParameters,
int how)
Invoked by the GP system whenever a new generation has been created. |
void |
individualUpdate(GPParameters gpParameters,
Individual i,
int creationMethod)
Invoked by the GP system whenever a new Individual has been created. |
| Field Detail |
public static final int VIA_MUTATION
public static final int VIA_CROSSOVER
public static final int VIA_REPRODUCTION
public static final int VIA_CREATION
public static final int CREATION
public static final int FROMSTREAM
public static final int EVOLVED
| Method Detail |
public void generationUpdate(GPParameters gpParameters,
int how)
gpParameters - the GP parameters used for this run.how - how the generation was created. Can be either
CREATION, FROMSTREAM or EVOLVED.
public void individualUpdate(GPParameters gpParameters,
Individual i,
int creationMethod)
gpParameters - the GP parameters used for this run.i - the Individual that has just been created.creationMethod - how the Individual was created. Can be either
VIA_CREATION, VIA_REPRODUCTION, VIA_MUTATION or
VIA_CROSSOVER.public void diagnosticUpdate(java.lang.String s)
s - a String describing the event.public void exception(GPException e)
e - The Exception that was raised.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||