public class SequentialIndividualCompleter extends java.lang.Object implements IndividualCompleter
The SequentialIndividualCompleter
completes the Individual
s
sequentially.
It updates the Individual.State
of the Individual
according to the state
of the completion process. It uses Control
between the different
(possibly time consuming) completion steps to allow the user to control the
completion process.
Modifier and Type | Field and Description |
---|---|
protected Control |
control |
protected Decoder<Genotype,java.lang.Object> |
decoder |
protected Evaluator<java.lang.Object> |
evaluator |
Constructor and Description |
---|
SequentialIndividualCompleter(Control control,
Decoder<Genotype,java.lang.Object> decoder,
Evaluator<java.lang.Object> evaluator)
Constructs a
SequentialIndividualCompleter . |
Modifier and Type | Method and Description |
---|---|
void |
complete(Individual... individuals)
Decodes and evaluates all given
Individual s if they are not
already evaluated. |
void |
complete(java.lang.Iterable<? extends Individual> iterable)
Decodes and evaluates all
Individual s in the Iterable if
they are not already evaluated. |
protected void |
decode(Individual individual) |
protected void |
evaluate(Individual individual) |
protected final Evaluator<java.lang.Object> evaluator
protected final Control control
@Inject public SequentialIndividualCompleter(Control control, Decoder<Genotype,java.lang.Object> decoder, Evaluator<java.lang.Object> evaluator)
SequentialIndividualCompleter
.control
- the optimization controldecoder
- the decoderevaluator
- the evaluatorpublic void complete(java.lang.Iterable<? extends Individual> iterable) throws TerminationException
IndividualCompleter
Individual
s in the Iterable
if
they are not already evaluated.complete
in interface IndividualCompleter
iterable
- the set of individuals to be completedTerminationException
- if the optimization is terminatedpublic void complete(Individual... individuals) throws TerminationException
IndividualCompleter
Individual
s if they are not
already evaluated.complete
in interface IndividualCompleter
individuals
- the individuals to be completedTerminationException
- if the optimization is terminatedprotected void evaluate(Individual individual)
protected void decode(Individual individual)