bpp-phyl3  3.0.0
bpp::AbstractMapping Class Referenceabstract

Partial implementation of the mapping interface. More...

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

+ Inheritance diagram for bpp::AbstractMapping:
+ Collaboration diagram for bpp::AbstractMapping:

Public Member Functions

 AbstractMapping ()
 
 AbstractMapping (size_t nb)
 
 AbstractMapping (const AbstractMapping &absm)=default
 
AbstractMappingoperator= (const AbstractMapping &absm)=default
 
virtual ~AbstractMapping ()
 
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)
 
MappingInterfaceclone () const override=0
 
virtual const PhyloBranchgetBranch (unsigned int branchId) const =0
 
virtual PhyloBranchgetBranch (unsigned int branchId)=0
 
virtual size_t getNumberOfBranches () const =0
 

Protected Attributes

std::vector< int > sitesPositions_
 
size_t nbSites_
 

Detailed Description

Partial implementation of the mapping interface.

Here, there is no information about site compression.

Definition at line 77 of file Mapping.h.

Constructor & Destructor Documentation

◆ AbstractMapping() [1/3]

bpp::AbstractMapping::AbstractMapping ( )
inline

Definition at line 85 of file Mapping.h.

◆ AbstractMapping() [2/3]

bpp::AbstractMapping::AbstractMapping ( size_t  nb)
inline

Definition at line 88 of file Mapping.h.

◆ AbstractMapping() [3/3]

bpp::AbstractMapping::AbstractMapping ( const AbstractMapping absm)
default

◆ ~AbstractMapping()

virtual bpp::AbstractMapping::~AbstractMapping ( )
inlinevirtual

Definition at line 95 of file Mapping.h.

Member Function Documentation

◆ clone()

◆ 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()

◆ getSitePosition()

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

Implements bpp::MappingInterface.

Definition at line 98 of file Mapping.h.

References sitesPositions_.

◆ operator=()

◆ setNumberOfSites()

virtual void bpp::AbstractMapping::setNumberOfSites ( size_t  numberOfSites)
inlinevirtual

◆ setSitePosition()

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

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 nbSites_, and sitesPositions_.

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

Member Data Documentation

◆ nbSites_

size_t bpp::AbstractMapping::nbSites_
protected

Definition at line 82 of file Mapping.h.

Referenced by getNumberOfSites(), setNumberOfSites(), and setSitePosition().

◆ sitesPositions_

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

Definition at line 81 of file Mapping.h.

Referenced by getSitePosition(), setNumberOfSites(), and setSitePosition().


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