JEvolutionReporter (JEvolution)
Date: 2013-03-21

evSOLve.JEvolution

## Class JEvolutionReporter

- java.lang.Object
- - evSOLve.JEvolution.JEvolutionReporter

-     public class JEvolutionReporter
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BRIEF` Information on each generation.
    `static int` | `MINIMAL` Global run information.
    `static int` | `QUIET` No output from JevolutionStats.
    `static int` | `VERBOSE` Report on each Individual.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Individual` | `getBestIndividual()` Gives the best Individual of the last run.
    `int` | `getIndividualsDone()` Access the current number of fitness calculations performed.
    `int` | `getReportLevel()` Access report level.
    `SubPopulation` | `getStarPool()` Returns star pool.
    `boolean` | `isFitnessRepositoryUsed()` Access status of the use of fitness repository.
    `void` | `setPrintWriter(java.io.PrintWriter printWriter)` Define the output sink for reports.
    `void` | `setReportLevel(int reportLevel)` Change report level.
    `void` | `setStarPool(boolean peaks)` Creates star pool with specific modes.
    `void` | `useFitnessRepository(boolean on)` Switch the use of fitness repository on/off.

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

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

- - ### Field Detail

    - #### QUIET

          public static final int QUIET

      No output from JevolutionStats.
      See Also:
        Constant Field Values

    - #### MINIMAL

          public static final int MINIMAL

      Global run information.
      See Also:
        Constant Field Values

    - #### BRIEF

          public static final int BRIEF

      Information on each generation.
      See Also:
        Constant Field Values

    - #### VERBOSE

          public static final int VERBOSE

      Report on each Individual.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getStarPool

          public SubPopulation getStarPool()

      Returns star pool.
      Returns:
        starPool a population with interesting solutions
      See Also:
        `setStarPool(boolean)`

    - #### setStarPool

          public void setStarPool(boolean peaks)
                           throws JEvolutionException

      Creates star pool with specific modes. The modes indicate which solutions should be stored. Only supported mode now is `peaks', where each newly found best solution is added to the pool.
      Parameters:
        `peaks` - store peak Individuals (if false, no pool)
      Throws:
        `JEvolutionException`

    - #### getReportLevel

          public int getReportLevel()

      Access report level.
      Returns:
        reportLevel The amount of information reported.

    - #### setReportLevel

          public void setReportLevel(int reportLevel)
                              throws JEvolutionException

      Change report level.
      Parameters:
        `reportLevel` - The amount of information reported.
      Throws:
        `JEvolutionException` - Invalid level.

    - #### isFitnessRepositoryUsed

          public boolean isFitnessRepositoryUsed()

      Access status of the use of fitness repository.
      Returns:
        useFitnessRepository It is used or it is not used.

    - #### useFitnessRepository

          public void useFitnessRepository(boolean on)

      Switch the use of fitness repository on/off. Create a Repository, if there is none.
      Parameters:
        `on` - Turns it on/off.

    - #### getIndividualsDone

          public int getIndividualsDone()

      Access the current number of fitness calculations performed.
      Returns:
        individualsDone The number of individuals evaluated.

    - #### getBestIndividual

          public Individual getBestIndividual()

      Gives the best Individual of the last run.
      Returns:
        bestIndividual Individual with best fitness

    - #### setPrintWriter

          public void setPrintWriter(java.io.PrintWriter printWriter)

      Define the output sink for reports. You may set it to 'null' to supress any output, but setting the report level to QUIET is the preferred method. For safe operation be sure to set the auto-flush flag of the PrintWriter, as long evolution runs (with detailed output, e.g., VERBOSE) may cause a large buffer space allocated by the PrintWriter.
      Parameters:
        `printWriter` - prints results to attached device
      See Also:
        `setReportLevel(int)`