bpp-phyl3
3.0.0
|
Partial implementation of the TreeParsimonyScore interface. More...
#include <Bpp/Phyl/Parsimony/AbstractTreeParsimonyScore.h>
Public Member Functions | |
AbstractTreeParsimonyScore (std::shared_ptr< TreeTemplate< Node >> tree, std::shared_ptr< const SiteContainerInterface > data, bool verbose, bool includeGaps) | |
AbstractTreeParsimonyScore (std::shared_ptr< TreeTemplate< Node >> tree, std::shared_ptr< const SiteContainerInterface > data, std::shared_ptr< const StateMapInterface > statesMap, bool verbose) | |
virtual | ~AbstractTreeParsimonyScore () |
const Tree & | tree () const override |
Get the tree for which scores are computed. More... | |
virtual const TreeTemplate< Node > & | treeTemplate () const |
virtual std::shared_ptr< const TreeTemplate< Node > > | getTreeTemplate () const |
std::vector< unsigned int > | getScorePerSite () const override |
Get the score for each site for the current tree, i.e. the total minimum number of changes in the tree for each site. More... | |
const StateMapInterface & | stateMap () const override |
Get the state map associated to this instance. More... | |
std::shared_ptr< const StateMapInterface > | getStateMap () const override |
Get the state map associated to this instance. More... | |
TreeParsimonyScoreInterface * | clone () const =0 |
virtual unsigned int | getScore () const =0 |
Get the score for the current tree, i.e. the total minimum number of changes in the tree. More... | |
virtual unsigned int | getScoreForSite (size_t site) const =0 |
Get the score for a given site for the current tree, i.e. the total minimum number of changes in the tree for this site. More... | |
Protected Member Functions | |
virtual Tree & | tree_ () |
virtual TreeTemplate< Node > & | treeTemplate_ () |
virtual std::shared_ptr< TreeTemplate< Node > > | getTreeTemplate_ () |
Private Member Functions | |
void | init_ (std::shared_ptr< const SiteContainerInterface > data, bool verbose) |
Private Attributes | |
std::shared_ptr< TreeTemplate< Node > > | treePtr_ |
std::shared_ptr< const SiteContainerInterface > | data_ |
std::shared_ptr< const Alphabet > | alphabet_ |
std::shared_ptr< const StateMapInterface > | statesMap_ |
size_t | nbStates_ |
Partial implementation of the TreeParsimonyScore interface.
Definition at line 20 of file AbstractTreeParsimonyScore.h.
AbstractTreeParsimonyScore::AbstractTreeParsimonyScore | ( | std::shared_ptr< TreeTemplate< Node >> | tree, |
std::shared_ptr< const SiteContainerInterface > | data, | ||
bool | verbose, | ||
bool | includeGaps | ||
) |
Definition at line 14 of file AbstractTreeParsimonyScore.cpp.
References alphabet_, init_(), nbStates_, and statesMap_.
AbstractTreeParsimonyScore::AbstractTreeParsimonyScore | ( | std::shared_ptr< TreeTemplate< Node >> | tree, |
std::shared_ptr< const SiteContainerInterface > | data, | ||
std::shared_ptr< const StateMapInterface > | statesMap, | ||
bool | verbose | ||
) |
Definition at line 31 of file AbstractTreeParsimonyScore.cpp.
References init_().
|
inlinevirtual |
Definition at line 43 of file AbstractTreeParsimonyScore.h.
|
pure virtualinherited |
Implements bpp::Clonable.
Implemented in bpp::DRTreeParsimonyScore.
|
pure virtualinherited |
Get the score for the current tree, i.e. the total minimum number of changes in the tree.
Implemented in bpp::DRTreeParsimonyScore.
|
pure virtualinherited |
Get the score for a given site for the current tree, i.e. the total minimum number of changes in the tree for this site.
site | The corresponding site. |
Implemented in bpp::DRTreeParsimonyScore.
Referenced by getScorePerSite().
|
overridevirtual |
Get the score for each site for the current tree, i.e. the total minimum number of changes in the tree for each site.
Implements bpp::TreeParsimonyScoreInterface.
Definition at line 69 of file AbstractTreeParsimonyScore.cpp.
References data_, and bpp::TreeParsimonyScoreInterface::getScoreForSite().
|
inlineoverridevirtual |
Get the state map associated to this instance.
Implements bpp::TreeParsimonyScoreInterface.
Definition at line 54 of file AbstractTreeParsimonyScore.h.
References statesMap_.
Referenced by bpp::DRTreeParsimonyScore::init_().
|
inlinevirtual |
Definition at line 51 of file AbstractTreeParsimonyScore.h.
References treePtr_.
Referenced by bpp::DRTreeParsimonyScore::DRTreeParsimonyScore(), and bpp::DRTreeParsimonyScore::operator=().
|
inlineprotectedvirtual |
Definition at line 59 of file AbstractTreeParsimonyScore.h.
References treePtr_.
|
private |
Definition at line 45 of file AbstractTreeParsimonyScore.cpp.
References data_, bpp::TreeTemplateTools::deleteBranchLengths(), bpp::ApplicationTools::displayWarning(), bpp::PatternTools::getSequenceSubset(), and treePtr_.
Referenced by AbstractTreeParsimonyScore().
|
inlineoverridevirtual |
Get the state map associated to this instance.
Implements bpp::TreeParsimonyScoreInterface.
Definition at line 53 of file AbstractTreeParsimonyScore.h.
References statesMap_.
|
inlineoverridevirtual |
Get the tree for which scores are computed.
Implements bpp::TreeParsimonyScoreInterface.
Definition at line 49 of file AbstractTreeParsimonyScore.h.
References treePtr_.
Referenced by bpp::DRTreeParsimonyScore::topology().
|
inlineprotectedvirtual |
Definition at line 57 of file AbstractTreeParsimonyScore.h.
References treePtr_.
|
inlinevirtual |
Definition at line 50 of file AbstractTreeParsimonyScore.h.
References treePtr_.
Referenced by bpp::DRTreeParsimonyScore::computeScores(), and bpp::DRTreeParsimonyScore::testNNI().
|
inlineprotectedvirtual |
Definition at line 58 of file AbstractTreeParsimonyScore.h.
References treePtr_.
Referenced by bpp::DRTreeParsimonyScore::doNNI().
|
private |
Definition at line 26 of file AbstractTreeParsimonyScore.h.
Referenced by AbstractTreeParsimonyScore().
|
private |
Definition at line 25 of file AbstractTreeParsimonyScore.h.
Referenced by getScorePerSite(), and init_().
|
private |
Definition at line 28 of file AbstractTreeParsimonyScore.h.
Referenced by AbstractTreeParsimonyScore().
|
private |
Definition at line 27 of file AbstractTreeParsimonyScore.h.
Referenced by AbstractTreeParsimonyScore(), getStateMap(), and stateMap().
|
private |
Definition at line 24 of file AbstractTreeParsimonyScore.h.
Referenced by getTreeTemplate(), getTreeTemplate_(), init_(), tree(), tree_(), treeTemplate(), and treeTemplate_().