Class SimulatedSpeciesAbundancesHandler¶
- Defined in File SimulatedSpeciesAbundancesHandler.h
Inheritance Relationships¶
Base Type¶
public necsim::SpeciesAbundancesHandler(Class SpeciesAbundancesHandler)
Class Documentation¶
-
class
SimulatedSpeciesAbundancesHandler: public virtual necsim::SpeciesAbundancesHandler¶ Generates species identities from a set of species abundances.
Public Functions
-
SimulatedSpeciesAbundancesHandler()¶ Default constructor.
-
~SimulatedSpeciesAbundancesHandler()¶ Default destructor.
-
unsigned long
getRandomSpeciesID()¶ Gets a randomly generated species identity.
- Return
- the species identity
Sets the abundance list.
- Parameters
abundance_list_in: map of species ids to abundances
Sets the abundance list.
- Parameters
abundance_list_in: vector of species abundances
Generates the species abundance hash tables for efficiently storing the species identities.
- Parameters
abundance_list: vector of species abundances
Generates the cumulative abundances, rescaled from 0-1, for randomly choosing an abundance using binary search.
- Parameters
abundance_list: vector of species abundances
-
unsigned long
getRandomAbundanceOfIndividual()¶ Gets a random species abundance.
- Return
- the randomly generated abundance
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
Protected Attributes
-
map<unsigned long, vector<unsigned long>>
species_abundances¶
-
map<unsigned long, unsigned long>
species_richness_per_abundance¶
-
shared_ptr<map<unsigned long, unsigned long>>
cumulative_abundance_map¶
-
double
total_species_number¶
-
unsigned long
number_of_individuals¶
-
shared_ptr<RNGController>
random
-
unsigned long
max_species_id
-
unsigned long
metacommunity_size
-
unsigned long
local_community_size
-
long double
speciation_rate
-