Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.epochx.core
Class GPRun<TYPE>

    java.lang.Object
      com.epochx.core.GPRun<TYPE>

    public class GPRun<TYPE>

extends java.lang.Object

A GPRun object has 2 responsibilities. Firstly, to execute a GP run based upon the control parameters provided. Secondly, after executing to provide basic details of how that run went.

Objects of this class should be immutable - however the underlying objects, in particular GPModel may not be.

Method Summary
`double` | `getBestFitness()` Retrieve the fitness score of the CandidateProgram returned by getBestProgram().
`CandidateProgram<TYPE>` | `getBestProgram()` Retrieve the CandidateProgram with the best fitness found during the run.
`long` | `getRunTime()` Retrieve the time in nano-seconds of the run.
`static
`<TYPE> GPRun<TYPE>`
` | `run(GPModel<TYPE> model)` Construct a new GPRun object and execute it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### run

    public static <TYPE> GPRun<TYPE> run(GPModel<TYPE> model)

  Construct a new GPRun object and execute it. The GPModel passed in is used to provide the control parameters for the run.

  Type Parameters:
    `TYPE` - the type of `CandidateProgram` to be evolved.
  Parameters:
    `model` - the model which will control the run with the parameters and fitness function to use.
  Returns:
    The GPRun object that was executed, containing retrievable details about the run.
  See Also:
    `GPModel`

### getBestProgram

    public CandidateProgram<TYPE> getBestProgram()

  Retrieve the CandidateProgram with the best fitness found during the run. This CandidateProgram may have been found in any of the generations.

  Returns:
    the CandidateProgram with the best fitness score found.

### getBestFitness

    public double getBestFitness()

  Retrieve the fitness score of the CandidateProgram returned by getBestProgram(). A lower fitness score is considered better than a higher fitness score.

  Returns:
    the fitness score of the best CandidateProgram found during execution.

### getRunTime

    public long getRunTime()

  Retrieve the time in nano-seconds of the run. This will be either the length of the whole run if it's finished or the time up until now if the run is not finished.

  Returns:
    The run time in nano-seconds.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD