5 #ifndef BPP_PHYL_SIMULATION_SIMPLESUBSTITUTIONPROCESSSITESIMULATOR_H
6 #define BPP_PHYL_SIMULATION_SIMPLESUBSTITUTIONPROCESSSITESIMULATOR_H
12 #include "../Likelihood/ParametrizablePhyloTree.h"
13 #include "../Model/SubstitutionModel.h"
23 #include "../Likelihood/SubstitutionProcess.h"
38 std::vector<std::shared_ptr<SimProcessNode>>
sons_;
73 std::shared_ptr<const SubstitutionProcessInterface>
process_;
74 std::shared_ptr<const ParametrizablePhyloTree>
phyloTree_;
126 std::shared_ptr<const SubstitutionProcessInterface> process);
187 std::unique_ptr<Site>
simulateSite(
size_t rateClass)
const override;
189 std::unique_ptr<Site>
simulateSite(
double rate)
const override;
191 std::unique_ptr<Site>
simulateSite(
size_t ancestralStateIndex,
double rate)
const override;
205 std::shared_ptr<const Alphabet>
getAlphabet()
const override {
return process_->stateMap().getAlphabet(); }
216 std::unique_ptr<SiteSimulationResult>
dSimulateSite()
const override;
218 std::unique_ptr<SiteSimulationResult>
dSimulateSite(
size_t rateClass)
const override;
220 std::unique_ptr<SiteSimulationResult>
dSimulateSite(
double rate)
const override;
222 std::unique_ptr<SiteSimulationResult>
dSimulateSite(
size_t ancestralStateIndex,
double rate)
const override;
241 std::shared_ptr<const ParametrizablePhyloTree>
getTree()
const
278 std::shared_ptr<SimProcessNode> node,
285 std::shared_ptr<SimProcessNode> node,
This interface adds the dSimulate method to the SiteSimulator interface.
Site simulation under a unique substitution process, given data.
Tree Organization of Computing Nodes.
SimProcessEdge(const ProcessComputationEdge &pce)
std::vector< std::shared_ptr< SimProcessNode > > sons_
SimProcessNode(const ProcessComputationNode &pcn)
Site simulation under a unique substitution process.
std::shared_ptr< const ParametrizablePhyloTree > phyloTree_
std::shared_ptr< const SubstitutionProcessInterface > process_
void evolveInternal(std::shared_ptr< SimProcessNode > node, size_t rateClass, SiteSimulationResult *ssr=nullptr) const
SPTree tree_
To store states & transition probabilities of the simulator.
SimpleSubstitutionProcessSiteSimulator(std::shared_ptr< const SubstitutionProcessInterface > process)
std::unique_ptr< Site > simulateSite() const override
bool outputInternalSites_
const Alphabet & alphabet() const override
SimpleSubstitutionProcessSiteSimulator & operator=(const SimpleSubstitutionProcessSiteSimulator &nhss)
std::map< size_t, std::shared_ptr< SimProcessNode > > speciesNodes_
Map between species Indexes & used nodes, may change at each simulation.
virtual void init()
Init all probabilities.
std::vector< size_t > seqIndexes_
Vector of indexes of sequenced output species.
std::shared_ptr< const ParametrizablePhyloTree > getTree() const
Get the tree associated to this instance.
void outputInternalSites(bool yn) override
Sets whether we will output the internal sequences or not.
virtual ~SimpleSubstitutionProcessSiteSimulator()
std::vector< std::string > seqNames_
Vector of names of sequenced output species.
void enableContinuousRates(bool yn)
Enable the use of continuous rates instead of discrete rates.
std::shared_ptr< const Alphabet > getAlphabet() const override
SimpleSubstitutionProcessSiteSimulator(const SimpleSubstitutionProcessSiteSimulator &nhss)
std::shared_ptr< const SubstitutionProcessInterface > getSubstitutionProcess() const
Get the substitution process associated to this instance.
std::unique_ptr< SiteSimulationResult > dSimulateSite() const override
Get a detailed simulation result for one site.
std::vector< std::string > getSequenceNames() const override
Vdouble qRates_
cumsum probas of the substitution rates
SimpleSubstitutionProcessSiteSimulator * clone() const override
Data structure to store the result of a DetailedSiteSimulator.
Defines the basic types of data flow nodes.
std::vector< double > Vdouble
std::vector< VVdouble > VVVdouble
std::vector< Vdouble > VVdouble
AssociationTreeGlobalGraphObserver< SimProcessNode, SimProcessEdge > SPTree