Package org.opt4j.operators.crossover
Class BasicCrossoverModule
java.lang.Object
com.google.inject.AbstractModule
org.opt4j.core.start.Opt4JModule
org.opt4j.operators.OperatorModule<Crossover<?>>
org.opt4j.operators.crossover.CrossoverModule
org.opt4j.operators.crossover.BasicCrossoverModule
- All Implemented Interfaces:
Module
The
BasicCrossoverModule
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Type ofCrossover
operator for theBooleanGenotype
.static enum
Type ofCrossover
operator for theDoubleGenotype
.static enum
Type ofCrossover
operator for theIntegerGenotype
.static enum
Type ofCrossover
operator for thePermutationGenotype
. -
Field Summary
Fields inherited from class org.opt4j.core.start.Opt4JModule
SINGLETON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
config()
double
getAlpha()
Returns the alpha value of theCrossoverDoubleBLX
orCrossoverDoubleUnfairAverage
, respectively.double
Returns the rate of theCrossoverBooleanRate
.Return theOperator
forBooleanGenotype
.int
Returns the number of crossover points of theCrossoverBooleanXPoint
.Return theOperator
forDoubleGenotype
.double
Returns the rate of theCrossoverIntegerRate
.Return theOperator
forIntegerGenotype
.int
Returns the number of crossover points of theCrossoverIntegerXPoint
.double
getNu()
Returns the nu value of theCrossoverDoubleSBX
.Returns theBasicCrossoverModule.PermutationType
.boolean
void
setAlpha
(double alpha) Sets the alpha value of theCrossoverDoubleBLX
orCrossoverDoubleUnfairAverage
, respectively.void
setBooleanRate
(double booleanRate) Sets the rate of theCrossoverBooleanRate
.void
setBooleanType
(BasicCrossoverModule.BooleanType booleanType) Sets theOperator
forBooleanGenotype
.void
setBooleanXPoints
(int booleanXPoints) Sets the number of crossover points of theCrossoverBooleanXPoint
.void
setDoubleType
(BasicCrossoverModule.DoubleType doubleType) Sets theOperator
forDoubleGenotype
.void
setIntegerRate
(double integerRate) Sets the rate of theCrossoverIntegerRate
.void
setIntegerType
(BasicCrossoverModule.IntegerType integerType) Sets theOperator
forIntegerGenotype
.void
setIntegerXPoints
(int integerXPoint) Sets the number of crossover points of theCrossoverIntegerXPoint
.void
setNu
(double nu) Sets the nu value of theCrossoverDoubleSBX
.void
setPermutationType
(BasicCrossoverModule.PermutationType permutationType) Sets theBasicCrossoverModule.PermutationType
.void
setRotation
(boolean rotation) Sets the rotation value for theCrossover
operator for thePermutationGenotype
.Methods inherited from class org.opt4j.operators.OperatorModule
addOperator, addOperator, addOperator
Methods inherited from class org.opt4j.core.start.Opt4JModule
addControlListener, addIndividualStateListener, addOptimizerIterationListener, addOptimizerStateListener, bindConstant, bindConstant, bindConstant, constant
Methods inherited from class com.google.inject.AbstractModule
configure
-
Constructor Details
-
BasicCrossoverModule
public BasicCrossoverModule()
-
-
Method Details
-
getIntegerRate
Returns the rate of theCrossoverIntegerRate
.- Returns:
- the rate
-
setIntegerRate
Sets the rate of theCrossoverIntegerRate
.- Parameters:
integerRate
- the rate
-
getIntegerXPoints
Returns the number of crossover points of theCrossoverIntegerXPoint
.- Returns:
- the number of crossover points
-
setIntegerXPoints
Sets the number of crossover points of theCrossoverIntegerXPoint
.- Parameters:
integerXPoint
- the number of crossover points
-
getIntegerType
Return theOperator
forIntegerGenotype
.- Returns:
- the operator
-
setIntegerType
Sets theOperator
forIntegerGenotype
.- Parameters:
integerType
- the operator
-
getBooleanRate
Returns the rate of theCrossoverBooleanRate
.- Returns:
- the rate
-
setBooleanRate
Sets the rate of theCrossoverBooleanRate
.- Parameters:
booleanRate
- the rate
-
getBooleanXPoints
Returns the number of crossover points of theCrossoverBooleanXPoint
.- Returns:
- the number of crossover points
-
setBooleanXPoints
Sets the number of crossover points of theCrossoverBooleanXPoint
.- Parameters:
booleanXPoints
- the number of crossover points
-
getBooleanType
Return theOperator
forBooleanGenotype
.- Returns:
- the operator
-
setBooleanType
Sets theOperator
forBooleanGenotype
.- Parameters:
booleanType
- the operator
-
getAlpha
Returns the alpha value of theCrossoverDoubleBLX
orCrossoverDoubleUnfairAverage
, respectively.- Returns:
- the alpha value
-
setAlpha
Sets the alpha value of theCrossoverDoubleBLX
orCrossoverDoubleUnfairAverage
, respectively.- Parameters:
alpha
- the alpha value
-
getNu
Returns the nu value of theCrossoverDoubleSBX
.- Returns:
- the nu value
-
setNu
Sets the nu value of theCrossoverDoubleSBX
.- Parameters:
nu
- the nu value
-
getDoubleType
Return theOperator
forDoubleGenotype
.- Returns:
- the operator
-
setDoubleType
Sets theOperator
forDoubleGenotype
.- Parameters:
doubleType
- the operator
-
getPermutationType
Returns theBasicCrossoverModule.PermutationType
.- Returns:
- the permutation type
-
setPermutationType
Sets theBasicCrossoverModule.PermutationType
.- Parameters:
permutationType
- the permutation type
-
isRotation
- Returns:
true
if rotation is used
-
setRotation
Sets the rotation value for theCrossover
operator for thePermutationGenotype
.- Parameters:
rotation
- the rotation value
-
config
-