|
bpp-phyl3 3.0.0
|
Data structure for site patterns. More...
#include <Bpp/Phyl/SitePatterns.h>
Inheritance diagram for bpp::SitePatterns:
Collaboration diagram for bpp::SitePatterns:Classes | |
| class | SortableSite |
| Class used for site pattern sorting. More... | |
Public Types | |
| typedef Eigen::Matrix< size_t, 1, -1 > | IndicesType |
Public Member Functions | |
| SitePatterns (const AlignmentDataInterface &sequences, std::vector< std::string > names={}) | |
| Build a new SitePattern object. More... | |
| SitePatterns * | clone () const |
| const std::vector< unsigned int > & | getWeights () const |
| const IndicesType & | getIndices () const |
| std::unique_ptr< AlignmentDataInterface > | getSites () const |
Private Member Functions | |
| void | init_ (const AlignmentDataInterface &sequences, std::vector< std::string > names={}) |
Private Attributes | |
| std::vector< std::string > | names_ |
| std::vector< std::shared_ptr< const CoreSiteInterface > > | sites_ |
| std::vector< unsigned int > | weights_ |
| IndicesType | indices_ |
| std::shared_ptr< const Alphabet > | alpha_ |
Data structure for site patterns.
'names' are the sequence names 'sites' points toward a unique site 'weights' is the number of sites identical to this sites 'indices' are the positions in the original container
Definition at line 33 of file SitePatterns.h.
| typedef Eigen::Matrix<size_t, 1, -1> bpp::SitePatterns::IndicesType |
Definition at line 37 of file SitePatterns.h.
| SitePatterns::SitePatterns | ( | const AlignmentDataInterface & | sequences, |
| std::vector< std::string > | names = {} |
||
| ) |
Build a new SitePattern object.
Look for patterns (unique sites) within a site container.
| sequences | The container to look in. |
| names | The vector of the names of the sequences that are effectively used in the computation. If not empty, the sites are filtered with the sequences names. |
Definition at line 17 of file SitePatterns.cpp.
References bpp::TemplateAlignmentDataInterface< class >::getSequenceNames(), init_(), names_, and bpp::VectorTools::vectorIntersection().
Referenced by clone().
|
inlinevirtual |
|
inline |
Definition at line 103 of file SitePatterns.h.
References indices_.
Referenced by bpp::DRTreeParsimonyData::init(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), and bpp::LikelihoodCalculationSingleProcess::setPatterns_().
| unique_ptr< AlignmentDataInterface > SitePatterns::getSites | ( | ) | const |
Definition at line 110 of file SitePatterns.cpp.
References alpha_, names_, and sites_.
Referenced by bpp::DRTreeParsimonyData::init(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), and bpp::LikelihoodCalculationSingleProcess::setPatterns_().
|
inline |
Definition at line 99 of file SitePatterns.h.
References weights_.
Referenced by bpp::DRTreeParsimonyData::init(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), and bpp::LikelihoodCalculationSingleProcess::setPatterns_().
|
private |
Definition at line 32 of file SitePatterns.cpp.
References bpp::SymbolListTools::areSymbolListsIdentical(), bpp::CoreSiteInterface::clone(), bpp::CoreSiteInterface::deleteElement(), bpp::TemplateAlignmentDataInterface< class >::getNumberOfSequences(), bpp::TemplateAlignmentDataInterface< class >::getNumberOfSites(), bpp::TemplateAlignmentDataInterface< class >::getSequencePosition(), indices_, bpp::SitePatterns::SortableSite::originalPosition, bpp::TemplateAlignmentDataInterface< class >::site(), bpp::SitePatterns::SortableSite::siteP, bpp::SitePatterns::SortableSite::siteS, sites_, bpp::CoreSiteInterface::toString(), and weights_.
Referenced by SitePatterns().
|
private |
Definition at line 71 of file SitePatterns.h.
Referenced by getSites().
|
private |
Definition at line 70 of file SitePatterns.h.
Referenced by getIndices(), and init_().
|
private |
Definition at line 67 of file SitePatterns.h.
Referenced by getSites(), and SitePatterns().
|
private |
Definition at line 68 of file SitePatterns.h.
Referenced by getSites(), and init_().
|
private |
Definition at line 69 of file SitePatterns.h.
Referenced by getWeights(), and init_().