|
bpp-phyl3 3.0.0
|
Partial implementation of the substitution mapping interface. More...
#include <Bpp/Phyl/Legacy/Mapping/SubstitutionMapping.h>
Inheritance diagram for bpp::LegacyAbstractSubstitutionMapping:
Collaboration diagram for bpp::LegacyAbstractSubstitutionMapping:Public Member Functions | |
| LegacyAbstractSubstitutionMapping (const Tree &tree) | |
| LegacyAbstractSubstitutionMapping (const LegacyAbstractSubstitutionMapping &absm)=default | |
| LegacyAbstractSubstitutionMapping * | clone () const override=0 |
| LegacyAbstractSubstitutionMapping & | operator= (const LegacyAbstractSubstitutionMapping &absm)=default |
| virtual | ~LegacyAbstractSubstitutionMapping () |
| virtual size_t | getNumberOfSubstitutionTypes () const =0 |
| virtual double & | operator() (size_t nodeIndex, size_t siteIndex, size_t type)=0 |
| virtual const double & | operator() (size_t nodeIndex, size_t siteIndex, size_t type) const =0 |
| virtual const Tree & | tree () const =0 |
| virtual bool | isEmpty () const =0 |
| virtual size_t | getNumberOfSites () const =0 |
| virtual size_t | getNumberOfBranches () const =0 |
| virtual int | getSitePosition (size_t index) const =0 |
| virtual std::vector< double > | getBranchLengths () const =0 |
| virtual size_t | getNodeIndex (int nodeId) const =0 |
| virtual void | setSitePosition (size_t index, int position)=0 |
| Set the position of a given site. More... | |
| bool | isEmpty () const override |
| const TreeTemplate< Node > & | tree () const override |
| void | setTree (const Tree &tree) |
| int | getSitePosition (size_t index) const override |
| void | setSitePosition (size_t index, int position) override |
| Set the position of a given site. More... | |
| size_t | getNumberOfSites () const override |
| size_t | getNumberOfBranches () const override |
| virtual const Node * | getNode (size_t nodeIndex) const |
| virtual void | setNumberOfSites (size_t numberOfSites) |
| virtual std::vector< double > | getBranchLengths () const override |
| virtual size_t | getNodeIndex (int nodeId) const override |
Private Attributes | |
| std::unique_ptr< const TreeTemplate< Node > > | tree_ |
| std::vector< int > | sitesPositions_ |
| std::vector< const Node * > | nodes_ |
| size_t | nbSites_ |
| size_t | nbBranches_ |
Partial implementation of the substitution mapping interface.
This implementation copies the input tree in a TreeTemplate<Node> object.
Definition at line 54 of file SubstitutionMapping.h.
|
inline |
Definition at line 59 of file SubstitutionMapping.h.
|
default |
|
inlinevirtual |
Definition at line 67 of file SubstitutionMapping.h.
|
overridepure virtual |
Implements bpp::LegacyAbstractMapping.
Implemented in bpp::LegacyProbabilisticSubstitutionMapping.
|
pure virtualinherited |
Implemented in bpp::LegacyAbstractMapping.
|
inlineoverridevirtualinherited |
Implements bpp::LegacyMappingInterface.
Definition at line 174 of file Mapping.h.
References bpp::LegacyAbstractMapping::nbBranches_, and bpp::LegacyAbstractMapping::nodes_.
|
inlinevirtualinherited |
Definition at line 162 of file Mapping.h.
References bpp::LegacyAbstractMapping::nodes_.
Referenced by bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
pure virtualinherited |
| nodeId | An id of the node to look for in the map. |
Implemented in bpp::LegacyAbstractMapping.
|
inlineoverridevirtualinherited |
| nodeId | An id of the node to look for in the map. |
Implements bpp::LegacyMappingInterface.
Definition at line 184 of file Mapping.h.
References bpp::LegacyAbstractMapping::nbBranches_, bpp::LegacyAbstractMapping::nodes_, and bpp::TextTools::toString().
Referenced by bpp::LegacyProbabilisticSubstitutionMapping::getNumberOfSubstitutions(), bpp::LegacyProbabilisticRewardMapping::getReward(), bpp::LegacyRewardMappingTools::readFromStream(), and bpp::LegacySubstitutionMappingTools::readFromStream().
|
pure virtualinherited |
Implemented in bpp::LegacyAbstractMapping.
Referenced by bpp::LegacySubstitutionMappingTools::computeNormForSite(), bpp::LegacyRewardMappingTools::computeSumForSite(), bpp::LegacySubstitutionMappingTools::computeSumForSite(), bpp::LegacySubstitutionMappingTools::computeTotalSubstitutionVectorForSitePerBranch(), and bpp::LegacySubstitutionMappingTools::computeTotalSubstitutionVectorForSitePerType().
|
inlineoverridevirtualinherited |
Implements bpp::LegacyMappingInterface.
Definition at line 160 of file Mapping.h.
References bpp::LegacyAbstractMapping::nbBranches_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setNumberOfSites(), bpp::LegacyProbabilisticSubstitutionMapping::setNumberOfSites(), bpp::LegacyProbabilisticRewardMapping::setTree(), bpp::LegacyProbabilisticSubstitutionMapping::setTree(), bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
pure virtualinherited |
Implemented in bpp::LegacyAbstractMapping.
Referenced by bpp::LegacyRewardMappingTools::computeSumForBranch(), and bpp::LegacySubstitutionMappingTools::computeSumForBranch().
|
inlineoverridevirtualinherited |
Implements bpp::LegacyMappingInterface.
Definition at line 158 of file Mapping.h.
References bpp::LegacyAbstractMapping::nbSites_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setTree(), bpp::LegacyProbabilisticSubstitutionMapping::setTree(), bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
pure virtualinherited |
Implemented in bpp::LegacyProbabilisticSubstitutionMapping.
Referenced by bpp::LegacySubstitutionMappingTools::computeNormForSite(), bpp::LegacySubstitutionMappingTools::computeSumForBranch(), bpp::LegacySubstitutionMappingTools::computeSumForSite(), bpp::LegacySubstitutionMappingTools::computeTotalSubstitutionVectorForSitePerBranch(), and bpp::LegacySubstitutionMappingTools::computeTotalSubstitutionVectorForSitePerType().
|
pure virtualinherited |
| index | The site index. |
Implemented in bpp::LegacyAbstractMapping.
|
inlineoverridevirtualinherited |
| index | The site index. |
Implements bpp::LegacyMappingInterface.
Definition at line 146 of file Mapping.h.
References bpp::LegacyAbstractMapping::isEmpty(), and bpp::LegacyAbstractMapping::sitesPositions_.
|
pure virtualinherited |
Implemented in bpp::LegacyAbstractMapping.
|
inlineoverridevirtualinherited |
Implements bpp::LegacyMappingInterface.
Definition at line 130 of file Mapping.h.
References bpp::LegacyAbstractMapping::tree_.
Referenced by bpp::LegacyAbstractMapping::getSitePosition(), bpp::LegacyAbstractMapping::setSitePosition(), and bpp::LegacyAbstractMapping::tree().
|
pure virtualinherited |
Implemented in bpp::LegacyProbabilisticSubstitutionMapping.
|
pure virtualinherited |
Implemented in bpp::LegacyProbabilisticSubstitutionMapping.
|
default |
|
inlinevirtualinherited |
Reimplemented in bpp::LegacyProbabilisticRewardMapping, and bpp::LegacyProbabilisticSubstitutionMapping.
Definition at line 164 of file Mapping.h.
References bpp::LegacyAbstractMapping::nbSites_, and bpp::LegacyAbstractMapping::sitesPositions_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setNumberOfSites(), and bpp::LegacyProbabilisticSubstitutionMapping::setNumberOfSites().
|
inlineoverridevirtualinherited |
Set the position of a given site.
| index | The site index. |
| position | The position of the site. |
Implements bpp::LegacyMappingInterface.
Definition at line 152 of file Mapping.h.
References bpp::LegacyAbstractMapping::isEmpty(), and bpp::LegacyAbstractMapping::sitesPositions_.
Referenced by bpp::LegacyRewardMappingTools::readFromStream(), and bpp::LegacySubstitutionMappingTools::readFromStream().
|
pure virtualinherited |
Set the position of a given site.
| index | The site index. |
| position | The position of the site. |
Implemented in bpp::LegacyAbstractMapping.
|
inlineinherited |
Definition at line 138 of file Mapping.h.
References bpp::LegacyAbstractMapping::nbBranches_, bpp::LegacyAbstractMapping::nodes_, bpp::LegacyAbstractMapping::tree(), and bpp::LegacyAbstractMapping::tree_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setTree(), and bpp::LegacyProbabilisticSubstitutionMapping::setTree().
|
pure virtualinherited |
Implemented in bpp::LegacyAbstractMapping.
|
inlineoverridevirtualinherited |
Implements bpp::LegacyMappingInterface.
Definition at line 132 of file Mapping.h.
References bpp::LegacyAbstractMapping::isEmpty(), and bpp::LegacyAbstractMapping::tree_.
Referenced by bpp::LegacyAbstractMapping::setTree(), bpp::LegacyProbabilisticRewardMapping::setTree(), and bpp::LegacyProbabilisticSubstitutionMapping::setTree().
|
privateinherited |
Definition at line 93 of file Mapping.h.
Referenced by bpp::LegacyAbstractMapping::getBranchLengths(), bpp::LegacyAbstractMapping::getNodeIndex(), bpp::LegacyAbstractMapping::getNumberOfBranches(), bpp::LegacyAbstractMapping::LegacyAbstractMapping(), bpp::LegacyAbstractMapping::operator=(), and bpp::LegacyAbstractMapping::setTree().
|
privateinherited |
Definition at line 92 of file Mapping.h.
Referenced by bpp::LegacyAbstractMapping::getNumberOfSites(), bpp::LegacyAbstractMapping::operator=(), and bpp::LegacyAbstractMapping::setNumberOfSites().
|
privateinherited |
Definition at line 91 of file Mapping.h.
Referenced by bpp::LegacyAbstractMapping::getBranchLengths(), bpp::LegacyAbstractMapping::getNode(), bpp::LegacyAbstractMapping::getNodeIndex(), bpp::LegacyAbstractMapping::LegacyAbstractMapping(), bpp::LegacyAbstractMapping::operator=(), and bpp::LegacyAbstractMapping::setTree().
|
privateinherited |
Definition at line 90 of file Mapping.h.
Referenced by bpp::LegacyAbstractMapping::getSitePosition(), bpp::LegacyAbstractMapping::operator=(), bpp::LegacyAbstractMapping::setNumberOfSites(), and bpp::LegacyAbstractMapping::setSitePosition().
|
privateinherited |
Definition at line 89 of file Mapping.h.
Referenced by bpp::LegacyAbstractMapping::isEmpty(), bpp::LegacyAbstractMapping::LegacyAbstractMapping(), bpp::LegacyAbstractMapping::operator=(), bpp::LegacyAbstractMapping::setTree(), and bpp::LegacyAbstractMapping::tree().