Package net.bmahe.genetics4j.core
Class Population<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.core.Population<T>
- All Implemented Interfaces:
Iterable<Individual<T>>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
add
(Individual<T> individual) void
addAll
(Population<T> population) static <U extends Comparable<U>>
Population<U> empty()
boolean
getFitness
(int index) getGenotype
(int index) getIndividual
(int index) int
hashCode()
boolean
isEmpty()
iterator()
static <U extends Comparable<U>>
Population<U> static <U extends Comparable<U>>
Population<U> of
(List<Individual<U>> individuals) int
size()
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
genotypes
-
fitnesses
-
-
Constructor Details
-
Population
public Population() -
Population
-
-
Method Details
-
add
-
add
-
addAll
-
iterator
- Specified by:
iterator
in interfaceIterable<T extends Comparable<T>>
-
getGenotype
-
getFitness
-
getIndividual
-
getAllGenotypes
-
getAllFitnesses
-
size
public int size() -
isEmpty
public boolean isEmpty() -
hashCode
public int hashCode() -
equals
-
toString
-
of
public static <U extends Comparable<U>> Population<U> of(List<Genotype> _genotype, List<U> _fitnesses) -
of
-
empty
-