42 #ifndef _DETAILEDSITESIMULATOR_H_ 43 #define _DETAILEDSITESIMULATOR_H_ 47 #include "../TreeTemplate.h" 136 paths_[i].getEventCounts(counts, reg);
149 for (
size_t i = 0; i < n; ++i) {
151 paths_[i].getEventCounts(counts[i], reg);
162 std::vector<size_t> states(n);
163 for (
size_t i = 0; i < n; i++)
175 std::vector<int> astates(mstates.size());
176 for (
size_t i = 0; i < mstates.size(); ++i) {
188 std::vector<std::string> names(n);
189 for (
size_t i = 0; i < n; i++)
256 #endif // _DETAILEDSITESIMULATOR_H_
virtual SiteSimulationResult * dSimulateSite() const =0
Get a detailed simulation result for one site.
Interface for all substitution models.
virtual int getAlphabetStateAsInt(size_t index) const =0
The SiteSimulator interface. SiteSimulator classes can simulate single sites.
std::vector< MutationPath > paths_
virtual Site * getSite(const SubstitutionModel &model) const
This class is used by MutationProcess to store detailed results of simulations.
virtual void addNode(int nodeId, MutationPath path)
virtual size_t getAncestralState(size_t i) const
The SubstitutionRegister interface.
virtual int getRootId() const =0
std::vector< int > leavesId_
const Alphabet * alphabet_
virtual const MutationPath & getMutationPath(size_t i) const
virtual ~SiteSimulationResult()
This interface adds the dSimulate method to the SiteSimulator interface.
Interface for phylogenetic tree objects.
SiteSimulationResult(const Tree *tree, const Alphabet *alphabet, size_t ancestralState)
virtual size_t getSubstitutionCount(size_t i) const
RASiteSimulationResult(const Tree *tree, const Alphabet *alphabet, size_t ancestralStateIndex, double rate)
virtual void getSubstitutionCount(size_t i, const SubstitutionRegister ®, std::vector< double > &counts) const
Data structure to store the result of a DetailedSiteSimulator.
virtual void getSubstitutionCount(int nodeId, const SubstitutionRegister ®, std::vector< double > &counts) const
virtual VVdouble getSubstitutionVector(const SubstitutionRegister ®) const
virtual std::vector< std::string > getLeaveNames() const
virtual const Alphabet * getAlphabet() const
virtual size_t getNumberOfSubstitutionTypes() const =0
virtual size_t getAncestralState(int nodeId) const
SiteSimulationResult & operator=(const SiteSimulationResult &ssr)
virtual ~DetailedSiteSimulator()
virtual double getRate() const
virtual size_t getSubstitutionCount(int nodeId) const
std::map< int, size_t > indexes_
virtual ~RASiteSimulationResult()
SiteSimulationResult(const SiteSimulationResult &ssr)
Data structure to store the result of a DetailedSiteSimulator.
std::vector< size_t > ancestralStates_
virtual const MutationPath & getMutationPath(int nodeId) const
size_t getFinalState() const
Retrieve the final state of this path.
virtual std::vector< size_t > getFinalStates() const
virtual std::string getNodeName(int nodeId) const =0