Package org.opt4j.operator
Class OperatorModule<P extends Operator>
java.lang.Object
com.google.inject.AbstractModule
org.opt4j.start.Opt4JModule
org.opt4j.operator.OperatorModule<P>
- Type Parameters:
P
- The specific operator with a wildcard (?).
- All Implemented Interfaces:
com.google.inject.Module
- Direct Known Subclasses:
CopyModule
,CrossoverModule
,DiversityModule
,MutateModule
,NeighborModule
Module class for an
Operator
.-
Field Summary
Fields inherited from class org.opt4j.start.Opt4JModule
SINGLETON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addOperator
(Class<? extends Genotype> genotype, Class<? extends P> operator) protected void
addOperator
(Class<? extends P> operator) Add anOperator
.protected void
addOperator
(AbstractGenericOperator.OperatorPredicate predicate, Class<? extends P> operator) protected abstract com.google.inject.TypeLiteral<P>
Methods inherited from class org.opt4j.start.Opt4JModule
addControlListener, addIndividualStateListener, addOptimizerIterationListener, addOptimizerStateListener, bindConstant, bindConstant, bindConstant, bindConstant, config, 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
-
Constructor Details
-
OperatorModule
public OperatorModule()
-
-
Method Details
-
addOperator
Add anOperator
.- Parameters:
operator
- the operator to be added
-
addOperator
protected void addOperator(AbstractGenericOperator.OperatorPredicate predicate, Class<? extends P> operator) - Parameters:
predicate
- the predicateoperator
- the operator
-
getOperatorTypeLiteral
-
addOperator
- Parameters:
genotype
- the genotype classoperator
- the operator
-