|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EvolutionaryOperator
An evolutionary operator is used to create new offspring genomes based on parent genomes. There are a variety of means by which this can be done. The number of parents required, as well as the number of offspring produced are dependent on the operator. This interface defines key characteristics that all operators must share. Most operators do not modify the parents. However, some mutation operators do require that the children and parent array be the same. If the children and parent arrays are the same, then the parent will be mutated.
Method Summary | |
---|---|
void |
init(EvolutionaryAlgorithm theOwner)
Called to setup the evolutionary operator. |
int |
offspringProduced()
|
int |
parentsNeeded()
|
void |
performOperation(Random rnd,
Genome[] parents,
int parentIndex,
Genome[] offspring,
int offspringIndex)
Perform the evolutionary operation. |
Method Detail |
---|
void init(EvolutionaryAlgorithm theOwner)
theOwner
- The evolutionary algorithm used with this operator.int offspringProduced()
int parentsNeeded()
void performOperation(Random rnd, Genome[] parents, int parentIndex, Genome[] offspring, int offspringIndex)
rnd
- A random number generator.parents
- The parents.parentIndex
- The index into the parents array.offspring
- The offspring.offspringIndex
- An index into the offspring array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |