Class MeanAlterer<G extends Gene<?,G> & Mean<G> , C extends Comparable<? super C>>
java.lang.Object
io.jenetics.AbstractAlterer<G,C>
io.jenetics.Recombinator<G,C>
io.jenetics.CombineAlterer<G,C>
io.jenetics.MeanAlterer<G,C>
- All Implemented Interfaces:
Alterer<G,C>
public class MeanAlterer<G extends Gene<?,G> & Mean<G>, C extends Comparable<? super C>>
extends CombineAlterer<G,C>
Alters a chromosome by replacing two genes by its mean value.
The order (Recombinator.order()) of this recombination implementation is two.
- Since:
- 1.0
- Version:
- 6.0
-
Field Summary
Fields inherited from class AbstractAlterer
_probabilityFields inherited from interface Alterer
DEFAULT_ALTER_PROBABILITY -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new alterer with alter probability of0.05.MeanAlterer(double probability) Constructs an alterer with a given recombination probability. -
Method Summary
Methods inherited from class CombineAlterer
combiner, recombine, toStringMethods inherited from class Recombinator
alter, orderMethods inherited from class AbstractAlterer
probability
-
Constructor Details
-
MeanAlterer
Constructs an alterer with a given recombination probability.- Parameters:
probability- the crossover probability.- Throws:
IllegalArgumentException- if theprobabilityis not in the valid range of[0, 1].
-
MeanAlterer
public MeanAlterer()Create a new alterer with alter probability of0.05.
-