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>
TheNeighborDoubleoperator for theDoubleGenotype.
-
-
Field Summary
Fields Modifier and Type Field Description protected NormalizeDoublenormalizeprotected Randomrandom
-
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 voidneighbor(DoubleGenotype genotype)Moves theGenotypeto 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:NeighborMoves theGenotypeto a neighbor.- Specified by:
neighborin interfaceNeighbor<DoubleGenotype>- Parameters:
genotype- theGenotypeto be changed
-
-