Package ec.simple
Class SimpleExchanger
java.lang.Object
ec.Exchanger
ec.simple.SimpleExchanger
- All Implemented Interfaces:
Setup,Singleton,SteadyStateExchangerForm,Serializable
A SimpleExchanger is a default Exchanger which, well, doesn't do anything.
Most applications don't need Exchanger facilities; this simple version
will suffice.
The SimpleExchanger implements the SteadyStateExchangerForm, mostly because it does nothing with individuals. For this reason, it is final; implement your own Exchanger if you need to do something more advanced.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseContacts(EvolutionState state, int result) Doesn't do anything.voidinitializeContacts(EvolutionState state) Doesn't do anything.Simply returns state.population.Simply returns state.population.voidDoesn't do anything.runComplete(EvolutionState state) Always returns nullvoidsetup(EvolutionState state, Parameter base) Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
-
Constructor Details
-
SimpleExchanger
public SimpleExchanger()
-
-
Method Details
-
setup
Description copied from interface:SetupSets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else. -
initializeContacts
Doesn't do anything.- Overrides:
initializeContactsin classExchanger
-
reinitializeContacts
Doesn't do anything.- Overrides:
reinitializeContactsin classExchanger
-
preBreedingExchangePopulation
Simply returns state.population.- Specified by:
preBreedingExchangePopulationin classExchanger
-
postBreedingExchangePopulation
Simply returns state.population.- Specified by:
postBreedingExchangePopulationin classExchanger
-
closeContacts
Doesn't do anything.- Overrides:
closeContactsin classExchanger
-
runComplete
Always returns null- Specified by:
runCompletein classExchanger
-