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.stats
Interface RunStatListener

All Known Implementing Classes:
  CubicRegression, Even4Parity, Even5Parity, Even7Parity, GPAbstractModel, Majority5, Majority9, Multiplexer11Bit, Multiplexer20Bit, Multiplexer37Bit, Multiplexer6Bit, QuarticRegression, SantaFeTrail

    public interface RunStatListener

RunStatsListener uses the listener pattern to provide a flexible way of accessing statistics about each run. Models which require statistics about runs at the end of each run would typically implement this interface. GPAbstractModel already provides an implementation. There are 2 steps to using this interface to gain access to run statistics.

- Implement getRunStatFields() to return an array of the RunStatFields required, in the order desired.
- Implement runStats(Object[]) which will receive these statistics in that order to use them however required - print to screen, file, etc.

Method Summary
`RunStatField[]` | `getRunStatFields()` The implementing class must return an array of fields which the listening objects are interested in listening to.
`void` | `runStats(int run, java.lang.Object[] stats)` This method will be called after every run completes with an array containing the statistics requested with getRunStatFields().

Method Detail

### getRunStatFields

    RunStatField[] getRunStatFields()

  The implementing class must return an array of fields which the listening objects are interested in listening to. The values for each of the fields this method returns will be given as part of the stats array passed to the runStats(Object[]) array.

  Returns:
    An array of RunStatFields that this listener wants to listen for which will be passed to the runStats array after each run is completed.

### runStats

    void runStats(int run,
                  java.lang.Object[] stats)

  This method will be called after every run completes with an array containing the statistics requested with getRunStatFields().

  Parameters:
    `run` - The run number that the given statistics are from.
    `stats` - An array of statistics relating to the last run completed. The order of the array will match the order that the fields were requested in the return of getRunStatFields() method. The array is of type Object[] but the dynamic type of each element will vary depending on the field. For information of types view the comments on the stats fields.

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