Package io.jenetics.ext
Class HPRMutator<G extends Gene<?,G>,C extends Comparable<? super C>>
- java.lang.Object
-
- io.jenetics.AbstractAlterer<G,C>
-
- io.jenetics.Mutator<G,C>
-
- io.jenetics.ext.HPRMutator<G,C>
-
- All Implemented Interfaces:
Alterer<G,C>
public class HPRMutator<G extends Gene<?,G>,C extends Comparable<? super C>> extends Mutator<G,C>
The Hybridizing PSM and RSM Operator (HPRM) constructs an offspring from a pair of parents by hybridizing two mutation operators, PSM and RSM.This mutator is described in A New Mutation Operator for Solving an NP-Complete Problem: Travelling Salesman Problem, by Otman Abdoun, Chakir Tajani and Jaafar Abouchabka.
- Since:
- 5.0
- Version:
- 5.0
- See Also:
RSMutator,SwapMutator
-
-
Field Summary
-
Fields inherited from class io.jenetics.AbstractAlterer
_probability
-
Fields inherited from interface io.jenetics.Alterer
DEFAULT_ALTER_PROBABILITY
-
-
Constructor Summary
Constructors Constructor Description HPRMutator()Default constructor, with default mutation probability (Alterer.DEFAULT_ALTER_PROBABILITY).HPRMutator(double probability)Constructs an alterer with a given recombination probability.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MutatorResult<Chromosome<G>>mutate(Chromosome<G> chromosome, double p, Random random)-
Methods inherited from class io.jenetics.AbstractAlterer
probability
-
-
-
-
Constructor Detail
-
HPRMutator
public HPRMutator(double probability)
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].
-
HPRMutator
public HPRMutator()
Default constructor, with default mutation probability (Alterer.DEFAULT_ALTER_PROBABILITY).
-
-
Method Detail
-
mutate
protected MutatorResult<Chromosome<G>> mutate(Chromosome<G> chromosome, double p, Random random)
-
-