P
- the problem typeR
- the representation typepublic class EpigeneticPopulation<P extends Problem<R>,R extends Representation<?>> extends java.util.ArrayList<EpigeneticIndividual<P,R>> implements java.lang.Comparable<EpigeneticIndividual<P,R>>
Constructor and Description |
---|
EpigeneticPopulation()
Constructor
|
EpigeneticPopulation(P problem,
int individuals,
int cells,
int cores)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(EpigeneticIndividual<P,R> o) |
EpigeneticPopulation<P,R> |
duplicate()
Duplicates the population.
|
boolean |
equals(java.lang.Object o) |
EpigeneticCell<P,R> |
getBestCell()
Returns the best cell in the population.
|
EpigeneticIndividual<P,R> |
getBestIndividual()
Returns the best individual in the population.
|
double[] |
getMetrics()
Returns the best fitness and the average fitness of the population.
|
int |
hashCode() |
java.lang.String |
toString() |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public EpigeneticPopulation()
public EpigeneticPopulation(P problem, int individuals, int cells, int cores) throws java.lang.InterruptedException
problem
- the problemindividuals
- the number of individuals in the populationcells
- the number of cells in each individualcores
- the number of cores available for evaluating the cellsjava.lang.InterruptedException
- if interrupted while waitingpublic EpigeneticPopulation<P,R> duplicate()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>
public EpigeneticIndividual<P,R> getBestIndividual()
public EpigeneticCell<P,R> getBestCell()
public double[] getMetrics()
public int hashCode()
hashCode
in interface java.util.Collection<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>
hashCode
in interface java.util.List<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>
hashCode
in class java.util.AbstractList<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>
equals
in interface java.util.List<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>
equals
in class java.util.AbstractList<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>
public int compareTo(EpigeneticIndividual<P,R> o)
compareTo
in interface java.lang.Comparable<EpigeneticIndividual<P extends Problem<R>,R extends Representation<?>>>