List.
| Modifier and Type | Field and Description |
|---|---|
| private List | chromosomes
List of chromosomes |
| private int | populationLimit
maximal size of the population |
| Access | Constructor and Description |
|---|---|
| public | ListPopulation(final int
maximal size of the population populationLimit)Creates a new ListPopulation instance and initializes its inner chromosome list. |
| public | ListPopulation(final List<Chromosome>
list of chromosomes to be added to the population chromosomes, final int maximal size of the population populationLimit)Creates a new ListPopulation instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addChromosome(final Chromosome
the chromosome to add. chromosome)Implements org. Add the given chromosome to the population. |
| public void | addChromosomes(final Collection<Chromosome>
a chromosomeColl)Collection of chromosomesAdd a |
| protected List | |
| public List | Returns: the unmodifiable list of chromosomesReturns an unmodifiable list of the chromosomes in this population. |
| public Chromosome | Returns: the fittest chromosome.Implements org. Access the fittest chromosome in this population. |
| public int | Returns: the maximum population size.Implements org. Access the maximum population size. |
| public int | Returns: the current population size.Implements org. Access the current population size. |
| public Iterator | Returns: chromosome iteratorImplements java. Returns an iterator over the unmodifiable list of chromosomes. |
| public void | setChromosomes(final List<Chromosome>
the list of chromosomes chromosomes)
Deprecated
use
addChromosomes(Collection) instead
Sets the list of chromosomes. |
| public void | setPopulationLimit(final int
maximal population size. populationLimit)Sets the maximal population size. |
| public String |
| chromosomes | back to summary |
|---|---|
| private List<Chromosome> chromosomes List of chromosomes | |
| populationLimit | back to summary |
|---|---|
| private int populationLimit maximal size of the population | |
| ListPopulation | back to summary |
|---|---|
| public ListPopulation(final int populationLimit) throws NotPositiveException Creates a new ListPopulation instance and initializes its inner chromosome list.
| |
| ListPopulation | back to summary |
|---|---|
| public ListPopulation(final List<Chromosome> chromosomes, final int populationLimit) throws NullArgumentException, NotPositiveException, NumberIsTooLargeException Creates a new ListPopulation instance. Note the chromosomes of the specified list are added to the population.
| |
| addChromosome | back to summary |
|---|---|
| public void addChromosome(final Chromosome chromosome) throws NumberIsTooLargeException Implements org. Add the given chromosome to the population.
| |
| addChromosomes | back to summary |
|---|---|
| public void addChromosomes(final Collection<Chromosome> chromosomeColl) throws NumberIsTooLargeException Add a
| |
| getChromosomeList | back to summary |
|---|---|
| protected List Access the list of chromosomes.
| |
| getChromosomes | back to summary |
|---|---|
| public List Returns an unmodifiable list of the chromosomes in this population.
| |
| getFittestChromosome | back to summary |
|---|---|
| public Chromosome getFittestChromosome() Implements org. Access the fittest chromosome in this population.
| |
| getPopulationLimit | back to summary |
|---|---|
| public int getPopulationLimit() Implements org. Access the maximum population size.
| |
| getPopulationSize | back to summary |
|---|---|
| public int getPopulationSize() Implements org. Access the current population size.
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Returns an iterator over the unmodifiable list of chromosomes. Any call to
| |
| setChromosomes | back to summary |
|---|---|
| public void setChromosomes(final List<Chromosome> chromosomes) throws NullArgumentException, NumberIsTooLargeException
Deprecated use Sets the list of chromosomes. Note this method removes all existing chromosomes in the population and adds all chromosomes of the specified list to the population.
| |
| setPopulationLimit | back to summary |
|---|---|
| public void setPopulationLimit(final int populationLimit) throws NotPositiveException, NumberIsTooSmallException Sets the maximal population size.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |