public final class Evaluators extends Object
Evaluator
implementations. By default, the evolution Engine
uses the concurrent
evaluators (concurrent(Function, Executor)
).Evaluator
Modifier and Type | Method and Description |
---|---|
static <G extends Gene<?,G>,C extends Comparable<? super C>> |
async(Function<? super Genotype<G>,? extends Future<C>> fitness)
Return a new fitness evaluator, which evaluates asynchronous
fitness functions.
|
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
async(Function<? super T,? extends Future<C>> fitness,
Codec<T,G> codec)
Return a new fitness evaluator, which evaluates asynchronous
fitness functions.
|
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
async(Function<? super T,? extends Future<C>> fitness,
Function<? super Genotype<G>,? extends T> decoder)
Return a new fitness evaluator, which evaluates asynchronous
fitness functions.
|
static <G extends Gene<?,G>,C extends Comparable<? super C>> |
completable(Function<? super Genotype<G>,? extends CompletableFuture<C>> fitness)
Return a new fitness evaluator, which evaluates asynchronous
fitness functions.
|
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
completable(Function<? super T,? extends CompletableFuture<C>> fitness,
Codec<T,G> codec)
Return a new fitness evaluator, which evaluates asynchronous
fitness functions.
|
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
completable(Function<? super T,? extends CompletableFuture<C>> fitness,
Function<? super Genotype<G>,? extends T> decoder)
Return a new fitness evaluator, which evaluates asynchronous
fitness functions.
|
static <G extends Gene<?,G>,C extends Comparable<? super C>> |
concurrent(Function<? super Genotype<G>,? extends C> fitness,
Executor executor)
Return a new fitness evaluator, which evaluates the fitness function of
the population (concurrently) with the given
executor . |
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
concurrent(Function<? super T,? extends C> fitness,
Codec<T,G> codec,
Executor executor)
Return a new fitness evaluator, which evaluates the fitness function of
the population (concurrently) with the given
executor . |
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
concurrent(Function<? super T,? extends C> fitness,
Function<? super Genotype<G>,? extends T> decoder,
Executor executor)
Return a new fitness evaluator, which evaluates the fitness function of
the population (concurrently) with the given
executor . |
static <G extends Gene<?,G>,C extends Comparable<? super C>> |
serial(Function<? super Genotype<G>,? extends C> fitness)
Return a new fitness evaluator, which evaluates the fitness function of
the population serially in the main thread.
|
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
serial(Function<? super T,? extends C> fitness,
Codec<T,G> codec)
Return a new fitness evaluator, which evaluates the fitness function of
the population serially in the main thread.
|
static <T,G extends Gene<?,G>,C extends Comparable<? super C>> |
serial(Function<? super T,? extends C> fitness,
Function<? super Genotype<G>,? extends T> decoder)
Return a new fitness evaluator, which evaluates the fitness function of
the population serially in the main thread.
|
public static <G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> serial(Function<? super Genotype<G>,? extends C> fitness)
G
- the gene typeC
- the fitness value typefitness
- the fitness functionNullPointerException
- if the fitness function
is null
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> serial(Function<? super T,? extends C> fitness, Function<? super Genotype<G>,? extends T> decoder)
T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the fitness functiondecoder
- the decoder function for the fitness domainNullPointerException
- if one of the arguments is null
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> serial(Function<? super T,? extends C> fitness, Codec<T,G> codec)
T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the fitness functioncodec
- the codec used for transforming the fitness domainNullPointerException
- if one of the arguments is null
public static <G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> concurrent(Function<? super Genotype<G>,? extends C> fitness, Executor executor)
executor
. This is
the default evaluator used by the evolution engine.G
- the gene typeC
- the fitness value typefitness
- the fitness functionexecutor
- the Executor
used for evaluating the fitness
functionNullPointerException
- if one of the arguments is null
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> concurrent(Function<? super T,? extends C> fitness, Function<? super Genotype<G>,? extends T> decoder, Executor executor)
executor
. This is
the default evaluator used by the evolution engine.T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the fitness function, working on the native
fitness domaindecoder
- the decoder function for the fitness domainexecutor
- the Executor
used for evaluating the fitness
functionNullPointerException
- if one of the arguments is null
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> concurrent(Function<? super T,? extends C> fitness, Codec<T,G> codec, Executor executor)
executor
. This is
the default evaluator used by the evolution engine.T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the fitness function, working on the native
fitness domaincodec
- the codec used for transforming the fitness domainexecutor
- the Executor
used for evaluating the fitness
functionNullPointerException
- if one of the arguments is null
public static <G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> async(Function<? super Genotype<G>,? extends Future<C>> fitness)
G
- the gene typeC
- the fitness value typefitness
- the asynchronous fitness functionNullPointerException
- if one of the arguments is null
completable(Function)
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> async(Function<? super T,? extends Future<C>> fitness, Function<? super Genotype<G>,? extends T> decoder)
T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the asynchronous fitness function, working on the
native fitness domaindecoder
- the decoder function for the fitness domainNullPointerException
- if one of the arguments is null
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> async(Function<? super T,? extends Future<C>> fitness, Codec<T,G> codec)
T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the asynchronous fitness function, working on the
native fitness domaincodec
- the codec used for transforming the fitness domainNullPointerException
- if one of the arguments is null
public static <G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> completable(Function<? super Genotype<G>,? extends CompletableFuture<C>> fitness)
G
- the gene typeC
- the fitness value typefitness
- the asynchronous fitness functionNullPointerException
- if one of the arguments is null
async(Function)
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> completable(Function<? super T,? extends CompletableFuture<C>> fitness, Function<? super Genotype<G>,? extends T> decoder)
T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the asynchronous fitness function, working on the
native fitness domaindecoder
- the decoder function for the fitness domainNullPointerException
- if one of the arguments is null
public static <T,G extends Gene<?,G>,C extends Comparable<? super C>> Evaluator<G,C> completable(Function<? super T,? extends CompletableFuture<C>> fitness, Codec<T,G> codec)
T
- the native fitness domain typeG
- the gene typeC
- the fitness value typefitness
- the asynchronous fitness function, working on the
native fitness domaincodec
- the codec used for transforming the fitness domainNullPointerException
- if one of the arguments is null
© 2007-2019 Franz Wilhelmstötter (2019-06-23 15:39)