coreEngine.Calibration

## Class StatisticsHelper

- java.lang.Object
- - coreEngine.Calibration.StatisticsHelper

-     public class StatisticsHelper
      extends java.lang.Object

  Author:
    jltrask

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.ArrayList<java.lang.Float>` | `avgFitness` Array of the average fitness value of each generation.
    `protected java.util.ArrayList<float[]>` | `generationDiversity`
    `protected java.util.ArrayList<float[]>` | `generationFitness` ArrayList of fitness values for each generation.
    `protected java.util.ArrayList<java.lang.Float>` | `generationFitnessDiversity`
    `protected boolean` | `hasResults`
    `protected int` | `popSize` Population size of each generation.
    `protected int` | `rngSeed` Random number generator seed to help recreate runs.
    `protected java.util.ArrayList<java.lang.Float>` | `topBestFitness` ArrayList of the best fitness value of each generation.
    `protected java.util.ArrayList<Result>` | `topOrgs` ArrayList of the best n organisms found in the algorithm run.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatisticsHelper(int popSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFitnessVal(int genIdx, int orgIdx, float fitVal)`
    `void` | `addGenerationAverageFitness(float avgGenFitness)`
    `void` | `addGenerationDiversityArray(float[] diversity)`
    `void` | `addGenerationFitnessDiversity(float div)`
    `float` | `getAverageFitness(int generationIdx)`
    `java.util.ArrayList<java.lang.Float>` | `getAverageFitnessArray()`
    `float` | `getAverageGenerationFitnessDiversity(int generationIdx)`
    `float` | `getAverageGenerationSolutionDiversity(int generationIdx)` Deprecated. @param generationIdx
    `float` | `getBestFitness(int generationIdx)`
    `float[]` | `getBestFitnessArray()`
    `float[]` | `getGenerationFitnessArray(int genIdx, boolean sort)`
    `int` | `getNumGenerations()`
    `int` | `getNumPeriods()`
    `int` | `getNumSegments()`
    `java.util.ArrayList<Result>` | `getTopOrganismsList()`
    `boolean` | `hasResults()`
    `void` | `setGenerationBestFitness(int genIdx, float fitVal)`
    `void` | `setHasResults(boolean hasResults)`
    `void` | `setRNGSeed(int rngSeed)`
    `void` | `setTopOrganismsList(java.util.ArrayList<Result> topOrgs)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### popSize

          protected final int popSize

      Population size of each generation.

    - #### generationFitness

          protected final java.util.ArrayList<float[]> generationFitness

      ArrayList of fitness values for each generation.

    - #### topBestFitness

          protected final java.util.ArrayList<java.lang.Float> topBestFitness

      ArrayList of the best fitness value of each generation.

    - #### avgFitness

          protected final java.util.ArrayList<java.lang.Float> avgFitness

      Array of the average fitness value of each generation.

    - #### rngSeed

          protected int rngSeed

      Random number generator seed to help recreate runs.

    - #### topOrgs

          protected java.util.ArrayList<Result> topOrgs

      ArrayList of the best n organisms found in the algorithm run.

    - #### generationDiversity

          protected final java.util.ArrayList<float[]> generationDiversity

    - #### generationFitnessDiversity

          protected final java.util.ArrayList<java.lang.Float> generationFitnessDiversity

    - #### hasResults

          protected boolean hasResults

  - ### Constructor Detail

    - #### StatisticsHelper

          public StatisticsHelper(int popSize)

  - ### Method Detail

    - #### setRNGSeed

          public void setRNGSeed(int rngSeed)

    - #### addFitnessVal

          public void addFitnessVal(int genIdx,
                                    int orgIdx,
                                    float fitVal)

    - #### setGenerationBestFitness

          public void setGenerationBestFitness(int genIdx,
                                               float fitVal)

    - #### getNumGenerations

          public int getNumGenerations()

    - #### getNumPeriods

          public int getNumPeriods()

    - #### getNumSegments

          public int getNumSegments()

    - #### getAverageFitnessArray

          public java.util.ArrayList<java.lang.Float> getAverageFitnessArray()

    - #### getAverageFitness

          public float getAverageFitness(int generationIdx)

    - #### getBestFitnessArray

          public float[] getBestFitnessArray()

    - #### getBestFitness

          public float getBestFitness(int generationIdx)

    - #### getGenerationFitnessArray

          public float[] getGenerationFitnessArray(int genIdx,
                                                   boolean sort)

    - #### setTopOrganismsList

          public void setTopOrganismsList(java.util.ArrayList<Result> topOrgs)

    - #### getTopOrganismsList

          public java.util.ArrayList<Result> getTopOrganismsList()

    - #### addGenerationAverageFitness

          public void addGenerationAverageFitness(float avgGenFitness)

    - #### addGenerationDiversityArray

          public void addGenerationDiversityArray(float[] diversity)

    - #### addGenerationFitnessDiversity

          public void addGenerationFitnessDiversity(float div)

    - #### getAverageGenerationSolutionDiversity

          public float getAverageGenerationSolutionDiversity(int generationIdx)

      Deprecated. @param generationIdx
      Returns:

    - #### getAverageGenerationFitnessDiversity

          public float getAverageGenerationFitnessDiversity(int generationIdx)

    - #### setHasResults

          public void setHasResults(boolean hasResults)

    - #### hasResults

          public boolean hasResults()