org.jgap.eval
Class PopulationHistory

java.lang.Object
  extended byorg.jgap.eval.PopulationHistory

public class PopulationHistory
extends java.lang.Object

Container for holding a given number of populations. Serves as a history object for later evaluation

Since:
2.0
Author:
Klaus Meffert

Constructor Summary
PopulationHistory(int a_maxSize)
           
 
Method Summary
 void addPopulation(Population pop)
          Adds a population to the history.
 Population getPopulation(int count)
           
 java.util.List getPopulations()
           
 void removeAllPopulations()
           
 void setPopulations(java.util.List populations)
          Sets the list of populations to the list provided
 int size()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopulationHistory

public PopulationHistory(int a_maxSize)
Method Detail

getPopulation

public Population getPopulation(int count)

addPopulation

public void addPopulation(Population pop)
Adds a population to the history. If the maximum size of this container is exceeded after that then the oldest population added is removed

Parameters:
pop - the population to be added
Since:
2.0

removeAllPopulations

public void removeAllPopulations()
Since:
2.0

size

public int size()

getPopulations

public java.util.List getPopulations()

setPopulations

public void setPopulations(java.util.List populations)
Sets the list of populations to the list provided

Parameters:
populations - list of populations to be set
Since:
2.0