Module io.jenetics.ext
Package io.jenetics.ext
Class WeaselProgram<G extends Gene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.ext.WeaselProgram<G,C>
- Type Parameters:
G
- the gene typeC
- the fitness result type
- All Implemented Interfaces:
Engine.Setup<G,
C>
public final class WeaselProgram<G extends Gene<?,G>,C extends Comparable<? super C>>
extends Object
implements Engine.Setup<G,C>
Configures the evolution engine to execute the
Weasel program
algorithm.
final Engine<CharacterGene, Integer> engine = Engine.builder(problem)
.setup(new WeaselProgram<>())
.build();
- Since:
- 6.0
- Version:
- 6.0
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a new weasel program setup with the default mutation probability of0.05
.WeaselProgram
(double mutationProbability) Create a new weasel program setup with the give mutation probability. -
Method Summary
-
Constructor Details
-
WeaselProgram
Create a new weasel program setup with the give mutation probability.- Parameters:
mutationProbability
- the mutation probability- Throws:
IllegalArgumentException
- if themutationProbability
is not in the valid range of[0, 1]
.
-
WeaselProgram
public WeaselProgram()Create a new weasel program setup with the default mutation probability of0.05
.
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceEngine.Setup<G extends Gene<?,
G>, C extends Comparable<? super C>>
-