Package org.opt4j.operator.mutate
Class BasicMutateModule
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- org.opt4j.start.Opt4JModule
-
- org.opt4j.operator.OperatorModule<Mutate<?>>
-
- org.opt4j.operator.mutate.MutateModule
-
- org.opt4j.operator.mutate.BasicMutateModule
-
- All Implemented Interfaces:
com.google.inject.Module
public class BasicMutateModule extends MutateModule
The basicCopyModule
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BasicMutateModule.DoubleType
Type ofMutate
operator for theDoubleGenotype
.static class
BasicMutateModule.MutationRateType
The type of the used mutation rate.static class
BasicMutateModule.PermutationType
Type ofMutate
operator for thePermutationGenotype
.
-
Field Summary
Fields Modifier and Type Field Description protected BasicMutateModule.DoubleType
doubleType
protected double
eta
protected double
mutationRate
protected BasicMutateModule.MutationRateType
mutationRateType
protected BasicMutateModule.PermutationType
permutationType
protected double
sigma
-
Fields inherited from class org.opt4j.start.Opt4JModule
SINGLETON
-
-
Constructor Summary
Constructors Constructor Description BasicMutateModule()
Constructs aBasicMutateModule
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
config()
Configure the module.BasicMutateModule.DoubleType
getDoubleType()
Returns the double type.double
getEta()
Returns the eta.double
getMutationRate()
Returns theMutationRate
as a double value.BasicMutateModule.MutationRateType
getMutationRateType()
Returns theBasicMutateModule.MutationRateType
.BasicMutateModule.PermutationType
getPermutationType()
Returns the permutation mode.double
getSigma()
Returns the sigma value.void
setDoubleType(BasicMutateModule.DoubleType doubleType)
Sets the double type.void
setEta(double eta)
Sets the eta.void
setMutationRate(double mutationRate)
Sets theMutationRate
.void
setMutationRateType(BasicMutateModule.MutationRateType mutationRateType)
Sets theBasicMutateModule.MutationRateType
.void
setPermutationType(BasicMutateModule.PermutationType permutationMode)
Sets the permutation mode.void
setSigma(double sigma)
Sets the sigma value.-
Methods inherited from class org.opt4j.operator.mutate.MutateModule
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
-
mutationRateType
protected BasicMutateModule.MutationRateType mutationRateType
-
permutationType
protected BasicMutateModule.PermutationType permutationType
-
doubleType
protected BasicMutateModule.DoubleType doubleType
-
eta
protected double eta
-
sigma
protected double sigma
-
mutationRate
protected double mutationRate
-
-
Constructor Detail
-
BasicMutateModule
public BasicMutateModule()
Constructs aBasicMutateModule
.
-
-
Method Detail
-
getMutationRateType
public BasicMutateModule.MutationRateType getMutationRateType()
Returns theBasicMutateModule.MutationRateType
.- Returns:
- the type of mutation rate
-
setMutationRateType
public void setMutationRateType(BasicMutateModule.MutationRateType mutationRateType)
Sets theBasicMutateModule.MutationRateType
.- Parameters:
mutationRateType
- the type of mutation rate
-
getMutationRate
public double getMutationRate()
Returns theMutationRate
as a double value.- Returns:
- the mutation rate
-
setMutationRate
public void setMutationRate(double mutationRate)
Sets theMutationRate
.- Parameters:
mutationRate
- the mutation rate
-
getPermutationType
public BasicMutateModule.PermutationType getPermutationType()
Returns the permutation mode.- Returns:
- the permutation mode
-
setPermutationType
public void setPermutationType(BasicMutateModule.PermutationType permutationMode)
Sets the permutation mode.- Parameters:
permutationMode
- the permutation mode
-
getDoubleType
public BasicMutateModule.DoubleType getDoubleType()
Returns the double type.- Returns:
- the doubleType
-
setDoubleType
public void setDoubleType(BasicMutateModule.DoubleType doubleType)
Sets the double type.- Parameters:
doubleType
- the doubleType to set
-
getEta
public double getEta()
Returns the eta.- Returns:
- the eta
-
setEta
public void setEta(double eta)
Sets the eta.- Parameters:
eta
- the eta to set
-
getSigma
public double getSigma()
Returns the sigma value.- Returns:
- the sigma
-
setSigma
public void setSigma(double sigma)
Sets the sigma value.- Parameters:
sigma
- the sigma to set
-
config
public void config()
Description copied from class:Opt4JModule
Configure the module. Bind constants, listeners, and bind arbitrary classes.- Specified by:
config
in classOpt4JModule
- See Also:
Binder
-
-