jenes.population
Class Population.Statistics

java.lang.Object
  extended by jenes.population.Population.Statistics
Enclosing class:
Population<T extends Chromosome>

public final class Population.Statistics
extends java.lang.Object

The Population.Statistics class is only responsible for storing statistics about a population. As each population can contains legal and illegal individials, it holds the individuals with the higher and lower fitness (a deep-cloning is maked to store these individuals so they don't change if the source population does), the average and deviation values both regard legal individuals and illegal ones. Esamples of use are showed below.

 Population.Statistics stat = a_population.getStatistics();
 

returns a new statistics object setted according to the specified population state.

 Population.Statistics stat = new Population.Statistics();
 a_population.updateStatistics(stat);
 

modifies the existing statistics according to the specified population state.


Method Summary
 Individual<T> getIllegalHighestIndividual()
          Returns the highest illegal score individual of this population
 double getIllegalHighestScore()
          Returns the highest illegal score of this population
 Individual<T> getIllegalLowestIndividual()
          Returns the lowest illegal score individual of this population
 double getIllegalLowestScore()
          Returns the lowest illegal score of this population
 double getIllegalScoreAvg()
          Returns the average score of the illegal individual of this population
 double getIllegalScoreDev()
          Returns the deviation score of the illegal individual of this population
 Individual<T> getLegalHighestIndividual()
          Returns the highest legal score individual of this population
 double getLegalHighestScore()
          Returns the highest legal score of this population
 Individual<T> getLegalLowestIndividual()
          Returns the lowest legal score individual of this population
 double getLegalLowestScore()
          Returns the lowest legal score of this population
 double getLegalScoreAvg()
          Returns the average score of the legal individual of this population
 double getLegalScoreDev()
          Returns the deviation score of the legal individual of this population
 int getNumOfIllegalIndividuals()
          Provides the number of illegal individuals in the population
 int getNumOfIndividuals()
          Provides the number of individuals in the population
 int getNumOfLegalIndividuals()
          Returns the number of legal individuals in the population
 void update(Population<T> population)
          Updates all its information about its population
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

update

public final void update(Population<T> population)
Updates all its information about its population

Parameters:
population -

getLegalScoreAvg

public final double getLegalScoreAvg()
Returns the average score of the legal individual of this population

Returns:
the average score of the legal individual of this population

getLegalScoreDev

public final double getLegalScoreDev()
Returns the deviation score of the legal individual of this population

Returns:
the deviation score of the legal individual of this population

getLegalHighestScore

public final double getLegalHighestScore()
Returns the highest legal score of this population

Returns:
the highest legal score of this population

getLegalHighestIndividual

public final Individual<T> getLegalHighestIndividual()
Returns the highest legal score individual of this population

Returns:
the highest legal score individual of this population

getLegalLowestScore

public final double getLegalLowestScore()
Returns the lowest legal score of this population

Returns:
the lowest legal score of this population

getLegalLowestIndividual

public final Individual<T> getLegalLowestIndividual()
Returns the lowest legal score individual of this population

Returns:
the lowest legal score individual of this population

getIllegalScoreAvg

public final double getIllegalScoreAvg()
Returns the average score of the illegal individual of this population

Returns:
the average score of the illegal individual of this population

getIllegalScoreDev

public final double getIllegalScoreDev()
Returns the deviation score of the illegal individual of this population

Returns:
the deviation score of the illegal individual of this population

getIllegalHighestScore

public final double getIllegalHighestScore()
Returns the highest illegal score of this population

Returns:
the highest illegal score of this population

getIllegalHighestIndividual

public final Individual<T> getIllegalHighestIndividual()
Returns the highest illegal score individual of this population

Returns:
the highest illegal score individual of this population

getIllegalLowestScore

public final double getIllegalLowestScore()
Returns the lowest illegal score of this population

Returns:
the lowest illegal score of this population

getIllegalLowestIndividual

public final Individual<T> getIllegalLowestIndividual()
Returns the lowest illegal score individual of this population

Returns:
the lowest illegal score individual of this population

getNumOfIndividuals

public final int getNumOfIndividuals()
Provides the number of individuals in the population

Returns:
the number of individuals

getNumOfLegalIndividuals

public final int getNumOfLegalIndividuals()
Returns the number of legal individuals in the population

Returns:
the numer of legal individuals

getNumOfIllegalIndividuals

public final int getNumOfIllegalIndividuals()
Provides the number of illegal individuals in the population

Returns:
the number of illegal individuals