|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjenes.stage.AbstractStage<T>
jenes.stage.operator.Operator<T>
jenes.stage.operator.Mutator<T>
T
- The class of chromosomes to work with.public abstract class Mutator<T extends Chromosome>
A generic mutation operator. The operation is executed according to a mutation probability.
The actual operator is implemented by subclassing this abstract class and providing the mutate(Individual)
implementation: the method is required to mutate an Individual
according to a mutation strategy.
No new individual copies have to be created during the mutation operation: the individual specified at the mutate(Individual)
will take parte to the output mutator population.
A Mutator.Statistics
is associated to each mutator operator.
Individual
,
Population
Nested Class Summary | |
---|---|
class |
Mutator.Statistics
A statistics object holding the number of mutation performed and the time spent to execute them. |
Field Summary | |
---|---|
protected double |
probability
The mutation probablility |
Fields inherited from class jenes.stage.operator.Operator |
---|
random, statistics |
Fields inherited from class jenes.stage.AbstractStage |
---|
biggerIsBetter, ga |
Constructor Summary | |
---|---|
Mutator(double probability)
Constructs a new mutator instance with the specified mutator probability |
Method Summary | |
---|---|
double |
getProbability()
Returns the mutator probability |
protected abstract void |
mutate(Individual<T> t)
Mutates a single individual. |
void |
process(Population<T> in,
Population<T> out)
Processes the input population and tranforms it into the output population. |
void |
setProbability(double probability)
Sets the mutator probability |
Methods inherited from class jenes.stage.operator.Operator |
---|
getStatistics, updateStatistics |
Methods inherited from class jenes.stage.AbstractStage |
---|
dispose, init, isBiggerBetter, setBiggerIsBetter, setBiggerIsBetter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double probability
Constructor Detail |
---|
public Mutator(double probability)
probability
- the mutator probabilityMethod Detail |
---|
public double getProbability()
public void setProbability(double probability)
probability
- the new mutator probabilitypublic final void process(Population<T> in, Population<T> out) throws StageException
AbstractStage
process
in class AbstractStage<T extends Chromosome>
in
- the input populationout
- the output population
StageException
protected abstract void mutate(Individual<T> t)
t
- the individual to mutate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |