|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUtil.Statistics.StatCatcher
public class StatCatcher
Stores statistics from the population;
Field Summary | |
---|---|
protected java.util.ArrayList<java.util.ArrayList<java.lang.Double>> |
allFitness
|
protected java.util.ArrayList<java.lang.Double> |
aveLength
|
protected java.util.ArrayList<java.lang.Double> |
bestFitness
|
protected java.util.ArrayList<Individual> |
bestIndividualOfGeneration
|
protected java.util.ArrayList<java.lang.Integer> |
invalids
|
protected java.util.ArrayList<java.lang.Integer> |
maxLength
|
protected java.util.ArrayList<java.lang.Double> |
meanDerivationTreeDepth
|
protected java.util.ArrayList<java.lang.Double> |
meanFitness
|
protected java.util.ArrayList<java.lang.Double> |
meanUsedGenes
|
protected java.util.ArrayList<java.lang.Integer> |
minLength
|
protected java.util.ArrayList<java.lang.Long> |
time
|
protected java.util.ArrayList<java.lang.Double> |
varFitness
|
protected java.util.ArrayList<java.lang.Double> |
varLength
|
Constructor Summary | |
---|---|
StatCatcher()
Creates a new instance of StatCatcher |
|
StatCatcher(int gen)
New instance |
Method Summary | |
---|---|
void |
addLength(java.util.ArrayList<java.lang.Integer> popLength)
Add length data |
void |
addMeanDerivationTreeDepth(Fitness[] mG)
Add mean depth of the derivation trees in the population |
void |
addMeanUsedGenes(Fitness[] mG)
Add mean used genes |
void |
addStats(Fitness[] popFitness)
Add stats. |
void |
addStatsPop(java.util.ArrayList<Individual> population)
Add population to the statcatcher to work with. |
void |
addTime(java.lang.Long t)
Add time |
void |
clear()
Clear the structures in the class |
java.util.ArrayList<java.util.ArrayList<java.lang.Double>> |
getAllFitness()
Get all fitness stored |
java.util.ArrayList<java.lang.Double> |
getAveLength()
Get the average length |
java.util.ArrayList<java.lang.Double> |
getBestFitness()
Get best fitness |
Individual |
getBestIndividualOfGeneration()
Get best individual of generation |
java.util.ArrayList<Individual> |
getBestIndividualOfGenerations()
Get best individuals of all generations |
double |
getCurrentBestFitness()
Get the best fitness for the latest generation |
double |
getCurrentMean()
Get mean for the latest generation |
double |
getCurrentMeanUsedGenes()
Get the mean used genes for the latest generation |
java.util.ArrayList<java.lang.Integer> |
getInvalids()
Get number of invalid individuals |
java.util.ArrayList<java.lang.Integer> |
getMaxLength()
Get max length |
java.util.ArrayList<java.lang.Double> |
getMeanDerivationTreeDepth()
Get the mean max depth of the derivation trees in the population |
java.util.ArrayList<java.lang.Double> |
getMeanFitness()
Get mean fitness of the population |
java.util.ArrayList<java.lang.Double> |
getMeanUsedGenes()
Get mean used genes |
java.util.ArrayList<java.lang.Integer> |
getMinLength()
Get min length |
java.util.ArrayList<java.lang.Long> |
getTime()
Get the time for execution of a generation |
java.util.ArrayList<java.lang.Double> |
getVarFitness()
Get variance of the fitness in the population |
java.util.ArrayList<java.lang.Double> |
getVarLength()
Get variance of the lengths in the population |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<java.lang.Double> meanFitness
protected java.util.ArrayList<java.lang.Double> bestFitness
protected java.util.ArrayList<java.lang.Double> varFitness
protected java.util.ArrayList<java.lang.Integer> minLength
protected java.util.ArrayList<java.lang.Integer> maxLength
protected java.util.ArrayList<java.lang.Double> aveLength
protected java.util.ArrayList<java.lang.Double> varLength
protected java.util.ArrayList<java.lang.Double> meanUsedGenes
protected java.util.ArrayList<java.lang.Double> meanDerivationTreeDepth
protected java.util.ArrayList<java.lang.Long> time
protected java.util.ArrayList<java.lang.Integer> invalids
protected java.util.ArrayList<java.util.ArrayList<java.lang.Double>> allFitness
protected java.util.ArrayList<Individual> bestIndividualOfGeneration
Constructor Detail |
---|
public StatCatcher()
public StatCatcher(int gen)
gen
- number of generationsMethod Detail |
---|
public void clear()
public void addTime(java.lang.Long t)
t
- timepublic void addStats(Fitness[] popFitness)
popFitness
- fitness of the populationpublic void addLength(java.util.ArrayList<java.lang.Integer> popLength)
popLength
- population lengthpublic void addMeanDerivationTreeDepth(Fitness[] mG)
mG
- fitnesspublic void addMeanUsedGenes(Fitness[] mG)
mG
- fitnesspublic void addStatsPop(java.util.ArrayList<Individual> population)
population
- incoming populationpublic Individual getBestIndividualOfGeneration()
public java.util.ArrayList<Individual> getBestIndividualOfGenerations()
public java.util.ArrayList<java.lang.Double> getMeanDerivationTreeDepth()
public java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getAllFitness()
public java.util.ArrayList<java.lang.Double> getMeanUsedGenes()
public double getCurrentMeanUsedGenes()
public double getCurrentMean()
public java.util.ArrayList<java.lang.Integer> getInvalids()
public double getCurrentBestFitness()
public java.util.ArrayList<java.lang.Double> getBestFitness()
public java.util.ArrayList<java.lang.Double> getVarFitness()
public java.util.ArrayList<java.lang.Double> getMeanFitness()
public java.util.ArrayList<java.lang.Double> getAveLength()
public java.util.ArrayList<java.lang.Integer> getMaxLength()
public java.util.ArrayList<java.lang.Integer> getMinLength()
public java.util.ArrayList<java.lang.Double> getVarLength()
public java.util.ArrayList<java.lang.Long> getTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |