Class AnalyticalSpeciesAbundancesHandler¶
- Defined in File AnalyticalSpeciesAbundancesHandler.h
Inheritance Relationships¶
Base Type¶
public necsim::SpeciesAbundancesHandler
(Class SpeciesAbundancesHandler)
Class Documentation¶
-
class
AnalyticalSpeciesAbundancesHandler
: public virtual necsim::SpeciesAbundancesHandler¶ Public Functions
-
AnalyticalSpeciesAbundancesHandler
()¶ Default constructor.
-
~AnalyticalSpeciesAbundancesHandler
()¶ Default destructor.
Creates the SpeciesAbundancesHandler object.
- Parameters
random
: the random number generatormetacommunity_size
: the number of individuals in the metacommunityspeciation_rate
: the speciation rate of the metacommunitylocal_community_size
: the number of individuals in the local community
-
void
generateSpeciesAbundances
()¶ Generates the species abundances using the analytical approximation.
-
unsigned long
getRandomSpeciesID
()¶ Gets a randomly generated species identity.
- Return
- the species identity
-
unsigned long
pickPreviousIndividual
(const unsigned long &individual_id)¶ Picks out a random individual from previously-seen individuals.
- Return
- species id of the individual
- Parameters
individual_id
: the individual id number to pick
-
void
addNewSpecies
()¶ Picks out a new individual/species id with a random species abundance.
- Return
- the species id of the new individual
-
unsigned long
getRandomAbundanceOfSpecies
()¶ Gets a random species abundance by sampling from the logarithmic distribution.
- Note
- this produces the abundance of any given species, not the abundance of any given individual
- Return
- the randomly generated abundance of a species
Sets the abundance list.
- Parameters
abundance_list_in
: list of abundances for each species
Sets the abundance list.
- Parameters
abundance_list_in
: list of abundances for each species
-