Package org.opt4j.common.completer
Class SequentialIndividualCompleter
- java.lang.Object
-
- org.opt4j.common.completer.SequentialIndividualCompleter
-
- All Implemented Interfaces:
IndividualCompleter
- Direct Known Subclasses:
ParallelIndividualCompleter
public class SequentialIndividualCompleter extends Object implements IndividualCompleter
The
SequentialIndividualCompletercompletes theIndividuals sequentially.It updates the
Individual.Stateof theIndividualaccording to the state of the completion process. It usesControlbetween the different (possibly time consuming) completion steps to allow the user to control the completion process.
-
-
Constructor Summary
Constructors Constructor Description SequentialIndividualCompleter(Control control, Decoder decoder, Evaluator evaluator)Constructs aSequentialIndividualCompleter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete(Iterable<? extends Individual> iterable)Decodes and evaluates allIndividuals in theIterableif they are not already evaluated.voidcomplete(Individual... individuals)Decodes and evaluates all givenIndividuals if they are not already evaluated.protected voiddecode(Individual individual)protected voidevaluate(Individual individual)
-
-
-
Constructor Detail
-
SequentialIndividualCompleter
@Inject public SequentialIndividualCompleter(Control control, Decoder decoder, Evaluator evaluator)
Constructs aSequentialIndividualCompleter.- Parameters:
control- the optimization controldecoder- the decoderevaluator- the evaluator
-
-
Method Detail
-
complete
public void complete(Iterable<? extends Individual> iterable) throws TerminationException
Description copied from interface:IndividualCompleterDecodes and evaluates allIndividuals in theIterableif they are not already evaluated.- Specified by:
completein interfaceIndividualCompleter- Parameters:
iterable- the set of individuals to be completed- Throws:
TerminationException- if the optimization is terminated
-
complete
public void complete(Individual... individuals) throws TerminationException
Description copied from interface:IndividualCompleterDecodes and evaluates all givenIndividuals if they are not already evaluated.- Specified by:
completein interfaceIndividualCompleter- Parameters:
individuals- the individuals to be completed- Throws:
TerminationException- if the optimization is terminated
-
evaluate
protected void evaluate(Individual individual)
-
decode
protected void decode(Individual individual)
-
-