|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gpsys.ParentInfo
This class is used to hold information about the genetic operations involving a a particular parent. The class is used in the implementation of memory efficient crossover as described in Genetic Programming III.
| Field Summary | |
(package private) static int |
BUSY
A parent is busy if it has one or more outstanding genetic operations to be performed. |
(package private) java.util.LinkedList |
crossoverParents
A list containing information about parents involved in crossover operations with this parent. |
(package private) static int |
DEAD
A parent has this state if it has expired and been replaced a new Individual. |
(package private) static int |
FREE
A parent is deemed free if it has no outstanding genetic operations and it has not already been replaced in the population. |
(package private) int |
id
The index of this parent in the population. |
(package private) int |
mutationCount
A count of how many mutation operations involving this parent. |
(package private) ParentInfo |
next
Points to the next parent information block in the list that this parent is contained within. |
(package private) ParentInfo |
prev
Points to the previous parent information block in the list that this parent is contained within. |
(package private) int |
reproductionCount
A count of how many reproduction operations involving this parent. |
(package private) int |
state
The state of this parent. |
(package private) int |
totalOperationsCount
A count of the total number of genetic operations involving this parent. |
| Constructor Summary | |
ParentInfo(int id)
Constructs a ParentInfo data object for the specified parent. |
|
| Method Summary | |
int |
addCrossover(ParentInfo parent2)
Adds a crossover operation to this parent. |
int |
addMutation()
Adds a mutation operation to this parent. |
int |
addReproduction()
Adds a reproduction operation to this parent. |
int |
getId()
Get the index of this individual in the population. |
int |
getOperations()
Get a count of the total number of genetic operations involving this parent. |
void |
kill()
Kill this individual, which just sets the state to DEAD. |
void |
removeCrossover(ParentInfo parent2)
Remove the crossover operation involving the specified second parent. |
GeneticOperation |
removeOperation()
Remove an operation from this parent. |
void |
reset()
Reset this instance. |
java.lang.String |
toString()
Creates a string representing the state of this object. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
int mutationCount
int reproductionCount
java.util.LinkedList crossoverParents
int totalOperationsCount
int id
int state
static final int DEAD
static final int FREE
static final int BUSY
ParentInfo prev
ParentInfo next
| Constructor Detail |
public ParentInfo(int id)
id - The index of the individual for which parenting information
is maintained.| Method Detail |
public int addCrossover(ParentInfo parent2)
parent2 - The second parent involved in the crossover.public int addMutation()
public int addReproduction()
public GeneticOperation removeOperation()
public void removeCrossover(ParentInfo parent2)
parent2 - The second parent involved in the crossover operation.public int getOperations()
public int getId()
public void kill()
public void reset()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||