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
public abstract class OperatorModule<P extends Operator> extends Opt4JModule
Module class for anOperator
.
-
-
Field Summary
-
Fields inherited from class org.opt4j.start.Opt4JModule
SINGLETON
-
-
Constructor Summary
Constructors Constructor Description OperatorModule()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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>
getOperatorTypeLiteral()
-
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
-
-
-
-
Method Detail
-
addOperator
protected void addOperator(Class<? extends P> operator)
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
protected abstract com.google.inject.TypeLiteral<P> getOperatorTypeLiteral()
-
-