Package net.bmahe.genetics4j.core
Class EASystemFactory
java.lang.Object
net.bmahe.genetics4j.core.EASystemFactory
Suite of helper methods to create instances of
EASystem
-
Constructor Summary
ModifierConstructorDescriptionprivate
Prevents instantiation since it's a bunch of static methods -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
EASystem<T> from
(AbstractEAConfiguration<T> eaConfiguration, AbstractEAExecutionContext<T> eaExecutionContext, ExecutorService executorService, FitnessEvaluator<T> fitnessEvaluator) static <T extends Comparable<T>>
EASystem<T> from
(EAConfiguration<T> eaConfigurationSync, EAExecutionContext<T> eaExecutionContext) Factory method to create aEASystem
with a simple fitness computation method.static <T extends Comparable<T>>
EASystem<T> from
(EAConfiguration<T> eaConfigurationSync, EAExecutionContext<T> eaExecutionContext, ExecutorService executorService) Factory method to create aEASystem
with a simple fitness computation methodstatic <T extends Comparable<T>>
EASystem<T> from
(EAConfigurationBulkAsync<T> eaConfigurationBulkAsync, EAExecutionContext<T> eaExecutionContext) Factory method to create aEASystem
with an asynchronous fitness computation methodstatic <T extends Comparable<T>>
EASystem<T> from
(EAConfigurationBulkAsync<T> eaConfigurationBulkAsync, EAExecutionContext<T> eaExecutionContext, ExecutorService executorService) Factory method to create aEASystem
with an asynchronous fitness computation method
-
Constructor Details
-
EASystemFactory
private EASystemFactory()Prevents instantiation since it's a bunch of static methods
-
-
Method Details
-
from
public static <T extends Comparable<T>> EASystem<T> from(AbstractEAConfiguration<T> eaConfiguration, AbstractEAExecutionContext<T> eaExecutionContext, ExecutorService executorService, FitnessEvaluator<T> fitnessEvaluator) -
from
public static <T extends Comparable<T>> EASystem<T> from(EAConfiguration<T> eaConfigurationSync, EAExecutionContext<T> eaExecutionContext, ExecutorService executorService) Factory method to create aEASystem
with a simple fitness computation methodThis is the most common and straight forward approach and ideal when computing the fitness is fast and straightforward
- Type Parameters:
T
-- Parameters:
eaConfigurationSync
-eaExecutionContext
-executorService
-- Returns:
-
from
public static <T extends Comparable<T>> EASystem<T> from(EAConfiguration<T> eaConfigurationSync, EAExecutionContext<T> eaExecutionContext) Factory method to create aEASystem
with a simple fitness computation method.This is the most common and straight forward approach and ideal when computing the fitness is fast and straightforward
- Type Parameters:
T
-- Parameters:
eaConfigurationSync
-eaExecutionContext
-- Returns:
-
from
public static <T extends Comparable<T>> EASystem<T> from(EAConfigurationBulkAsync<T> eaConfigurationBulkAsync, EAExecutionContext<T> eaExecutionContext, ExecutorService executorService) Factory method to create aEASystem
with an asynchronous fitness computation methodThis is an ideal approach when computing fitnesses requires external requests or could benefit from bulk processing, such as leveraging GPUs
- Type Parameters:
T
-- Parameters:
eaConfigurationBulkAsync
-eaExecutionContext
-executorService
-- Returns:
-
from
public static <T extends Comparable<T>> EASystem<T> from(EAConfigurationBulkAsync<T> eaConfigurationBulkAsync, EAExecutionContext<T> eaExecutionContext) Factory method to create aEASystem
with an asynchronous fitness computation methodThis is an ideal approach when computing fitnesses requires external requests or could benefit from bulk processing, such as leveraging GPUs
- Type Parameters:
T
-- Parameters:
eaConfigurationBulkAsync
-eaExecutionContext
-- Returns:
-