Package org.opt4j.operator.neighbor
Class NeighborDouble
- java.lang.Object
-
- org.opt4j.operator.neighbor.NeighborDouble
-
- All Implemented Interfaces:
Operator<DoubleGenotype>
,Neighbor<DoubleGenotype>
public class NeighborDouble extends Object implements Neighbor<DoubleGenotype>
TheNeighborDouble
operator for theDoubleGenotype
.
-
-
Field Summary
Fields Modifier and Type Field Description protected NormalizeDouble
normalize
protected Random
random
-
Constructor Summary
Constructors Constructor Description NeighborDouble(NormalizeDouble normalize, Rand random)
Constructs aNeighborDouble
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
neighbor(DoubleGenotype genotype)
Moves theGenotype
to a neighbor.
-
-
-
Field Detail
-
random
protected final Random random
-
normalize
protected final NormalizeDouble normalize
-
-
Constructor Detail
-
NeighborDouble
@Inject public NeighborDouble(NormalizeDouble normalize, Rand random)
Constructs aNeighborDouble
.- Parameters:
normalize
- the operator for normalizationrandom
- the random number generator
-
-
Method Detail
-
neighbor
public void neighbor(DoubleGenotype genotype)
Description copied from interface:Neighbor
Moves theGenotype
to a neighbor.- Specified by:
neighbor
in interfaceNeighbor<DoubleGenotype>
- Parameters:
genotype
- theGenotype
to be changed
-
-