org.opt4j.core.problem
Class MultiEvaluator

java.lang.Object
  extended by org.opt4j.core.problem.MultiEvaluator
All Implemented Interfaces:
Evaluator<java.lang.Object>

public class MultiEvaluator
extends java.lang.Object
implements Evaluator<java.lang.Object>

The MultiEvaluator takes all registered Evaluators and uses them to evaluate the phenotype. Use ProblemModule.addEvaluator(Class) to add additional Evaluator s. The order of the Evaluators can be controlled using the Priority annotation for the Evaluator classes.


Field Summary
protected  java.util.Set<Evaluator<java.lang.Object>> evaluators
           
 
Constructor Summary
MultiEvaluator(java.util.Set<Evaluator<java.lang.Object>> evaluators)
          Creates a new MultiEvaluator.
 
Method Summary
 Objectives evaluate(java.lang.Object phenotype)
          Evaluates a phenotype Object and returns the results in the Objectives.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

evaluators

protected final java.util.Set<Evaluator<java.lang.Object>> evaluators
Constructor Detail

MultiEvaluator

@Inject
public MultiEvaluator(java.util.Set<Evaluator<java.lang.Object>> evaluators)
Creates a new MultiEvaluator.

Parameters:
evaluators - the registered evaluators
Method Detail

evaluate

public Objectives evaluate(java.lang.Object phenotype)
Description copied from interface: Evaluator
Evaluates a phenotype Object and returns the results in the Objectives.

Specified by:
evaluate in interface Evaluator<java.lang.Object>
Parameters:
phenotype - the phenotype to be evaluated
Returns:
the results in the objectives