bpp-phyl3  3.0.0
bpp::PhyloLikelihoodContainer Class Reference

The PhyloLikelihoodContainer, owns and assigns numbers to Phylolikelihoods. More...

#include <Bpp/Phyl/Likelihood/PhyloLikelihoods/PhyloLikelihoodContainer.h>

+ Inheritance diagram for bpp::PhyloLikelihoodContainer:
+ Collaboration diagram for bpp::PhyloLikelihoodContainer:

Public Member Functions

 PhyloLikelihoodContainer (Context &context, std::shared_ptr< SubstitutionProcessCollection > sColl)
 
 PhyloLikelihoodContainer (Context &context, std::shared_ptr< CollectionNodes > sColl)
 
PhyloLikelihoodContainerclone () const override
 
virtual ~PhyloLikelihoodContainer ()
 Abstract class destructor. More...
 
void addPhyloLikelihood (size_t pos, std::shared_ptr< PhyloLikelihoodInterface > Ap)
 
bool hasPhyloLikelihood (size_t pos) const
 
std::shared_ptr< const PhyloLikelihoodInterfaceoperator[] (size_t pos) const
 
std::shared_ptr< PhyloLikelihoodInterfaceoperator[] (size_t pos)
 
std::shared_ptr< const PhyloLikelihoodInterfacegetPhyloLikelihood (size_t pos) const
 
std::shared_ptr< PhyloLikelihoodInterfacegetPhyloLikelihood (size_t pos)
 
size_t getSize () const
 
std::vector< size_t > getNumbersOfPhyloLikelihoods () const
 
std::shared_ptr< const CollectionNodesgetCollectionNodes () const
 Manage Collection Nodes. More...
 
std::shared_ptr< CollectionNodesgetCollectionNodes ()
 
void setData (std::shared_ptr< const AlignmentDataInterface > sites, size_t nPhyl)
 Set the dataset for which the likelihood must be evaluated, iff the pointed PhyloLikelihood is a SingleDataPhyloLikelihood. More...
 
std::shared_ptr< const AlignmentDataInterfacegetData (size_t nPhyl) const
 Get the dataset for which the likelihood must be evaluated. More...
 

Protected Attributes

std::map< size_t, std::shared_ptr< PhyloLikelihoodInterface > > mPhylo_
 

Private Attributes

Contextcontext_
 
std::shared_ptr< CollectionNodescollectionNodes_
 

Detailed Description

The PhyloLikelihoodContainer, owns and assigns numbers to Phylolikelihoods.

It owns the PhyloLikelihoods

Definition at line 25 of file PhyloLikelihoodContainer.h.

Constructor & Destructor Documentation

◆ PhyloLikelihoodContainer() [1/2]

bpp::PhyloLikelihoodContainer::PhyloLikelihoodContainer ( Context context,
std::shared_ptr< SubstitutionProcessCollection sColl 
)
inline

Definition at line 37 of file PhyloLikelihoodContainer.h.

◆ PhyloLikelihoodContainer() [2/2]

bpp::PhyloLikelihoodContainer::PhyloLikelihoodContainer ( Context context,
std::shared_ptr< CollectionNodes sColl 
)
inline

Definition at line 45 of file PhyloLikelihoodContainer.h.

◆ ~PhyloLikelihoodContainer()

virtual bpp::PhyloLikelihoodContainer::~PhyloLikelihoodContainer ( )
inlinevirtual

Abstract class destructor.

Definition at line 60 of file PhyloLikelihoodContainer.h.

Member Function Documentation

◆ addPhyloLikelihood()

void bpp::PhyloLikelihoodContainer::addPhyloLikelihood ( size_t  pos,
std::shared_ptr< PhyloLikelihoodInterface Ap 
)
inline

Definition at line 71 of file PhyloLikelihoodContainer.h.

References mPhylo_, and bpp::TextTools::toString().

◆ clone()

PhyloLikelihoodContainer* bpp::PhyloLikelihoodContainer::clone ( ) const
inlineoverridevirtual

