com.rubecula.darwin.domain.helper
Interface Population

All Superinterfaces:
Censusible, Countable, Generational, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString, PopulationExposed, Terminal, Theological
All Known Implementing Classes:
Population_, Population_Malthusian, Population_Managed, Population_TS

public interface Population
extends net.sf.tostring0.Identifiable, Generational, net.sf.tostring0.IToString, Censusible, PopulationExposed, Theological, Terminal

Defines the properties (methods) which characterize a population in an Evolutionary Computation. Briefly, a population consists of a collection of instances of Organism, and which is subject to an Environment . A population forms part of a Taxon, which in turn provides definitions for the genetic and physical aspects of the organisms. Thus a population is inter-breeding.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Method Summary
 int addColony(Colony colony)
          Add a colony to this population.
 java.util.Collection<Colony> getColonies()
           
 Colony getColony(int index)
          TODO consider using the id of the colony instead of the index.
 int getSequence()
           
 Taxon getTaxon()
          Method to get the Taxon to which this population belongs.
 int getTotal()
           
 void setIndex(int index)
          Set the index of this population within its parent Taxon System.
 void setTaxon(Taxon system)
          Set the system to which this population belongs.
 void wrapUp(java.lang.String cause)
          Method which is called on this Population when the evolution is finished.
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 
Methods inherited from interface com.rubecula.darwin.foundation.Generational
nextGeneration
 
Methods inherited from interface net.sf.tostring0.IToString
toString, toStringBrief, toStringId
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Censusible
censusMe, getCensusibleChildren
 
Methods inherited from interface com.rubecula.darwin.foundation.Countable
getCount
 
Methods inherited from interface com.rubecula.darwin.foundation.Theological
cullMembers, seedMembers
 
Methods inherited from interface com.rubecula.darwin.foundation.Terminal
isFinished
 

Method Detail

addColony

int addColony(Colony colony)
Add a colony to this population.

Parameters:
colony -
Returns:
result of calling

getColonies

java.util.Collection<Colony> getColonies()
Returns:
the colonies

getColony

Colony getColony(int index)
TODO consider using the id of the colony instead of the index.

Parameters:
index -
Returns:
the indexth colony from the list
See Also:
com.rubecula.darwin.domain.helper.Taxon#getPopulation(int)

getSequence

int getSequence()
Returns:
the sequence

getTaxon

Taxon getTaxon()
Method to get the Taxon to which this population belongs.

Returns:
this population's Taxon system.

getTotal

int getTotal()
Returns:
the total number of organisms in all colonies of this population

setIndex

void setIndex(int index)
Set the index of this population within its parent Taxon System. TODO consider removing this and always use List.indexOf(Object).

Parameters:
index -

setTaxon

void setTaxon(Taxon system)
Set the system to which this population belongs. This is normally set when the population is added to the system.

Parameters:
system -

wrapUp

void wrapUp(java.lang.String cause)
Method which is called on this Population when the evolution is finished.

Parameters:
cause - XXX


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.