Struct CommunityParameters

Struct Documentation

struct CommunityParameters

A struct for containing pairs of previous calculations to make sure that aren’t repeated.

Public Functions

CommunityParameters()

Default constructor.

~CommunityParameters()

Trivial destructor.

CommunityParameters(unsigned long reference_in, long double speciation_rate_in, long double time_in, bool fragment_in, unsigned long metacommunity_reference_in, const ProtractedSpeciationParameters &protracted_params)

Constructor for CommunityParameters, for storing a pairs of previous calculations, requiring a speciation rate and a time. Overloaded version with setup routines.

Parameters
  • reference_in: the reference to set for this CommunityParameters set
  • speciation_rate_in: the speciation rate of the previous calculation
  • time_in: the time of the previous calculation
  • fragment_in: bool of whether fragments were used in the previous calculation
  • metacommunity_reference_in: the metacommunity reference, or 0 for no metacommunity
  • protracted_params: protracted speciation parameters to add

void setup(unsigned long reference_in, long double speciation_rate_in, long double time_in, bool fragment_in, unsigned long metacommunity_reference_in, const ProtractedSpeciationParameters &protracted_params)

Sets up the CommunityParameters object.

Parameters
  • reference_in: the reference to set for this CommunityParameters set
  • speciation_rate_in: the speciation rate of the previous calculation
  • time_in: the time of the previous calculation
  • fragment_in: bool of whether fragments were used in the previous calculation
  • metacommunity_reference_in: the metacommunity reference, or 0 for no metacommunity
  • protracted_params: protracted speciation parameters to add

bool compare(long double speciation_rate_in, long double time_in, bool fragment_in, unsigned long metacommunity_reference_in, const ProtractedSpeciationParameters &protracted_params)

Compare these set of parameters with the input set. If they match, return true, otherwise return false.

Return
Parameters
  • speciation_rate_in: speciation rate to compare with stored community parameter
  • time_in: time to compare with stored community parameter
  • fragment_in: if fragments are being used on this database
  • metacommunity_reference_in: metacommunity reference to compare with stored community parameter
  • protracted_params: the minimum number of generations required for existance before speciation
  • protracted_params: protracted speciation parameters to add

bool compare(long double speciation_rate_in, long double time_in, unsigned long metacommunity_reference_in, const ProtractedSpeciationParameters &protracted_params)

Compare these set of parameters with the input set. If they match, return true, otherwise return false Overloaded version ignoring the fragments parameter.

Return
Parameters
  • speciation_rate_in: speciation rate to compare with stored community parameter
  • time_in: time to compare with stored community parameter
  • metacommunity_reference_in: metacommunity reference to compare with stored community parameter
  • protracted_params: protracted speciation parameters to add

bool compare(unsigned long reference_in)

Checks if the supplied reference is the same in the community parameter.

Return
Parameters
  • reference_in:

Public Members

unsigned long reference
long double speciation_rate
long double time
bool fragment
unsigned long metacommunity_reference
ProtractedSpeciationParameters protracted_parameters

The protracted speciation parameters for this object.

bool updated