@FunctionalInterface public static interface Engine.GenotypeEvaluator<G extends Gene<?,G>,C extends Comparable<? super C>>
final GenotypeEvaluator<G, C> gte = (g, f) -> g.map(f).asISeq()
final Evaluator<G, C> evaluator = Evaluator.of(gte);
Engine.Evaluator
,
Engine.Builder.evaluator(Engine.GenotypeEvaluator)
Engine
configuration
feature, which should be only used when there is a performance gain from
implementing a different evaluation strategy.ISeq<C> evaluate(Seq<Genotype<G>> genotypes, Function<? super Genotype<G>,? extends C> function)
genotypes
- the genotypes to evaluate the fitness value forfunction
- the fitness functiongenotypes
The length
of the fitness result sequence must match with the size of
the given genotypes
.Engine.Evaluator.of(Engine.GenotypeEvaluator)
© 2007-2018 Franz Wilhelmstötter (2018-05-31 12:39)