bpp-phyl3  3.0.0
bpp::AbstractRewardMapping Class Referenceabstract

Partial implementation of the substitution mapping interface. More...

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

+ Inheritance diagram for bpp::AbstractRewardMapping:
+ Collaboration diagram for bpp::AbstractRewardMapping:

Public Member Functions

 AbstractRewardMapping ()
 
 AbstractRewardMapping (const AbstractRewardMapping &absm)
 
AbstractRewardMappingclone () const override=0
 
AbstractRewardMappingoperator= (const AbstractRewardMapping &absm)
 
virtual ~AbstractRewardMapping ()
 
virtual double & operator() (uint branchId, size_t siteIndex)=0
 
virtual double operator() (uint branchId, size_t siteIndex) const =0
 
virtual size_t getNumberOfSites () const =0
 
virtual const PhyloBranchgetBranch (unsigned int branchId) const =0
 
virtual PhyloBranchgetBranch (unsigned int branchId)=0
 
virtual size_t getNumberOfBranches () const =0
 
virtual int getSitePosition (size_t index) const =0
 
virtual void setSitePosition (size_t index, int position)=0
 Set the position of a given site. More...
 
int getSitePosition (size_t index) const
 
void setSitePosition (size_t index, int position)
 Set the position of a given site. More...
 
size_t getNumberOfSites () const
 
virtual void setNumberOfSites (size_t numberOfSites)
 

Protected Attributes

std::vector< int > sitesPositions_
 
size_t nbSites_
 

Detailed Description

Partial implementation of the substitution mapping interface.

This implementation copies the input tree in a TreeTemplate<Node> object.

Definition at line 46 of file RewardMapping.h.

Constructor & Destructor Documentation

◆ AbstractRewardMapping() [1/2]

bpp::AbstractRewardMapping::AbstractRewardMapping ( )
inline

Definition at line 51 of file RewardMapping.h.

◆ AbstractRewardMapping() [2/2]

bpp::AbstractRewardMapping::AbstractRewardMapping ( const AbstractRewardMapping absm)
inline

Definition at line 53 of file RewardMapping.h.

◆ ~AbstractRewardMapping()

virtual bpp::AbstractRewardMapping::~AbstractRewardMapping ( )
inlinevirtual

Definition at line 64 of file RewardMapping.h.

Member Function Documentation

◆ clone()

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

◆ getBranch() [1/2]

virtual const PhyloBranch& bpp::MappingInterface::getBranch ( unsigned int  branchId) const
pure virtualinherited

◆ getBranch() [2/2]

virtual PhyloBranch& bpp::MappingInterface::getBranch ( unsigned int  branchId)
pure virtualinherited

◆ getNumberOfBranches()

virtual size_t bpp::MappingInterface::getNumberOfBranches ( ) const
pure virtualinherited
Returns
The number of branches mapped.

Implemented in bpp::ProbabilisticSubstitutionMapping, and bpp::ProbabilisticRewardMapping.

◆ getNumberOfSites() [1/2]

◆ getNumberOfSites() [2/2]

virtual size_t bpp::MappingInterface::getNumberOfSites ( ) const
pure virtualinherited
Returns
The number of sites mapped.

Implemented in bpp::AbstractMapping.

◆ getSitePosition() [1/2]

int bpp::AbstractMapping::getSitePosition ( size_t  index) const
inlinevirtualinherited
Parameters
indexThe site index.
Returns
The site position corresponding to the index.

Implements bpp::MappingInterface.

Definition at line 98 of file Mapping.h.

References bpp::AbstractMapping::sitesPositions_.

◆ getSitePosition() [2/2]

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

Implemented in bpp::AbstractMapping.

◆ operator()() [1/2]

virtual double bpp::RewardMappingInterface::operator() ( uint  branchId,
size_t  siteIndex 
) const
pure virtualinherited

◆ operator()() [2/2]

virtual double& bpp::RewardMappingInterface::operator() ( uint  branchId,
size_t  siteIndex 
)
pure virtualinherited

◆ operator=()

AbstractRewardMapping& bpp::AbstractRewardMapping::operator= ( const AbstractRewardMapping absm)
inline

Definition at line 58 of file RewardMapping.h.

References bpp::AbstractMapping::operator=().

◆ setNumberOfSites()

◆ setSitePosition() [1/2]

void bpp::AbstractMapping::setSitePosition ( size_t  index,
int  position 
)
inlinevirtualinherited

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.

Implements bpp::MappingInterface.

Definition at line 103 of file Mapping.h.

References bpp::AbstractMapping::nbSites_, and bpp::AbstractMapping::sitesPositions_.

Referenced by bpp::RewardMappingTools::readFromStream(), and bpp::SubstitutionMappingTools::readFromStream().

◆ setSitePosition() [2/2]

virtual void bpp::MappingInterface::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::AbstractMapping.

Member Data Documentation

◆ nbSites_

size_t bpp::AbstractMapping::nbSites_
protectedinherited

◆ sitesPositions_

std::vector<int> bpp::AbstractMapping::sitesPositions_
protectedinherited

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