bpp-phyl3  3.0.0
bpp::LegacyRewardMappingInterface Class Referenceabstract

Legacy interface for storing reward mapping data. More...

#include <Bpp/Phyl/Legacy/Mapping/RewardMapping.h>

+ Inheritance diagram for bpp::LegacyRewardMappingInterface:
+ Collaboration diagram for bpp::LegacyRewardMappingInterface:

Public Member Functions

 LegacyRewardMappingInterface ()
 
virtual ~LegacyRewardMappingInterface ()
 
LegacyRewardMappingInterfaceclone () const override=0
 
virtual double & operator() (size_t nodeIndex, size_t siteIndex)=0
 
virtual const double & operator() (size_t nodeIndex, size_t siteIndex) const =0
 
virtual const Treetree () const =0
 
virtual bool isEmpty () const =0
 
virtual size_t getNumberOfSites () const =0
 
virtual size_t getNumberOfBranches () const =0
 
virtual int getSitePosition (size_t index) const =0
 
virtual std::vector< double > getBranchLengths () const =0
 
virtual size_t getNodeIndex (int nodeId) const =0
 
virtual void setSitePosition (size_t index, int position)=0
 Set the position of a given site. More...
 

Detailed Description

Legacy interface for storing reward mapping data.

Since only probabilistic reward mapping is implemented for now, the basal interface only contains a few methods. More methods are expected to be added later.

Definition at line 26 of file RewardMapping.h.

Constructor & Destructor Documentation

◆ LegacyRewardMappingInterface()

bpp::LegacyRewardMappingInterface::LegacyRewardMappingInterface ( )
inline

Definition at line 30 of file RewardMapping.h.

◆ ~LegacyRewardMappingInterface()

virtual bpp::LegacyRewardMappingInterface::~LegacyRewardMappingInterface ( )
inlinevirtual

Definition at line 31 of file RewardMapping.h.

Member Function Documentation

◆ clone()

LegacyRewardMappingInterface* bpp::LegacyRewardMappingInterface::clone ( ) const
overridepure virtual

◆ getBranchLengths()

virtual std::vector<double> bpp::LegacyMappingInterface::getBranchLengths ( ) const
pure virtualinherited
Returns
A vector with all tree branch lengths.

Implemented in bpp::LegacyAbstractMapping.

◆ getNodeIndex()

virtual size_t bpp::LegacyMappingInterface::getNodeIndex ( int  nodeId) const
pure virtualinherited
Parameters
nodeIdAn id of the node to look for in the map.
Returns
The mapping index for the specified node id.

Implemented in bpp::LegacyAbstractMapping.

◆ getNumberOfBranches()

◆ getNumberOfSites()

virtual size_t bpp::LegacyMappingInterface::getNumberOfSites ( ) const
pure virtualinherited

◆ getSitePosition()

virtual int bpp::LegacyMappingInterface::getSitePosition ( size_t  index) const
pure virtualinherited
Parameters
indexThe site index.
Returns
The site position corresponding to the index.

Implemented in bpp::LegacyAbstractMapping.

◆ isEmpty()

virtual bool bpp::LegacyMappingInterface::isEmpty ( ) const
pure virtualinherited
Returns
True is the map is empty, that is, if no tree is associated to the map yet.

Implemented in bpp::LegacyAbstractMapping.

◆ operator()() [1/2]

virtual const double& bpp::LegacyRewardMappingInterface::operator() ( size_t  nodeIndex,
size_t  siteIndex 
) const
pure virtual

◆ operator()() [2/2]

virtual double& bpp::LegacyRewardMappingInterface::operator() ( size_t  nodeIndex,
size_t  siteIndex 
)
pure virtual

◆ setSitePosition()

virtual void bpp::LegacyMappingInterface::setSitePosition ( size_t  index,
int  position 
)
pure virtualinherited

Set the position of a given site.

Warning
No index checking is performed, use with care!
Parameters
indexThe site index.
positionThe position of the site.

Implemented in bpp::LegacyAbstractMapping.

◆ tree()

virtual const Tree& bpp::LegacyMappingInterface::tree ( ) const
pure virtualinherited
Returns
Get the phylogenetic tree associated to this mapping.

Implemented in bpp::LegacyAbstractMapping.


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