net.sf.amiba.evolve.population
Class DefaultPopulation<T>

Object
  extended by DefaultPopulation<T>
All Implemented Interfaces:
Population<T>

public class DefaultPopulation<T>
extends Object
implements Population<T>

A population. It contains Individuals and some other population-level things. One of the prominent tasks preformed here is selection, with the help of a Selector.

Author:
juber patel

Constructor Summary
DefaultPopulation(int number, IndividualFactory<T> individualFactory, Selector<T> selector, List<FitnessCase<T>> fitnessCases)
           
 
Method Summary
 EvolutionResult<T> getEvolutionResult()
          get the result of the evolution at this point
 int getGenerationNumber()
           
 List<Individual<T>> getIndividuals()
          required to change and manipulate the population
 void nextGeneration()
          this performs selection and replication so that this population is at the next generation once this method completes
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPopulation

public DefaultPopulation(int number,
                         IndividualFactory<T> individualFactory,
                         Selector<T> selector,
                         List<FitnessCase<T>> fitnessCases)
                  throws AmibaException
Throws:
AmibaException
Method Detail

getIndividuals

public List<Individual<T>> getIndividuals()
Description copied from interface: Population
required to change and manipulate the population

Specified by:
getIndividuals in interface Population<T>

getEvolutionResult

public EvolutionResult<T> getEvolutionResult()
get the result of the evolution at this point

Specified by:
getEvolutionResult in interface Population<T>

getGenerationNumber

public int getGenerationNumber()
Specified by:
getGenerationNumber in interface Population<T>

nextGeneration

public void nextGeneration()
                    throws AmibaException
Description copied from interface: Population
this performs selection and replication so that this population is at the next generation once this method completes

Specified by:
nextGeneration in interface Population<T>
Throws:
AmibaException