Class SpecSimParameters

Class Documentation

class SpecSimParameters

Contains the simulation parameters that are read from the command line.

Public Functions

SpecSimParameters()
SpecSimParameters(const string &fragment_config_file)
void addSpeciationRate(const double &speciation_rate)

Adds a speciation rate to the speciation parameters list.

Parameters
  • speciation_rate: the speciation rate to add

void setup(string file_in, bool use_spatial_in, string sample_file, const string &use_fragments_in)

Sets the application arguments for the inputs.

Parameters
  • file_in: the database to apply speciation rates to
  • use_spatial_in: if true, record full spatial data
  • sample_file: the sample file to select lineages from the map
  • use_fragments_in: fragment file, or “T”/”F” for automatic detection/no detection

void setup(string file_in, bool use_spatial_in, string sample_file, const vector<double> &times, const string &use_fragments_in, vector<double> speciation_rates)

Sets the application arguments for the inputs.

Parameters
  • file_in: the database to apply speciation rates to
  • use_spatial_in: if true, record full spatial data
  • sample_file: the sample file to select lineages from the map
  • times: vector of times to apply
  • use_fragments_in: fragment file, or “T”/”F” for automatic detection/no detection
  • speciation_rates: the speciation rates to apply

void setup(string file_in, bool use_spatial_in, string sample_file, const vector<double> &times, const string &use_fragments_in)

Sets the application arguments for the inputs. Overloaded version without speciation rates.

Parameters
  • file_in: the database to apply speciation rates to
  • use_spatial_in: if true, record full spatial data
  • sample_file: the sample file to select lineages from the map
  • times: vector of times to apply
  • use_fragments_in: fragment file, or “T”/”F” for automatic detection/no detection

void addMetacommunityParameters(const unsigned long &metacommunity_size_in, const double &metacommunity_speciation_rate_in, const string &metacommunity_option_in, const unsigned long &metacommunity_reference_in)

Sets the metacommunity parameters for the simulation.

Parameters
  • metacommunity_size_in: the number of individuals in the metacommunity
  • metacommunity_speciation_rate_in: the speciation rate for the metacommunity

void importTimeConfig()

Import the time config file, if there is one.

void wipe()

Deletes all the parameters.

void addTime(double time)

Adds an additional time to the times vector.

Parameters
  • time: a time to calculate speciation rates at

void addProtractedParameters(double proc_spec_min, double proc_spec_max)

Adds a set of protracted speciation parameters to the protracted parameters vector.

Parameters
  • proc_spec_min: the minimum protracted speciation generation
  • proc_spec_max: the maximum protracted speciation generation

Public Members

bool use_spatial
bool bMultiRun
bool use_fragments
string filename
set<double> all_speciation_rates
string samplemask
string times_file
set<double> all_times
string fragment_config_file
vector<ProtractedSpeciationParameters> protracted_parameters
MetacommunitiesArray metacommunity_parameters