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