ec
Class Statistics

java.lang.Object
  |
  +--ec.Statistics
Direct Known Subclasses:
SimpleStatistics

public abstract class Statistics
extends java.lang.Object
implements Singleton

Statistics is a singleton which generates statistics during the run. There are lots of places where statistics might be nice to print out. Most of this class's methods aren't abstract, because you don't want to have to implement every possible statistics function, now do you?

Statistics objects should set up their statistics logs etc. during setupStatistics(...). Remember to make the log restartable in case of restarting from a checkpoint.

See Also:
Serialized Form

Constructor Summary
Statistics()
           
 
Method Summary
 void finalStatistics(EvolutionState state, int result)
          Called immediately after the run has completed.
 void postBreedingStatistics(EvolutionState state)
          Called immediately after breeding occurs.
 void postCheckpointStatistics(EvolutionState state)
          Called immediately after checkpointing occurs.
 void postEvaluationStatistics(EvolutionState state)
          Called immediately after evaluation occurs.
 void postInitializationStatistics(EvolutionState state)
          Called immediately after population initialization occurs.
 void postPostBreedingExchangeStatistics(EvolutionState state)
          Called immediately after the post-breeding exchange occurs.
 void postPreBreedingExchangeStatistics(EvolutionState state)
          Called immediately after the pre-breeding exchange occurs.
 void preBreedingStatistics(EvolutionState state)
          Called immediately before breeding occurs.
 void preCheckpointStatistics(EvolutionState state)
          Called immediately before checkpointing occurs.
 void preEvaluationStatistics(EvolutionState state)
          Called immediately before evaluation occurs.
 void preInitializationStatistics(EvolutionState state)
          Called immediately before population initialization occurs.
 void prePostBreedingExchangeStatistics(EvolutionState state)
          Called immediately before the post-breeding exchange occurs.
 void prePreBreedingExchangeStatistics(EvolutionState state)
          Called immediately before the pre-breeding exchange occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statistics

public Statistics()
Method Detail

preInitializationStatistics

public void preInitializationStatistics(EvolutionState state)
Called immediately before population initialization occurs.

postInitializationStatistics

public void postInitializationStatistics(EvolutionState state)
Called immediately after population initialization occurs.

preCheckpointStatistics

public void preCheckpointStatistics(EvolutionState state)
Called immediately before checkpointing occurs.

postCheckpointStatistics

public void postCheckpointStatistics(EvolutionState state)
Called immediately after checkpointing occurs.

preEvaluationStatistics

public void preEvaluationStatistics(EvolutionState state)
Called immediately before evaluation occurs.

postEvaluationStatistics

public void postEvaluationStatistics(EvolutionState state)
Called immediately after evaluation occurs.

prePreBreedingExchangeStatistics

public void prePreBreedingExchangeStatistics(EvolutionState state)
Called immediately before the pre-breeding exchange occurs.

postPreBreedingExchangeStatistics

public void postPreBreedingExchangeStatistics(EvolutionState state)
Called immediately after the pre-breeding exchange occurs.

preBreedingStatistics

public void preBreedingStatistics(EvolutionState state)
Called immediately before breeding occurs.

postBreedingStatistics

public void postBreedingStatistics(EvolutionState state)
Called immediately after breeding occurs.

prePostBreedingExchangeStatistics

public void prePostBreedingExchangeStatistics(EvolutionState state)
Called immediately before the post-breeding exchange occurs.

postPostBreedingExchangeStatistics

public void postPostBreedingExchangeStatistics(EvolutionState state)
Called immediately after the post-breeding exchange occurs.

finalStatistics

public void finalStatistics(EvolutionState state,
                            int result)
Called immediately after the run has completed. result is either state.R_FAILURE, indicating that an ideal individual was not found, or state.R_SUCCESS, indicating that an ideal individual was found.