bpp-phyl3  3.0.0
bpp::SiteSimulationResult Class Reference

Data structure to store the result of a DetailedSiteSimulator. More...

#include <Bpp/Phyl/Simulation/DetailedSiteSimulator.h>

+ Inheritance diagram for bpp::SiteSimulationResult:
+ Collaboration diagram for bpp::SiteSimulationResult:

Public Member Functions

 SiteSimulationResult (std::shared_ptr< const ParametrizablePhyloTree > tree, std::shared_ptr< const StateMapInterface > statemap, size_t ancestralState)
 
 SiteSimulationResult (const SiteSimulationResult &ssr)
 
SiteSimulationResultoperator= (const SiteSimulationResult &ssr)
 
virtual ~SiteSimulationResult ()
 
std::shared_ptr< const AlphabetgetAlphabet () const
 
const Alphabetalphabet () const
 
virtual void addNode (unsigned int nodeId, MutationPath path)
 
virtual size_t getAncestralState (size_t i) const
 
virtual size_t getAncestralState (unsigned int nodeId) const
 
virtual const MutationPathgetMutationPath (size_t i) const
 
virtual const MutationPathgetMutationPath (unsigned int nodeId) const
 
virtual size_t getSubstitutionCount (size_t i) const
 
virtual void getSubstitutionCount (size_t i, const SubstitutionRegisterInterface &reg, std::vector< double > &counts) const
 
virtual size_t getSubstitutionCount (unsigned int nodeId) const
 
virtual void getSubstitutionCount (unsigned int nodeId, const SubstitutionRegisterInterface &reg, std::vector< double > &counts) const
 
virtual VVdouble getSubstitutionVector (const SubstitutionRegisterInterface &reg) const
 
virtual std::vector< size_t > getFinalStates () const
 
virtual std::unique_ptr< SiteInterfacegetSite (const TransitionModelInterface &model) const
 
virtual std::vector< std::string > getLeaveNames () const
 

Private Attributes

std::map< uint, size_t > indexes_
 
size_t currentIndex_
 
std::vector< MutationPathpaths_
 
std::vector< size_t > ancestralStates_
 
std::shared_ptr< const ParametrizablePhyloTreetree_
 
std::vector< unsigned int > leavesId_
 
std::shared_ptr< const StateMapInterfacestatemap_
 

Detailed Description

Data structure to store the result of a DetailedSiteSimulator.

This data structure stores each transitional state, and the time when it occurred.

Definition at line 24 of file DetailedSiteSimulator.h.

Constructor & Destructor Documentation

◆ SiteSimulationResult() [1/2]

bpp::SiteSimulationResult::SiteSimulationResult ( std::shared_ptr< const ParametrizablePhyloTree tree,
std::shared_ptr< const StateMapInterface statemap,
size_t  ancestralState 
)
inline

Definition at line 36 of file DetailedSiteSimulator.h.

References ancestralStates_, and indexes_.

◆ SiteSimulationResult() [2/2]

bpp::SiteSimulationResult::SiteSimulationResult ( const SiteSimulationResult ssr)
inline

Definition at line 53 of file DetailedSiteSimulator.h.

◆ ~SiteSimulationResult()

virtual bpp::SiteSimulationResult::~SiteSimulationResult ( )
inlinevirtual

Definition at line 75 of file DetailedSiteSimulator.h.

Member Function Documentation

◆ addNode()

virtual void bpp::SiteSimulationResult::addNode ( unsigned int  nodeId,
MutationPath  path 
)
inlinevirtual

◆ alphabet()

const Alphabet& bpp::SiteSimulationResult::alphabet ( ) const
inline

Definition at line 83 of file DetailedSiteSimulator.h.

References statemap_.

Referenced by getSite().

◆ getAlphabet()

std::shared_ptr<const Alphabet> bpp::SiteSimulationResult::getAlphabet ( ) const
inline
Returns
The alphabet associated to this simulation.

Definition at line 81 of file DetailedSiteSimulator.h.

References statemap_.

◆ getAncestralState() [1/2]

virtual size_t bpp::SiteSimulationResult::getAncestralState ( size_t  i) const
inlinevirtual

Definition at line 93 of file DetailedSiteSimulator.h.

References ancestralStates_.

◆ getAncestralState() [2/2]

virtual size_t bpp::SiteSimulationResult::getAncestralState ( unsigned int  nodeId) const
inlinevirtual

