Module io.jenetics.base
Package io.jenetics
Class AbstractAlterer<G extends Gene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.AbstractAlterer<G,C>
- All Implemented Interfaces:
Alterer<G,
C>
- Direct Known Subclasses:
Mutator
,Recombinator
public abstract class AbstractAlterer<G extends Gene<?,G>,C extends Comparable<? super C>>
extends Object
implements Alterer<G,C>
Abstract implementation of the alterer interface.
- Since:
- 1.0
- Version:
- 6.0
-
Field Summary
Fields inherited from interface io.jenetics.Alterer
DEFAULT_ALTER_PROBABILITY
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractAlterer
(double probability) Constructs an alterer with a given recombination probability. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Return the recombination/alter probability for this alterer.
-
Field Details
-
_probability
The altering probability.
-
-
Constructor Details
-
AbstractAlterer
Constructs an alterer with a given recombination probability.- Parameters:
probability
- The recombination probability.- Throws:
IllegalArgumentException
- if theprobability
is not in the valid range of[0, 1]
.
-
-
Method Details
-
probability
Return the recombination/alter probability for this alterer.- Returns:
- The recombination probability.
-