com.rubecula.darwin.core
Interface Generatable

All Known Subinterfaces:
Darwinian, Population
All Known Implementing Classes:
Darwinian_Abstract, Darwinian_Default, Population_Abstract, Population_Default, Population_TS

public interface Generatable

Ddefines the mechanism by which the next generation of, for example, a population is created.

Version:
$Revision: 1.2 $
Author:
Robin Hillyard

Method Summary
 int getGeneration()
           
 void midGenerationProcessing()
          A (callback) method which will be invoked at the midpoint of each generation.
 boolean nextGeneration()
          Mutating method to invoke the next generation of a Generatable object.
 void postGenerationCleanup()
          A (callback) method which will be invoked at the termination of each generation.
 void preGenerationPreparation()
          A (callback) method which will be invoked at the start of each generation.
 

Method Detail

getGeneration

int getGeneration()
Returns:
the sequence number of the current generation.

nextGeneration

boolean nextGeneration()
Mutating method to invoke the next generation of a Generatable object.

Returns:
true if the operation was successful.

preGenerationPreparation

void preGenerationPreparation()
A (callback) method which will be invoked at the start of each generation.


midGenerationProcessing

void midGenerationProcessing()
A (callback) method which will be invoked at the midpoint of each generation. That is to say, after dead organisms have been marked, new organisms have been born, but before dead organisms have been removed.


postGenerationCleanup

void postGenerationCleanup()
A (callback) method which will be invoked at the termination of each generation.