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
SequentialIndividualCompleter
completes theIndividual
s sequentially.It updates the
Individual.State
of theIndividual
according to the state of the completion process. It usesControl
between 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 void
complete(Iterable<? extends Individual> iterable)
Decodes and evaluates allIndividual
s in theIterable
if they are not already evaluated.void
complete(Individual... individuals)
Decodes and evaluates all givenIndividual
s if they are not already evaluated.protected void
decode(Individual individual)
protected void
evaluate(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:IndividualCompleter
Decodes and evaluates allIndividual
s in theIterable
if they are not already evaluated.- Specified by:
complete
in 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:IndividualCompleter
Decodes and evaluates all givenIndividual
s if they are not already evaluated.- Specified by:
complete
in 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)
-
-