Package org.opt4j.operators.neighbor
Class NeighborIntegerRandom
- java.lang.Object
-
- org.opt4j.operators.neighbor.NeighborIntegerRandom
-
- All Implemented Interfaces:
org.opt4j.core.optimizer.Operator<org.opt4j.core.genotype.IntegerGenotype>
,Neighbor<org.opt4j.core.genotype.IntegerGenotype>
,NeighborInteger
public class NeighborIntegerRandom extends java.lang.Object implements NeighborInteger
TheNeighborIntegerRandom
selects on element of anIntegerGenotype
and changes it. The neighbor is created randomly between the lower and upper bounds.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Random
random
-
Constructor Summary
Constructors Constructor Description NeighborIntegerRandom(org.opt4j.core.common.random.Rand random)
Constructs aNeighborIntegerRandom
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
neighbor(org.opt4j.core.genotype.IntegerGenotype genotype)
Moves theGenotype
to a neighbor.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opt4j.operators.neighbor.Neighbor
getOperatorType
-
-
-
-
Constructor Detail
-
NeighborIntegerRandom
@Inject public NeighborIntegerRandom(org.opt4j.core.common.random.Rand random)
Constructs aNeighborIntegerRandom
.- Parameters:
random
- the random number generator
-
-