Implements bpp::Clonable.

Definition at line 51 of file PhyloLikelihoodContainer.h.

◆ getCollectionNodes() [1/2]

std::shared_ptr<CollectionNodes> bpp::PhyloLikelihoodContainer::getCollectionNodes ( )
inline

Definition at line 133 of file PhyloLikelihoodContainer.h.

References collectionNodes_.

◆ getCollectionNodes() [2/2]

std::shared_ptr<const CollectionNodes> bpp::PhyloLikelihoodContainer::getCollectionNodes ( ) const
inline

Manage Collection Nodes.

Definition at line 128 of file PhyloLikelihoodContainer.h.

References collectionNodes_.

◆ getData()

std::shared_ptr<const AlignmentDataInterface> bpp::PhyloLikelihoodContainer::getData ( size_t  nPhyl) const
inline

Get the dataset for which the likelihood must be evaluated.

Returns
A pointer toward the site container where the sequences are stored.

Definition at line 162 of file PhyloLikelihoodContainer.h.

References mPhylo_.

◆ getNumbersOfPhyloLikelihoods()

std::vector<size_t> bpp::PhyloLikelihoodContainer::getNumbersOfPhyloLikelihoods ( ) const
inline

◆ getPhyloLikelihood() [1/2]

std::shared_ptr<PhyloLikelihoodInterface> bpp::PhyloLikelihoodContainer::getPhyloLikelihood ( size_t  pos)
inline

Definition at line 101 of file PhyloLikelihoodContainer.h.

References mPhylo_.

◆ getPhyloLikelihood() [2/2]

std::shared_ptr<const PhyloLikelihoodInterface> bpp::PhyloLikelihoodContainer::getPhyloLikelihood ( size_t  pos) const
inline

Definition at line 95 of file PhyloLikelihoodContainer.h.

References mPhylo_.

◆ getSize()

size_t bpp::PhyloLikelihoodContainer::getSize ( ) const
inline

Definition at line 107 of file PhyloLikelihoodContainer.h.

References mPhylo_.

◆ hasPhyloLikelihood()

bool bpp::PhyloLikelihoodContainer::hasPhyloLikelihood ( size_t  pos) const
inline

Definition at line 78 of file PhyloLikelihoodContainer.h.

References mPhylo_.

◆ operator[]() [1/2]

std::shared_ptr<PhyloLikelihoodInterface> bpp::PhyloLikelihoodContainer::operator[] ( size_t  pos)
inline

Definition at line 89 of file PhyloLikelihoodContainer.h.

References mPhylo_.

◆ operator[]() [2/2]

std::shared_ptr<const PhyloLikelihoodInterface> bpp::PhyloLikelihoodContainer::operator[] ( size_t  pos) const
inline

Definition at line 83 of file PhyloLikelihoodContainer.h.

References mPhylo_.

◆ setData()

void bpp::PhyloLikelihoodContainer::setData ( std::shared_ptr< const AlignmentDataInterface sites,
size_t  nPhyl 
)
inline

Set the dataset for which the likelihood must be evaluated, iff the pointed PhyloLikelihood is a SingleDataPhyloLikelihood.

Parameters
nPhylThe number of the Likelihood.
sitesThe data set to use.

Definition at line 145 of file PhyloLikelihoodContainer.h.

References mPhylo_.

Member Data Documentation

◆ collectionNodes_

std::shared_ptr<CollectionNodes> bpp::PhyloLikelihoodContainer::collectionNodes_
private

Definition at line 31 of file PhyloLikelihoodContainer.h.

Referenced by getCollectionNodes().

◆ context_

Context& bpp::PhyloLikelihoodContainer::context_
private

Definition at line 29 of file PhyloLikelihoodContainer.h.

◆ mPhylo_

std::map<size_t, std::shared_ptr<PhyloLikelihoodInterface> > bpp::PhyloLikelihoodContainer::mPhylo_
protected

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