Program Listing for File Metacommunity.h¶
↰ Return to documentation for file (necsim/Metacommunity.h
)
// This file is part of necsim project which is released under MIT license.
// See file **LICENSE.txt** or visit https://opensource.org/licenses/MIT) for full license details.
#ifndef SPECIATIONCOUNTER_METACOMMUNITY_H
#define SPECIATIONCOUNTER_METACOMMUNITY_H
#include <string>
#include <sqlite3.h>
#include <set>
#include <memory>
#include "Community.h"
#include "Tree.h"
#include "RNGController.h"
#include "SpecSimParameters.h"
#include "SpeciesAbundancesHandler.h"
using namespace std;
namespace necsim
{
class Metacommunity : public virtual Community
{
protected:
// Simulation seed and job_type (read from the output database or set to 1)
unsigned long seed;
unsigned long job_type;
bool parameters_checked;
unique_ptr<SpeciesAbundancesHandler> species_abundances_handler;
shared_ptr<RNGController> random;
unique_ptr<Tree> metacommunity_tree;
public:
Metacommunity();
~Metacommunity() override = default;
void setCommunityParameters(shared_ptr<MetacommunityParameters> metacommunity_parameters);
void checkSimulationParameters();
void addSpecies(unsigned long &species_count, TreeNode* tree_node, set<unsigned long> &species_list) override;
void createMetacommunityNSENeutralModel();
void applyNoOutput(shared_ptr<SpecSimParameters> sp, shared_ptr<vector<TreeNode>> tree_data) override;
void approximateSAD();
void readSAD();
void printMetacommunityParameters();
};
}
#endif //SPECIATIONCOUNTER_METACOMMUNITY_H