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
Nested ClassesModifier and TypeClassDescriptionstatic enumType ofCrossoveroperator for theBooleanGenotype.static enumType ofCrossoveroperator for theDoubleGenotype.static enumType ofCrossoveroperator for theIntegerGenotype.static enumType ofCrossoveroperator for thePermutationGenotype. -
Field Summary
Fields inherited from class org.opt4j.core.start.Opt4JModule
SINGLETON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfig()doublegetAlpha()Returns the alpha value of theCrossoverDoubleBLXorCrossoverDoubleUnfairAverage, respectively.doubleReturns the rate of theCrossoverBooleanRate.Return theOperatorforBooleanGenotype.intReturns the number of crossover points of theCrossoverBooleanXPoint.Return theOperatorforDoubleGenotype.doubleReturns the rate of theCrossoverIntegerRate.Return theOperatorforIntegerGenotype.intReturns the number of crossover points of theCrossoverIntegerXPoint.doublegetNu()Returns the nu value of theCrossoverDoubleSBX.Returns theBasicCrossoverModule.PermutationType.booleanvoidsetAlpha(double alpha) Sets the alpha value of theCrossoverDoubleBLXorCrossoverDoubleUnfairAverage, respectively.voidsetBooleanRate(double booleanRate) Sets the rate of theCrossoverBooleanRate.voidsetBooleanType(BasicCrossoverModule.BooleanType booleanType) Sets theOperatorforBooleanGenotype.voidsetBooleanXPoints(int booleanXPoints) Sets the number of crossover points of theCrossoverBooleanXPoint.voidsetDoubleType(BasicCrossoverModule.DoubleType doubleType) Sets theOperatorforDoubleGenotype.voidsetIntegerRate(double integerRate) Sets the rate of theCrossoverIntegerRate.voidsetIntegerType(BasicCrossoverModule.IntegerType integerType) Sets theOperatorforIntegerGenotype.voidsetIntegerXPoints(int integerXPoint) Sets the number of crossover points of theCrossoverIntegerXPoint.voidsetNu(double nu) Sets the nu value of theCrossoverDoubleSBX.voidsetPermutationType(BasicCrossoverModule.PermutationType permutationType) Sets theBasicCrossoverModule.PermutationType.voidsetRotation(boolean rotation) Sets the rotation value for theCrossoveroperator for thePermutationGenotype.Methods inherited from class org.opt4j.operators.OperatorModule
addOperator, addOperator, addOperatorMethods inherited from class org.opt4j.core.start.Opt4JModule
addControlListener, addIndividualStateListener, addOptimizerIterationListener, addOptimizerStateListener, bindConstant, bindConstant, bindConstant, constantMethods 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 theOperatorforIntegerGenotype.- Returns:
- the operator
-
setIntegerType
Sets theOperatorforIntegerGenotype.- 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 theOperatorforBooleanGenotype.- Returns:
- the operator
-
setBooleanType
Sets theOperatorforBooleanGenotype.- Parameters:
booleanType- the operator
-
getAlpha
Returns the alpha value of theCrossoverDoubleBLXorCrossoverDoubleUnfairAverage, respectively.- Returns:
- the alpha value
-
setAlpha
Sets the alpha value of theCrossoverDoubleBLXorCrossoverDoubleUnfairAverage, 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 theOperatorforDoubleGenotype.- Returns:
- the operator
-
setDoubleType
Sets theOperatorforDoubleGenotype.- Parameters:
doubleType- the operator
-
getPermutationType
Returns theBasicCrossoverModule.PermutationType.- Returns:
- the permutation type
-
setPermutationType
Sets theBasicCrossoverModule.PermutationType.- Parameters:
permutationType- the permutation type
-
isRotation
- Returns:
trueif rotation is used
-
setRotation
Sets the rotation value for theCrossoveroperator for thePermutationGenotype.- Parameters:
rotation- the rotation value
-
config
-