Class SpeciesAbundancesHandler

Inheritance Relationships

Derived Types

Class Documentation

class SpeciesAbundancesHandler

Base class for defining species abundances.

Subclassed by necsim::AnalyticalSpeciesAbundancesHandler, necsim::SimulatedSpeciesAbundancesHandler

Public Functions

SpeciesAbundancesHandler()

Default constructor.

virtual ~SpeciesAbundancesHandler()

Default destructor.

void setup(shared_ptr<RNGController> random, const unsigned long &metacommunity_size, const long double &speciation_rate, const unsigned long &local_community_size)

Creates the SpeciesAbundancesHandler object.

Parameters
  • random: the random number generator
  • metacommunity_size: the number of individuals in the metacommunity
  • speciation_rate: the speciation rate of the metacommunity
  • local_community_size: the number of individuals in the local community

virtual unsigned long getRandomSpeciesID() = 0

Gets a randomly generated species identity.

Return
the species identity

void setAbundanceList(const shared_ptr<map<unsigned long, unsigned long>> &abundance_list_in)

Sets the abundance list.

Parameters
  • abundance_list_in: list of abundances for each species

void setAbundanceList(shared_ptr<vector<unsigned long>> abundance_list_in)

Sets the abundance list.

Parameters
  • abundance_list_in: list of abundances for each species

Protected Attributes

shared_ptr<RNGController> random
unsigned long max_species_id
unsigned long metacommunity_size
unsigned long local_community_size
long double speciation_rate