Package org.opt4j.operator.crossover
Class BasicCrossoverModule
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- org.opt4j.start.Opt4JModule
-
- org.opt4j.operator.OperatorModule<Crossover<?>>
-
- org.opt4j.operator.crossover.CrossoverModule
-
- org.opt4j.operator.crossover.BasicCrossoverModule
-
- All Implemented Interfaces:
com.google.inject.Module
public class BasicCrossoverModule extends CrossoverModule
TheBasicCrossoverModule.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBasicCrossoverModule.BooleanTypeType ofCrossoveroperator for theBooleanGenotype.static classBasicCrossoverModule.DoubleTypeType ofCrossoveroperator for theDoubleGenotype.static classBasicCrossoverModule.IntegerTypeType ofCrossoveroperator for theIntegerGenotype.static classBasicCrossoverModule.PermutationTypeType ofCrossoveroperator for thePermutationGenotype.
-
Field Summary
Fields Modifier and Type Field Description protected doublealphaprotected doublebooleanRateprotected BasicCrossoverModule.BooleanTypebooleanTypeprotected intbooleanXPointsprotected BasicCrossoverModule.DoubleTypedoubleTypeprotected doubleintegerRateprotected BasicCrossoverModule.IntegerTypeintegerTypeprotected intintegerXPointsprotected doublenuprotected BasicCrossoverModule.PermutationTypepermutationTypeprotected booleanrotation-
Fields inherited from class org.opt4j.start.Opt4JModule
SINGLETON
-
-
Constructor Summary
Constructors Constructor Description BasicCrossoverModule()Constructs aBasicCrossoverModule.
-
Method Summary
-
Methods inherited from class org.opt4j.operator.crossover.CrossoverModule
getOperatorTypeLiteral
-
Methods inherited from class org.opt4j.operator.OperatorModule
addOperator, addOperator, addOperator
-
Methods inherited from class org.opt4j.start.Opt4JModule
addControlListener, addIndividualStateListener, addOptimizerIterationListener, addOptimizerStateListener, bindConstant, bindConstant, bindConstant, bindConstant, configure, constant, multi
-
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
-
-
-
Field Detail
-
booleanType
protected BasicCrossoverModule.BooleanType booleanType
-
booleanRate
protected double booleanRate
-
booleanXPoints
protected int booleanXPoints
-
doubleType
protected BasicCrossoverModule.DoubleType doubleType
-
alpha
protected double alpha
-
nu
protected double nu
-
permutationType
protected BasicCrossoverModule.PermutationType permutationType
-
rotation
protected boolean rotation
-
integerType
protected BasicCrossoverModule.IntegerType integerType
-
integerRate
protected double integerRate
-
integerXPoints
protected int integerXPoints
-
-
Constructor Detail
-
BasicCrossoverModule
public BasicCrossoverModule()
Constructs aBasicCrossoverModule.
-
-
Method Detail
-
getIntegerRate
public double getIntegerRate()
Returns the rate of theCrossoverIntegerRate.- Returns:
- the rate
-
setIntegerRate
public void setIntegerRate(double integerRate)
Sets the rate of theCrossoverIntegerRate.- Parameters:
integerRate- the rate
-
getIntegerXPoints
public int getIntegerXPoints()
Returns the number of crossover points of theCrossoverIntegerXPoint.- Returns:
- the number of crossover points
-
setIntegerXPoints
public void setIntegerXPoints(int integerXPoint)
Sets the number of crossover points of theCrossoverIntegerXPoint.- Parameters:
integerXPoint- the number of crossover points
-
getIntegerType
public BasicCrossoverModule.IntegerType getIntegerType()
Return theOperatorforIntegerGenotype.- Returns:
- the operator
-
setIntegerType
public void setIntegerType(BasicCrossoverModule.IntegerType integerType)
Sets theOperatorforIntegerGenotype.- Parameters:
integerType- the operator
-
getBooleanRate
public double getBooleanRate()
Returns the rate of theCrossoverBooleanRate.- Returns:
- the rate
-
setBooleanRate
public void setBooleanRate(double booleanRate)
Sets the rate of theCrossoverBooleanRate.- Parameters:
booleanRate- the rate
-
getBooleanXPoints
public int getBooleanXPoints()
Returns the number of crossover points of theCrossoverBooleanXPoint.- Returns:
- the number of crossover points
-
setBooleanXPoints
public void setBooleanXPoints(int booleanXPoints)
Sets the number of crossover points of theCrossoverBooleanXPoint.- Parameters:
booleanXPoints- the number of crossover points
-
getBooleanType
public BasicCrossoverModule.BooleanType getBooleanType()
Return theOperatorforBooleanGenotype.- Returns:
- the operator
-
setBooleanType
public void setBooleanType(BasicCrossoverModule.BooleanType booleanType)
Sets theOperatorforBooleanGenotype.- Parameters:
booleanType- the operator
-
getAlpha
public double getAlpha()
Returns the alpha value of theCrossoverDoubleBLXorCrossoverDoubleUnfairAverage, respectively.- Returns:
- the alpha value
-
setAlpha
public void setAlpha(double alpha)
Sets the alpha value of theCrossoverDoubleBLXorCrossoverDoubleUnfairAverage, respectively.- Parameters:
alpha- the alpha value
-
getNu
public double getNu()
Returns the nu value of theCrossoverDoubleSBX.- Returns:
- the nu value
-
setNu
public void setNu(double nu)
Sets the nu value of theCrossoverDoubleSBX.- Parameters:
nu- the nu value
-
getDoubleType
public BasicCrossoverModule.DoubleType getDoubleType()
Return theOperatorforDoubleGenotype.- Returns:
- the operator
-
setDoubleType
public void setDoubleType(BasicCrossoverModule.DoubleType doubleType)
Sets theOperatorforDoubleGenotype.- Parameters:
doubleType- the operator
-
getPermutationType
public BasicCrossoverModule.PermutationType getPermutationType()
Returns theBasicCrossoverModule.PermutationType.- Returns:
- the permutation type
-
setPermutationType
public void setPermutationType(BasicCrossoverModule.PermutationType permutationType)
Sets theBasicCrossoverModule.PermutationType.- Parameters:
permutationType- the permutation type
-
isRotation
public boolean isRotation()
- Returns:
trueif rotation is used
-
setRotation
public void setRotation(boolean rotation)
Sets the rotation value for theCrossoveroperator for thePermutationGenotype.- Parameters:
rotation- the rotation value
-
config
public void config()
Description copied from class:Opt4JModuleConfigure the module. Bind constants, listeners, and bind arbitrary classes.- Specified by:
configin classOpt4JModule- See Also:
Binder
-
-