Package net.bmahe.genetics4j.gpu.spec
Class ImmutableGPUEAExecutionContext<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.core.spec.AbstractEAExecutionContext<T>
net.bmahe.genetics4j.gpu.spec.GPUEAExecutionContext<T>
net.bmahe.genetics4j.gpu.spec.ImmutableGPUEAExecutionContext<T>
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableGPUEAExecutionContext<T extends Comparable<T>>
extends GPUEAExecutionContext<T>
Immutable implementation of
GPUEAExecutionContext
.
Use the builder to create immutable instances:
ImmutableGPUEAExecutionContext.builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
ImmutableGPUEAExecutionContext.Builder<T extends Comparable<T>>
Builds instances of typeImmutableGPUEAExecutionContext
.private final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List
<ChromosomeCombinatorHandlerFactory<T>> private final List
<ChromosomeCombinatorHandler<T>> private final ChromosomeFactoryProvider
private final List
<ChromosomeMutationHandlerFactory<T>> private final List
<ChromosomeMutationHandler<? extends Chromosome>> private final List
<ChromosomeCombinatorHandler<T>> private final List
<ChromosomeMutationHandler<? extends Chromosome>> private final List
<MutationPolicyHandler<T>> private final List
<ReplacementStrategyHandler<T>> private final List
<SelectionPolicyHandler<T>> private final List
<EvolutionListener<T>> private ImmutableGPUEAExecutionContext<T>.InitShim
private final List
<MutationPolicyHandlerFactory<T>> private final List
<MutationPolicyHandler<T>> private final int
private final RandomGenerator
private final List
<ReplacementStrategyHandlerFactory<T>> private final List
<ReplacementStrategyHandler<T>> private final List
<SelectionPolicyHandlerFactory<T>> private final List
<SelectionPolicyHandler<T>> private static final byte
private static final byte
private static final byte
Fields inherited from class net.bmahe.genetics4j.core.spec.AbstractEAExecutionContext
DEFAULT_POPULATION_SIZE
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableGPUEAExecutionContext
(List<ChromosomeCombinatorHandler<T>> defaultChromosomeCombinatorHandlers, List<ChromosomeCombinatorHandlerFactory<T>> chromosomeCombinatorHandlerFactories, List<SelectionPolicyHandler<T>> defaultSelectionPolicyHandlers, List<SelectionPolicyHandlerFactory<T>> selectionPolicyHandlerFactories, List<MutationPolicyHandler<T>> defaultMutationPolicyHandlers, List<MutationPolicyHandlerFactory<T>> mutationPolicyHandlerFactories, List<ChromosomeMutationHandler<? extends Chromosome>> defaultChromosomeMutationPolicyHandlers, List<ChromosomeMutationHandlerFactory<T>> chromosomeMutationPolicyHandlerFactories, List<ReplacementStrategyHandler<T>> defaultReplacementStrategyHandlers, List<ReplacementStrategyHandlerFactory<T>> replacementStrategyHandlerFactories, RandomGenerator randomGenerator, int populationSize, ChromosomeFactoryProvider chromosomeFactoryProvider, List<EvolutionListener<T>> evolutionListeners, Predicate<Platform> platformFilters, Predicate<Device> deviceFilters) private
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
ImmutableGPUEAExecutionContext.Builder<T> builder()
Creates a builder forImmutableGPUEAExecutionContext
.List
<ChromosomeMutationHandler<? extends Chromosome>> static <T extends Comparable<T>>
ImmutableGPUEAExecutionContext<T> copyOf
(GPUEAExecutionContext<T> instance) Creates an immutable copy of aGPUEAExecutionContext
value.private static <T> List
<T> createSafeList
(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls) private static <T> List
<T> createUnmodifiableList
(boolean clone, List<T> list) List
<ChromosomeMutationHandler<? extends Chromosome>> boolean
This instance is equal to all instances ofImmutableGPUEAExecutionContext
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableGPUEAExecutionContext<?> another) int
hashCode()
Computes a hash code from attributes:defaultChromosomeCombinatorHandlers
,chromosomeCombinatorHandlerFactories
,chromosomeCombinatorHandlers
,defaultSelectionPolicyHandlers
,selectionPolicyHandlerFactories
,selectionPolicyHandlers
,defaultMutationPolicyHandlers
,mutationPolicyHandlerFactories
,mutationPolicyHandlers
,defaultChromosomeMutationPolicyHandlers
,chromosomeMutationPolicyHandlerFactories
,chromosomeMutationPolicyHandlers
,defaultReplacementStrategyHandlers
,replacementStrategyHandlerFactories
,replacementStrategyHandlers
,randomGenerator
,populationSize
,chromosomeFactoryProvider
,evolutionListeners
,platformFilters
,deviceFilters
.int
toString()
Prints the immutable valueGPUEAExecutionContext
with attribute values.final ImmutableGPUEAExecutionContext
<T> withChromosomeCombinatorHandlerFactories
(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofchromosomeCombinatorHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object with elements that replace the content ofchromosomeCombinatorHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object by setting a value for thechromosomeFactoryProvider
attribute.final ImmutableGPUEAExecutionContext
<T> withChromosomeMutationPolicyHandlerFactories
(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofchromosomeMutationPolicyHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object with elements that replace the content ofchromosomeMutationPolicyHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> withDefaultChromosomeCombinatorHandlers
(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultChromosomeCombinatorHandlers
.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object with elements that replace the content ofdefaultChromosomeCombinatorHandlers
.final ImmutableGPUEAExecutionContext
<T> withDefaultChromosomeMutationPolicyHandlers
(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Copy the current immutable object with elements that replace the content ofdefaultChromosomeMutationPolicyHandlers
.final ImmutableGPUEAExecutionContext
<T> withDefaultChromosomeMutationPolicyHandlers
(ChromosomeMutationHandler<? extends Chromosome>... elements) Copy the current immutable object with elements that replace the content ofdefaultChromosomeMutationPolicyHandlers
.final ImmutableGPUEAExecutionContext
<T> withDefaultMutationPolicyHandlers
(Iterable<? extends MutationPolicyHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultMutationPolicyHandlers
.final ImmutableGPUEAExecutionContext
<T> withDefaultMutationPolicyHandlers
(MutationPolicyHandler<T>... elements) Copy the current immutable object with elements that replace the content ofdefaultMutationPolicyHandlers
.final ImmutableGPUEAExecutionContext
<T> withDefaultReplacementStrategyHandlers
(Iterable<? extends ReplacementStrategyHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultReplacementStrategyHandlers
.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object with elements that replace the content ofdefaultReplacementStrategyHandlers
.final ImmutableGPUEAExecutionContext
<T> withDefaultSelectionPolicyHandlers
(Iterable<? extends SelectionPolicyHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultSelectionPolicyHandlers
.final ImmutableGPUEAExecutionContext
<T> withDefaultSelectionPolicyHandlers
(SelectionPolicyHandler<T>... elements) Copy the current immutable object with elements that replace the content ofdefaultSelectionPolicyHandlers
.final ImmutableGPUEAExecutionContext
<T> withDeviceFilters
(Predicate<Device> value) Copy the current immutable object by setting a value for thedeviceFilters
attribute.final ImmutableGPUEAExecutionContext
<T> withEvolutionListeners
(Iterable<? extends EvolutionListener<T>> elements) Copy the current immutable object with elements that replace the content ofevolutionListeners
.final ImmutableGPUEAExecutionContext
<T> withEvolutionListeners
(EvolutionListener<T>... elements) Copy the current immutable object with elements that replace the content ofevolutionListeners
.final ImmutableGPUEAExecutionContext
<T> withMutationPolicyHandlerFactories
(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofmutationPolicyHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> withMutationPolicyHandlerFactories
(MutationPolicyHandlerFactory<T>... elements) Copy the current immutable object with elements that replace the content ofmutationPolicyHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> withPlatformFilters
(Predicate<Platform> value) Copy the current immutable object by setting a value for theplatformFilters
attribute.final ImmutableGPUEAExecutionContext
<T> withPopulationSize
(int value) Copy the current immutable object by setting a value for thepopulationSize
attribute.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object by setting a value for therandomGenerator
attribute.final ImmutableGPUEAExecutionContext
<T> withReplacementStrategyHandlerFactories
(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofreplacementStrategyHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object with elements that replace the content ofreplacementStrategyHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> withSelectionPolicyHandlerFactories
(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofselectionPolicyHandlerFactories
.final ImmutableGPUEAExecutionContext
<T> Copy the current immutable object with elements that replace the content ofselectionPolicyHandlerFactories
.
-
Field Details
-
defaultChromosomeCombinatorHandlers
private final List<ChromosomeCombinatorHandler<T extends Comparable<T>>> defaultChromosomeCombinatorHandlers -
chromosomeCombinatorHandlerFactories
private final List<ChromosomeCombinatorHandlerFactory<T extends Comparable<T>>> chromosomeCombinatorHandlerFactories -
chromosomeCombinatorHandlers
private final transient List<ChromosomeCombinatorHandler<T extends Comparable<T>>> chromosomeCombinatorHandlers -
defaultSelectionPolicyHandlers
-
selectionPolicyHandlerFactories
private final List<SelectionPolicyHandlerFactory<T extends Comparable<T>>> selectionPolicyHandlerFactories -
selectionPolicyHandlers
private final transient List<SelectionPolicyHandler<T extends Comparable<T>>> selectionPolicyHandlers -
defaultMutationPolicyHandlers
-
mutationPolicyHandlerFactories
private final List<MutationPolicyHandlerFactory<T extends Comparable<T>>> mutationPolicyHandlerFactories -
mutationPolicyHandlers
-
defaultChromosomeMutationPolicyHandlers
private final List<ChromosomeMutationHandler<? extends Chromosome>> defaultChromosomeMutationPolicyHandlers -
chromosomeMutationPolicyHandlerFactories
private final List<ChromosomeMutationHandlerFactory<T extends Comparable<T>>> chromosomeMutationPolicyHandlerFactories -
chromosomeMutationPolicyHandlers
private final transient List<ChromosomeMutationHandler<? extends Chromosome>> chromosomeMutationPolicyHandlers -
defaultReplacementStrategyHandlers
private final List<ReplacementStrategyHandler<T extends Comparable<T>>> defaultReplacementStrategyHandlers -
replacementStrategyHandlerFactories
private final List<ReplacementStrategyHandlerFactory<T extends Comparable<T>>> replacementStrategyHandlerFactories -
replacementStrategyHandlers
private final transient List<ReplacementStrategyHandler<T extends Comparable<T>>> replacementStrategyHandlers -
randomGenerator
-
populationSize
private final int populationSize -
chromosomeFactoryProvider
-
evolutionListeners
-
platformFilters
-
deviceFilters
-
STAGE_INITIALIZING
private static final byte STAGE_INITIALIZING- See Also:
-
STAGE_UNINITIALIZED
private static final byte STAGE_UNINITIALIZED- See Also:
-
STAGE_INITIALIZED
private static final byte STAGE_INITIALIZED- See Also:
-
initShim
private transient volatile ImmutableGPUEAExecutionContext<T extends Comparable<T>>.InitShim initShim
-
-
Constructor Details
-
ImmutableGPUEAExecutionContext
-
ImmutableGPUEAExecutionContext
private ImmutableGPUEAExecutionContext(List<ChromosomeCombinatorHandler<T>> defaultChromosomeCombinatorHandlers, List<ChromosomeCombinatorHandlerFactory<T>> chromosomeCombinatorHandlerFactories, List<SelectionPolicyHandler<T>> defaultSelectionPolicyHandlers, List<SelectionPolicyHandlerFactory<T>> selectionPolicyHandlerFactories, List<MutationPolicyHandler<T>> defaultMutationPolicyHandlers, List<MutationPolicyHandlerFactory<T>> mutationPolicyHandlerFactories, List<ChromosomeMutationHandler<? extends Chromosome>> defaultChromosomeMutationPolicyHandlers, List<ChromosomeMutationHandlerFactory<T>> chromosomeMutationPolicyHandlerFactories, List<ReplacementStrategyHandler<T>> defaultReplacementStrategyHandlers, List<ReplacementStrategyHandlerFactory<T>> replacementStrategyHandlerFactories, RandomGenerator randomGenerator, int populationSize, ChromosomeFactoryProvider chromosomeFactoryProvider, List<EvolutionListener<T>> evolutionListeners, Predicate<Platform> platformFilters, Predicate<Device> deviceFilters)
-
-
Method Details
-
defaultChromosomeCombinatorHandlers
- Overrides:
defaultChromosomeCombinatorHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
defaultChromosomeCombinatorHandlers
attribute
-
chromosomeCombinatorHandlerFactories
- Specified by:
chromosomeCombinatorHandlerFactories
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
chromosomeCombinatorHandlerFactories
attribute
-
chromosomeCombinatorHandlers
- Overrides:
chromosomeCombinatorHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The computed-at-construction value of the
chromosomeCombinatorHandlers
attribute
-
defaultSelectionPolicyHandlers
- Overrides:
defaultSelectionPolicyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
defaultSelectionPolicyHandlers
attribute
-
selectionPolicyHandlerFactories
- Specified by:
selectionPolicyHandlerFactories
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
selectionPolicyHandlerFactories
attribute
-
selectionPolicyHandlers
- Overrides:
selectionPolicyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The computed-at-construction value of the
selectionPolicyHandlers
attribute
-
defaultMutationPolicyHandlers
- Overrides:
defaultMutationPolicyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
defaultMutationPolicyHandlers
attribute
-
mutationPolicyHandlerFactories
- Specified by:
mutationPolicyHandlerFactories
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
mutationPolicyHandlerFactories
attribute
-
mutationPolicyHandlers
- Overrides:
mutationPolicyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The computed-at-construction value of the
mutationPolicyHandlers
attribute
-
defaultChromosomeMutationPolicyHandlers
public List<ChromosomeMutationHandler<? extends Chromosome>> defaultChromosomeMutationPolicyHandlers()- Overrides:
defaultChromosomeMutationPolicyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
defaultChromosomeMutationPolicyHandlers
attribute
-
chromosomeMutationPolicyHandlerFactories
- Specified by:
chromosomeMutationPolicyHandlerFactories
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
chromosomeMutationPolicyHandlerFactories
attribute
-
chromosomeMutationPolicyHandlers
- Overrides:
chromosomeMutationPolicyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The computed-at-construction value of the
chromosomeMutationPolicyHandlers
attribute
-
defaultReplacementStrategyHandlers
- Overrides:
defaultReplacementStrategyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
defaultReplacementStrategyHandlers
attribute
-
replacementStrategyHandlerFactories
- Specified by:
replacementStrategyHandlerFactories
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
replacementStrategyHandlerFactories
attribute
-
replacementStrategyHandlers
- Overrides:
replacementStrategyHandlers
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The computed-at-construction value of the
replacementStrategyHandlers
attribute
-
randomGenerator
- Overrides:
randomGenerator
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
randomGenerator
attribute
-
populationSize
public int populationSize()- Overrides:
populationSize
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
populationSize
attribute
-
chromosomeFactoryProvider
- Overrides:
chromosomeFactoryProvider
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
chromosomeFactoryProvider
attribute
-
evolutionListeners
- Overrides:
evolutionListeners
in classAbstractEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
evolutionListeners
attribute
-
platformFilters
- Overrides:
platformFilters
in classGPUEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
platformFilters
attribute
-
deviceFilters
- Overrides:
deviceFilters
in classGPUEAExecutionContext<T extends Comparable<T>>
- Returns:
- The value of the
deviceFilters
attribute
-
withDefaultChromosomeCombinatorHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withDefaultChromosomeCombinatorHandlers(ChromosomeCombinatorHandler<T>... elements) Copy the current immutable object with elements that replace the content ofdefaultChromosomeCombinatorHandlers
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withDefaultChromosomeCombinatorHandlers
public final ImmutableGPUEAExecutionContext<T> withDefaultChromosomeCombinatorHandlers(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultChromosomeCombinatorHandlers
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of defaultChromosomeCombinatorHandlers elements to set- Returns:
- A modified copy of
this
object
-
withChromosomeCombinatorHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withChromosomeCombinatorHandlerFactories(ChromosomeCombinatorHandlerFactory<T>... elements) Copy the current immutable object with elements that replace the content ofchromosomeCombinatorHandlerFactories
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withChromosomeCombinatorHandlerFactories
public final ImmutableGPUEAExecutionContext<T> withChromosomeCombinatorHandlerFactories(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofchromosomeCombinatorHandlerFactories
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of chromosomeCombinatorHandlerFactories elements to set- Returns:
- A modified copy of
this
object
-
withDefaultSelectionPolicyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withDefaultSelectionPolicyHandlers(SelectionPolicyHandler<T>... elements) Copy the current immutable object with elements that replace the content ofdefaultSelectionPolicyHandlers
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withDefaultSelectionPolicyHandlers
public final ImmutableGPUEAExecutionContext<T> withDefaultSelectionPolicyHandlers(Iterable<? extends SelectionPolicyHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultSelectionPolicyHandlers
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of defaultSelectionPolicyHandlers elements to set- Returns:
- A modified copy of
this
object
-
withSelectionPolicyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withSelectionPolicyHandlerFactories(SelectionPolicyHandlerFactory<T>... elements) Copy the current immutable object with elements that replace the content ofselectionPolicyHandlerFactories
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withSelectionPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext<T> withSelectionPolicyHandlerFactories(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofselectionPolicyHandlerFactories
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of selectionPolicyHandlerFactories elements to set- Returns:
- A modified copy of
this
object
-
withDefaultMutationPolicyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withDefaultMutationPolicyHandlers(MutationPolicyHandler<T>... elements) Copy the current immutable object with elements that replace the content ofdefaultMutationPolicyHandlers
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withDefaultMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext<T> withDefaultMutationPolicyHandlers(Iterable<? extends MutationPolicyHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultMutationPolicyHandlers
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of defaultMutationPolicyHandlers elements to set- Returns:
- A modified copy of
this
object
-
withMutationPolicyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withMutationPolicyHandlerFactories(MutationPolicyHandlerFactory<T>... elements) Copy the current immutable object with elements that replace the content ofmutationPolicyHandlerFactories
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withMutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext<T> withMutationPolicyHandlerFactories(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofmutationPolicyHandlerFactories
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of mutationPolicyHandlerFactories elements to set- Returns:
- A modified copy of
this
object
-
withDefaultChromosomeMutationPolicyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withDefaultChromosomeMutationPolicyHandlers(ChromosomeMutationHandler<? extends Chromosome>... elements) Copy the current immutable object with elements that replace the content ofdefaultChromosomeMutationPolicyHandlers
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withDefaultChromosomeMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext<T> withDefaultChromosomeMutationPolicyHandlers(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Copy the current immutable object with elements that replace the content ofdefaultChromosomeMutationPolicyHandlers
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of defaultChromosomeMutationPolicyHandlers elements to set- Returns:
- A modified copy of
this
object
-
withChromosomeMutationPolicyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withChromosomeMutationPolicyHandlerFactories(ChromosomeMutationHandlerFactory<T>... elements) Copy the current immutable object with elements that replace the content ofchromosomeMutationPolicyHandlerFactories
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withChromosomeMutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext<T> withChromosomeMutationPolicyHandlerFactories(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofchromosomeMutationPolicyHandlerFactories
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of chromosomeMutationPolicyHandlerFactories elements to set- Returns:
- A modified copy of
this
object
-
withDefaultReplacementStrategyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withDefaultReplacementStrategyHandlers(ReplacementStrategyHandler<T>... elements) Copy the current immutable object with elements that replace the content ofdefaultReplacementStrategyHandlers
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withDefaultReplacementStrategyHandlers
public final ImmutableGPUEAExecutionContext<T> withDefaultReplacementStrategyHandlers(Iterable<? extends ReplacementStrategyHandler<T>> elements) Copy the current immutable object with elements that replace the content ofdefaultReplacementStrategyHandlers
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of defaultReplacementStrategyHandlers elements to set- Returns:
- A modified copy of
this
object
-
withReplacementStrategyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withReplacementStrategyHandlerFactories(ReplacementStrategyHandlerFactory<T>... elements) Copy the current immutable object with elements that replace the content ofreplacementStrategyHandlerFactories
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withReplacementStrategyHandlerFactories
public final ImmutableGPUEAExecutionContext<T> withReplacementStrategyHandlerFactories(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Copy the current immutable object with elements that replace the content ofreplacementStrategyHandlerFactories
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of replacementStrategyHandlerFactories elements to set- Returns:
- A modified copy of
this
object
-
withRandomGenerator
Copy the current immutable object by setting a value for therandomGenerator
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for randomGenerator- Returns:
- A modified copy of the
this
object
-
withPopulationSize
Copy the current immutable object by setting a value for thepopulationSize
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for populationSize- Returns:
- A modified copy of the
this
object
-
withChromosomeFactoryProvider
public final ImmutableGPUEAExecutionContext<T> withChromosomeFactoryProvider(ChromosomeFactoryProvider value) Copy the current immutable object by setting a value for thechromosomeFactoryProvider
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for chromosomeFactoryProvider- Returns:
- A modified copy of the
this
object
-
withEvolutionListeners
@SafeVarargs public final ImmutableGPUEAExecutionContext<T> withEvolutionListeners(EvolutionListener<T>... elements) Copy the current immutable object with elements that replace the content ofevolutionListeners
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withEvolutionListeners
public final ImmutableGPUEAExecutionContext<T> withEvolutionListeners(Iterable<? extends EvolutionListener<T>> elements) Copy the current immutable object with elements that replace the content ofevolutionListeners
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of evolutionListeners elements to set- Returns:
- A modified copy of
this
object
-
withPlatformFilters
Copy the current immutable object by setting a value for theplatformFilters
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for platformFilters- Returns:
- A modified copy of the
this
object
-
withDeviceFilters
Copy the current immutable object by setting a value for thedeviceFilters
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for deviceFilters- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableGPUEAExecutionContext
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:defaultChromosomeCombinatorHandlers
,chromosomeCombinatorHandlerFactories
,chromosomeCombinatorHandlers
,defaultSelectionPolicyHandlers
,selectionPolicyHandlerFactories
,selectionPolicyHandlers
,defaultMutationPolicyHandlers
,mutationPolicyHandlerFactories
,mutationPolicyHandlers
,defaultChromosomeMutationPolicyHandlers
,chromosomeMutationPolicyHandlerFactories
,chromosomeMutationPolicyHandlers
,defaultReplacementStrategyHandlers
,replacementStrategyHandlerFactories
,replacementStrategyHandlers
,randomGenerator
,populationSize
,chromosomeFactoryProvider
,evolutionListeners
,platformFilters
,deviceFilters
. -
toString
Prints the immutable valueGPUEAExecutionContext
with attribute values. -
copyOf
public static <T extends Comparable<T>> ImmutableGPUEAExecutionContext<T> copyOf(GPUEAExecutionContext<T> instance) Creates an immutable copy of aGPUEAExecutionContext
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T
- generic parameter T- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable GPUEAExecutionContext instance
-
builder
Creates a builder forImmutableGPUEAExecutionContext
.ImmutableGPUEAExecutionContext.<T>builder() .addDefaultChromosomeCombinatorHandlers|addAllDefaultChromosomeCombinatorHandlers(net.bmahe.genetics4j.core.combination.ChromosomeCombinatorHandler<T>) //
defaultChromosomeCombinatorHandlers
elements .addChromosomeCombinatorHandlerFactories|addAllChromosomeCombinatorHandlerFactories(net.bmahe.genetics4j.core.spec.ChromosomeCombinatorHandlerFactory<T>) //chromosomeCombinatorHandlerFactories
elements .addDefaultSelectionPolicyHandlers|addAllDefaultSelectionPolicyHandlers(net.bmahe.genetics4j.core.selection.SelectionPolicyHandler<T>) //defaultSelectionPolicyHandlers
elements .addSelectionPolicyHandlerFactories|addAllSelectionPolicyHandlerFactories(net.bmahe.genetics4j.core.spec.SelectionPolicyHandlerFactory<T>) //selectionPolicyHandlerFactories
elements .addDefaultMutationPolicyHandlers|addAllDefaultMutationPolicyHandlers(net.bmahe.genetics4j.core.mutation.MutationPolicyHandler<T>) //defaultMutationPolicyHandlers
elements .addMutationPolicyHandlerFactories|addAllMutationPolicyHandlerFactories(net.bmahe.genetics4j.core.spec.MutationPolicyHandlerFactory<T>) //mutationPolicyHandlerFactories
elements .addDefaultChromosomeMutationPolicyHandlers|addAllDefaultChromosomeMutationPolicyHandlers(net.bmahe.genetics4j.core.mutation.chromosome.ChromosomeMutationHandler<? extends net.bmahe.genetics4j.core.chromosomes.Chromosome>) //defaultChromosomeMutationPolicyHandlers
elements .addChromosomeMutationPolicyHandlerFactories|addAllChromosomeMutationPolicyHandlerFactories(net.bmahe.genetics4j.core.mutation.chromosome.ChromosomeMutationHandlerFactory<T>) //chromosomeMutationPolicyHandlerFactories
elements .addDefaultReplacementStrategyHandlers|addAllDefaultReplacementStrategyHandlers(net.bmahe.genetics4j.core.replacement.ReplacementStrategyHandler<T>) //defaultReplacementStrategyHandlers
elements .addReplacementStrategyHandlerFactories|addAllReplacementStrategyHandlerFactories(net.bmahe.genetics4j.core.spec.ReplacementStrategyHandlerFactory<T>) //replacementStrategyHandlerFactories
elements .randomGenerator(random.RandomGenerator) // optionalrandomGenerator
.populationSize(int) // optionalpopulationSize
.chromosomeFactoryProvider(net.bmahe.genetics4j.core.chromosomes.factory.ChromosomeFactoryProvider) // optionalchromosomeFactoryProvider
.addEvolutionListeners|addAllEvolutionListeners(net.bmahe.genetics4j.core.evolutionlisteners.EvolutionListener<T>) //evolutionListeners
elements .platformFilters(function.Predicate<net.bmahe.genetics4j.gpu.opencl.model.Platform>) // optionalplatformFilters
.deviceFilters(function.Predicate<net.bmahe.genetics4j.gpu.opencl.model.Device>) // optionaldeviceFilters
.build();- Type Parameters:
T
- generic parameter T- Returns:
- A new ImmutableGPUEAExecutionContext builder
-
createSafeList
-
createUnmodifiableList
-