org.opt4j.core.problem
Class ProblemModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.opt4j.core.start.Opt4JModule
          extended by org.opt4j.core.problem.ProblemModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class ProblemModule
extends Opt4JModule

The ProblemModule is an abstract module class for the binding of the Creator, Decoder, and Evaluator.

See Also:
Creator, Decoder, Evaluator

Field Summary
 
Fields inherited from class org.opt4j.core.start.Opt4JModule
SINGLETON
 
Constructor Summary
ProblemModule()
           
 
Method Summary
protected  void addEvaluator(java.lang.Class<? extends Evaluator<? extends java.lang.Object>> evaluator)
          Binds an additional Evaluator.
protected  void bindProblem(java.lang.Class<? extends Creator<? extends Genotype>> creator, java.lang.Class<? extends Decoder<? extends Genotype,? extends java.lang.Object>> decoder, java.lang.Class<? extends Evaluator<? extends java.lang.Object>> evaluator)
           Binds a problem.
 
Methods inherited from class org.opt4j.core.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProblemModule

public ProblemModule()
Method Detail

bindProblem

protected void bindProblem(java.lang.Class<? extends Creator<? extends Genotype>> creator,
                           java.lang.Class<? extends Decoder<? extends Genotype,? extends java.lang.Object>> decoder,
                           java.lang.Class<? extends Evaluator<? extends java.lang.Object>> evaluator)

Binds a problem. A value null is allowed. In this case, the corresponding interface is not bound. Therefore, the binding for the omitted interfaces has to be done in other modules.

Additional Evaluators can be bound using addEvaluator(Class).

Parameters:
creator - the creator
decoder - the decoder
evaluator - the evaluator

addEvaluator

protected void addEvaluator(java.lang.Class<? extends Evaluator<? extends java.lang.Object>> evaluator)
Binds an additional Evaluator.

Parameters:
evaluator - the evaluator to use