Package org.opt4j.core.problem
Class MultiEvaluator
- java.lang.Object
-
- org.opt4j.core.problem.MultiEvaluator
-
- All Implemented Interfaces:
Evaluator<java.lang.Object>
public class MultiEvaluator extends java.lang.Object implements Evaluator<java.lang.Object>
TheMultiEvaluator
takes all registeredEvaluator
s and uses them to evaluate the phenotype. UseProblemModule.addEvaluator(Class)
to add additionalEvaluator
s. The order of theEvaluator
s can be controlled using thePriority
annotation for theEvaluator
classes.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<Evaluator<java.lang.Object>>
evaluators
protected com.google.inject.Provider<Objectives>
objectivesProvider
-
Constructor Summary
Constructors Constructor Description MultiEvaluator(java.util.Set<Evaluator<java.lang.Object>> evaluators, com.google.inject.Provider<Objectives> objectivesProvider)
Creates a newMultiEvaluator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectives
evaluate(java.lang.Object phenotype)
Evaluates a phenotypeObject
and returns the results in theObjectives
.
-
-
-
Field Detail
-
evaluators
protected final java.util.Set<Evaluator<java.lang.Object>> evaluators
-
objectivesProvider
protected final com.google.inject.Provider<Objectives> objectivesProvider
-
-
Constructor Detail
-
MultiEvaluator
@Inject public MultiEvaluator(java.util.Set<Evaluator<java.lang.Object>> evaluators, com.google.inject.Provider<Objectives> objectivesProvider)
Creates a newMultiEvaluator
.- Parameters:
evaluators
- the registered evaluatorsobjectivesProvider
- the objectives provider
-
-
Method Detail
-
evaluate
public Objectives evaluate(java.lang.Object phenotype)
Description copied from interface:Evaluator
Evaluates a phenotypeObject
and returns the results in theObjectives
.
-
-