|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gpsys.CrossoverBookkeeping
This is an implementation of the bookkeeping class used for memory efficient crossover as described in the book Genetic Programming III.
Population,
GPParameters| Field Summary | |
(package private) ParentInfo[] |
listHead
The list heads in this array are used to create 4 lists. |
(package private) ParentInfo[] |
parentTable
The parent table is 2 elements bigger than the number of individuals in the population. |
| Constructor Summary | |
(package private) |
CrossoverBookkeeping(int size)
Construct a bookkeeping object suitable for storing the selected genetic operations for creating the next generation. |
| Method Summary | |
(package private) void |
addCrossoverOperation(int p1,
int p2)
Add a crossover operation to the list of operations to be performed. |
(package private) void |
addMutationOperation(int p)
Add a mutation operation to the list of operations to be performed. |
(package private) void |
addReproductionOperation(int p)
Add a reproduction operation to the list of operations to be performed. |
private void |
addToList(ParentInfo parent)
Add the parent mating information structure to the appropriate list. |
(package private) void |
createLists()
Populate the four lists with parent mating information. |
(package private) int |
removeFreeSlot()
Remove a parent from the free list. |
private void |
removeFromList(ParentInfo parent)
Remove the parent mating information structure from the associated list. |
(package private) GeneticOperation |
removeOperation()
Remove a genetic operation from the list of operations to be performed. |
(package private) void |
reset()
Reset the bookkeeping data structure. |
java.lang.String |
toString()
Create a string representation of the bookkeeping data structure. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
ParentInfo[] listHead
ParentInfo[] parentTable
| Constructor Detail |
CrossoverBookkeeping(int size)
size - The size of the population.| Method Detail |
void addCrossoverOperation(int p1,
int p2)
p1 - The index of the first parent.p1 - The index of the second parent.void addReproductionOperation(int p)
p - The index of the individual to be reproduced.void addMutationOperation(int p)
p - The index of the individual to be mutated.GeneticOperation removeOperation()
int removeFreeSlot()
void createLists()
private void addToList(ParentInfo parent)
private void removeFromList(ParentInfo parent)
void reset()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||