Definition at line 95 of file DetailedSiteSimulator.h.

References ancestralStates_, and indexes_.

◆ getFinalStates()

virtual std::vector<size_t> bpp::SiteSimulationResult::getFinalStates ( ) const
inlinevirtual
Returns
The states at the leaves.

Definition at line 136 of file DetailedSiteSimulator.h.

References ancestralStates_, indexes_, and leavesId_.

Referenced by getSite().

◆ getLeaveNames()

virtual std::vector<std::string> bpp::SiteSimulationResult::getLeaveNames ( ) const
inlinevirtual
Returns
A vector with the leaves names.

Definition at line 165 of file DetailedSiteSimulator.h.

References leavesId_, and tree_.

◆ getMutationPath() [1/2]

virtual const MutationPath& bpp::SiteSimulationResult::getMutationPath ( size_t  i) const
inlinevirtual

Definition at line 97 of file DetailedSiteSimulator.h.

References paths_.

◆ getMutationPath() [2/2]

virtual const MutationPath& bpp::SiteSimulationResult::getMutationPath ( unsigned int  nodeId) const
inlinevirtual

Definition at line 99 of file DetailedSiteSimulator.h.

References indexes_, and paths_.

◆ getSite()

virtual std::unique_ptr<SiteInterface> bpp::SiteSimulationResult::getSite ( const TransitionModelInterface model) const
inlinevirtual
Returns
The site corresponding to this simulation.

Definition at line 150 of file DetailedSiteSimulator.h.

References alphabet(), getFinalStates(), and statemap_.

◆ getSubstitutionCount() [1/4]

virtual size_t bpp::SiteSimulationResult::getSubstitutionCount ( size_t  i) const
inlinevirtual

Definition at line 101 of file DetailedSiteSimulator.h.

References paths_.

◆ getSubstitutionCount() [2/4]

virtual void bpp::SiteSimulationResult::getSubstitutionCount ( size_t  i,
const SubstitutionRegisterInterface reg,
std::vector< double > &  counts 
) const
inlinevirtual

Definition at line 103 of file DetailedSiteSimulator.h.

References paths_.

◆ getSubstitutionCount() [3/4]

virtual size_t bpp::SiteSimulationResult::getSubstitutionCount ( unsigned int  nodeId) const
inlinevirtual

Definition at line 111 of file DetailedSiteSimulator.h.

References indexes_, and paths_.

◆ getSubstitutionCount() [4/4]

virtual void bpp::SiteSimulationResult::getSubstitutionCount ( unsigned int  nodeId,
const SubstitutionRegisterInterface reg,
std::vector< double > &  counts 
) const
inlinevirtual

Definition at line 113 of file DetailedSiteSimulator.h.

References indexes_, and paths_.

◆ getSubstitutionVector()

virtual VVdouble bpp::SiteSimulationResult::getSubstitutionVector ( const SubstitutionRegisterInterface reg) const
inlinevirtual

◆ operator=()

SiteSimulationResult& bpp::SiteSimulationResult::operator= ( const SiteSimulationResult ssr)
inline

Member Data Documentation

◆ ancestralStates_

std::vector<size_t> bpp::SiteSimulationResult::ancestralStates_
private

◆ currentIndex_

size_t bpp::SiteSimulationResult::currentIndex_
private

Definition at line 28 of file DetailedSiteSimulator.h.

Referenced by addNode(), and operator=().

◆ indexes_

std::map<uint, size_t> bpp::SiteSimulationResult::indexes_
mutableprivate

◆ leavesId_

std::vector<unsigned int> bpp::SiteSimulationResult::leavesId_
private

Definition at line 32 of file DetailedSiteSimulator.h.

Referenced by getFinalStates(), getLeaveNames(), and operator=().

◆ paths_

std::vector<MutationPath> bpp::SiteSimulationResult::paths_
private

◆ statemap_

std::shared_ptr<const StateMapInterface> bpp::SiteSimulationResult::statemap_
private

Definition at line 33 of file DetailedSiteSimulator.h.

Referenced by alphabet(), getAlphabet(), getSite(), and operator=().

◆ tree_

std::shared_ptr<const ParametrizablePhyloTree> bpp::SiteSimulationResult::tree_
private

Definition at line 31 of file DetailedSiteSimulator.h.

Referenced by getLeaveNames(), and operator=().


The documentation for this class was generated from the following file: