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
FieldsFields inherited from interface io.jenetics.Alterer
DEFAULT_ALTER_PROBABILITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractAlterer(double probability) Constructs an alterer with a given recombination probability. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturn 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 theprobabilityis not in the valid range of[0, 1].
-
-
Method Details
-
probability
Return the recombination/alter probability for this alterer.- Returns:
- The recombination probability.
-