@Test public void complete() throws TerminationException { Injector injector = Guice.createInjector(new MockProblemModule()); IndividualFactory factory = injector.getInstance(IndividualFactory.class); Individual i1 = factory.create(); SequentialIndividualCompleter completer = injector.getInstance(SequentialIndividualCompleter.class); completer.complete(i1); Assert.assertTrue(i1.isEvaluated()); Assert.assertTrue(i1.isEvaluated()); }
@Override public void complete(Iterable<? extends Individual> iterable) throws TerminationException { for (Individual individual : iterable) { if (!individual.isEvaluated()) { control.checkpoint(); decode(individual); control.checkpoint(); evaluate(individual); control.checkpoint(); } } }
SequentialIndividualCompleter implements IndividualCompleter { @Override public void complete(Iterable<? extends Individual> iterable) throws TerminationException { for (Individual individual : iterable) { if (!individual.isEvaluated()) { control.checkpoint(); decode(individual); control.checkpoint(); evaluate(individual); control.checkpoint(); } } } }
SequentialIndividualCompleter implements IndividualCompleter { @Override public void complete(Iterable<? extends Individual> iterable) throws TerminationException { for (Individual individual : iterable) { if (!individual.isEvaluated()) { control.checkpoint(); decode(individual); control.checkpoint(); evaluate(individual); control.checkpoint(); } } } @Inject  SequentialIndividualCompleter(Control control, Decoder<Genotype, Object> decoder,
			Evaluator<Object> evaluator); }
SequentialIndividualCompleter implements IndividualCompleter { @Override public void complete(Iterable<? extends Individual> iterable) throws TerminationException { for (Individual individual : iterable) { if (!individual.isEvaluated()) { control.checkpoint(); decode(individual); control.checkpoint(); evaluate(individual); control.checkpoint(); } } } @Inject  SequentialIndividualCompleter(Control control, Decoder<Genotype, Object> decoder,
			Evaluator<Object> evaluator); @Override void complete(Iterable<? extends Individual> iterable); @Override void complete(Individual... individuals); }
SequentialIndividualCompleter implements IndividualCompleter { @Override public void complete(Iterable<? extends Individual> iterable) throws TerminationException { for (Individual individual : iterable) { if (!individual.isEvaluated()) { control.checkpoint(); decode(individual); control.checkpoint(); evaluate(individual); control.checkpoint(); } } } @Inject  SequentialIndividualCompleter(Control control, Decoder<Genotype, Object> decoder,
			Evaluator<Object> evaluator); @Override void complete(Iterable<? extends Individual> iterable); @Override void complete(Individual... individuals);  }