I - individual typepublic final class EvolutionaryAlgorithmImpl<I> extends Object implements EvolutionaryAlgorithm<I>
| Constructor and Description |
|---|
EvolutionaryAlgorithmImpl()
Create a new evolutionary algorithm function implementation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEvolutionaryAlgorithmListener(EvolutionaryAlgorithmListener<I> l)
Add the specified evolutionary algorithm listener.
|
Collection<I> |
evolve(Collection<I> individuals,
ExitStrategy<I> exitStrategy,
Recombination<I> recombination,
Mutation<I> mutation,
Fitness<I> fitness,
Selection<I> selection)
Evolve the specified population of individuals, using all of the specified
exit strategy, recombination, mutation, fitness, and selection functions.
|
int |
getEvolutionaryAlgorithmListenerCount()
Return the number of evolutionary algorithm listeners registered to this
evolutionary algorithm.
|
EvolutionaryAlgorithmListener<I>[] |
getEvolutionaryAlgorithmListeners()
Return an array of evolutionary algorithm listeners registered to this
evolutionary algorithm.
|
void |
removeEvolutionaryAlgorithmListener(EvolutionaryAlgorithmListener<I> l)
Remove the specified evolutionary algorithm listener.
|
public EvolutionaryAlgorithmImpl()
public Collection<I> evolve(Collection<I> individuals, ExitStrategy<I> exitStrategy, Recombination<I> recombination, Mutation<I> mutation, Fitness<I> fitness, Selection<I> selection)
evolve in interface EvolutionaryAlgorithm<I>individuals - population of individuals, must not be null and must contain
at least one individualexitStrategy - exit strategy function, must not be nullrecombination - recombination function, must not be nullmutation - mutation function, must not be nullfitness - fitness function, must not be nullselection - selection function, must not be nullpublic void addEvolutionaryAlgorithmListener(EvolutionaryAlgorithmListener<I> l)
addEvolutionaryAlgorithmListener in interface EvolutionaryAlgorithm<I>l - evolutionary algorithm listener to addpublic void removeEvolutionaryAlgorithmListener(EvolutionaryAlgorithmListener<I> l)
removeEvolutionaryAlgorithmListener in interface EvolutionaryAlgorithm<I>l - evolutionary algorithm listener to removepublic int getEvolutionaryAlgorithmListenerCount()
getEvolutionaryAlgorithmListenerCount in interface EvolutionaryAlgorithm<I>public EvolutionaryAlgorithmListener<I>[] getEvolutionaryAlgorithmListeners()
getEvolutionaryAlgorithmListeners in interface EvolutionaryAlgorithm<I>Copyright (c) 2005-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).