Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math.genetics
Class ElitisticListPopulation

    java.lang.Object
      org.apache.commons.math.genetics.ListPopulation
          org.apache.commons.math.genetics.ElitisticListPopulation

All Implemented Interfaces:
  Iterable<Chromosome>, Population

    public class ElitisticListPopulation

extends ListPopulation

Population of chromosomes which uses elitism (certain percentace of the best chromosomes is directly copied to the next generation).

Since:
  2.0
Version:
  $Revision: 990655 $ $Date: 2010-08-29 23:49:40 +0200 (dim. 29 août 2010) $

Field Summary
`private double` | `elitismRate` percentage of chromosomes copied to the next generation

Constructor Summary
`ElitisticListPopulation(int populationLimit, double elitismRate)` Creates a new ListPopulation instance and initializes its inner chromosome list.
`ElitisticListPopulation(List<Chromosome> chromosomes, int populationLimit, double elitismRate)` Creates a new ElitisticListPopulation instance.

Method Summary
`double` | `getElitismRate()` Access the elitism rate.
`Population` | `nextGeneration()` Start the population for the next generation.
`void` | `setElitismRate(double elitismRate)` Sets the elitism rate, i.e.

Methods inherited from class org.apache.commons.math.genetics.ListPopulation
`addChromosome, getChromosomes, getFittestChromosome, getPopulationLimit, getPopulationSize, iterator, setChromosomes, setPopulationLimit, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### elitismRate

    private double elitismRate

  percentage of chromosomes copied to the next generation

Constructor Detail

### ElitisticListPopulation

    public ElitisticListPopulation(List<Chromosome> chromosomes,
                                   int populationLimit,
                                   double elitismRate)

  Creates a new ElitisticListPopulation instance.

  Parameters:
    `chromosomes` - list of chromosomes in the population
    `populationLimit` - maximal size of the population
    `elitismRate` - how many best chromosomes will be directly transferred to the next generation [in %]

### ElitisticListPopulation

    public ElitisticListPopulation(int populationLimit,
                                   double elitismRate)

  Creates a new ListPopulation instance and initializes its inner chromosome list.

  Parameters:
    `populationLimit` - maximal size of the population
    `elitismRate` - how many best chromosomes will be directly transferred to the next generation [in %]

Method Detail

### nextGeneration

    public Population nextGeneration()

  Start the population for the next generation. The ``elitismRate``percents of the best chromosomes are directly copied to the next generation.

  ``
  Returns:
    the beginnings of the next generation.

### setElitismRate

    public void setElitismRate(double elitismRate)

  Sets the elitism rate, i.e. how many best chromosomes will be directly transferred to the next generation [in %].

  Parameters:
    `elitismRate` - how many best chromosomes will be directly transferred to the next generation [in %]

### getElitismRate

    public double getElitismRate()

  Access the elitism rate.

  Returns:
    the elitism rate

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003-2013 Apache Software Foundation