All Packages Class Hierarchy This Package Previous Next Index
Class evolution.GeneticFactoryImpl
java.lang.Object
|
+----evolution.GeneticFactoryImpl
- public abstract class GeneticFactoryImpl
- extends Object
- implements GeneticFactory
Default partial implementation of GeneticFactory
.
To be precise, I implement all methods that may be implemented
without making assumptions on the concrete evolution type.
-
rg
-
-
GeneticFactoryImpl()
- Create myself with the default RandomGenerator seeded with a random seed.
-
GeneticFactoryImpl(byte[])
- Create myself with the default RandomGenerator seeded with the specified seed.
-
GeneticFactoryImpl(RandomGenerator)
- Create myself with the given random generator.
-
GeneticFactoryImpl(RandomGenerator, byte[])
- Create myself with the given random generator and seed.
-
getEvaluator()
-
-
getNumParents()
- Return the number of individuals that need to copulate
for the creation of a child.
-
getRandomGenerator()
-
-
getSortingAlgorithm()
-
-
merge(Genome[], EvolutionParm)
- Merge the parent genomes to produce a child genome.
-
newEmptyGenome()
-
-
newIndividual()
- Create a new individual.
-
offspring(Individual[], EvolutionParm)
- Produce a child from the parents' genomes.
rg
protected RandomGenerator rg
GeneticFactoryImpl
public GeneticFactoryImpl(RandomGenerator r,
byte randomSeed[])
- Create myself with the given random generator and seed.
GeneticFactoryImpl
public GeneticFactoryImpl(RandomGenerator r)
- Create myself with the given random generator.
GeneticFactoryImpl
public GeneticFactoryImpl(byte seed[])
- Create myself with the default RandomGenerator seeded with the specified seed.
GeneticFactoryImpl
public GeneticFactoryImpl()
- Create myself with the default RandomGenerator seeded with a random seed.
newIndividual
public abstract Individual newIndividual() throws EvolutionException
- Create a new individual.
- Returns:
- a new (random)
Individual
getNumParents
public abstract int getNumParents()
- Return the number of individuals that need to copulate
for the creation of a child. 1 is allowed, which amounts to a
non-sexual evolution where the only genetic "input" is mutation.
- Returns:
- a natural number greater or equal to 1.
getEvaluator
public abstract Evaluator getEvaluator()
- Returns:
- the Evaluator object used for this evolution.
newEmptyGenome
protected abstract Genome newEmptyGenome()
- Returns:
- an empty new
Genome
offspring
public Individual offspring(Individual parents[],
EvolutionParm p) throws EvolutionException
- Produce a child from the parents' genomes.
- Throws: EvolutionException
- if something goes wrong :-)
- Throws: BadSizeException
- if the number of prents is wrong
getSortingAlgorithm
public SortingAlgorithm getSortingAlgorithm()
- Returns:
- the default SortingAlgorithm, viz. SortingAlgorithmImpl of JGL.
merge
protected Genome merge(Genome parent[],
EvolutionParm parm) throws EvolutionException
- Merge the parent genomes to produce a child genome.
- Parameters:
- parent - the parent genomes
- Returns:
- the new genome
getRandomGenerator
public RandomGenerator getRandomGenerator()
- Returns:
- the RandomGenerator object used for this evolution.
All Packages Class Hierarchy This Package Previous Next Index