|
bpp-phyl3 3.0.0
|
Partial implementation of the mapping interface. More...
#include <Bpp/Phyl/Legacy/Mapping/Mapping.h>
Inheritance diagram for bpp::LegacyAbstractMapping:
Collaboration diagram for bpp::LegacyAbstractMapping:Public Member Functions | |
| LegacyAbstractMapping (const Tree &tree) | |
| LegacyAbstractMapping (const LegacyAbstractMapping &absm) | |
| LegacyAbstractMapping & | operator= (const LegacyAbstractMapping &absm) |
| LegacyAbstractMapping * | clone () const override=0 |
| virtual | ~LegacyAbstractMapping () |
| 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 mapping interface.
This implementation copies the input tree in a TreeTemplate<Node> object.
|
inline |
Definition at line 96 of file Mapping.h.
References nbBranches_, nodes_, and tree_.
|
inline |
|
inlinevirtual |
|
overridepure virtual |
|
inlineoverridevirtual |
Implements bpp::LegacyMappingInterface.
Definition at line 174 of file Mapping.h.
References nbBranches_, and nodes_.
|
inlinevirtual |
Definition at line 162 of file Mapping.h.
References nodes_.
Referenced by bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
inlineoverridevirtual |
| nodeId | An id of the node to look for in the map. |
Implements bpp::LegacyMappingInterface.
Definition at line 184 of file Mapping.h.
References nbBranches_, nodes_, and bpp::TextTools::toString().
Referenced by bpp::LegacyProbabilisticSubstitutionMapping::getNumberOfSubstitutions(), bpp::LegacyProbabilisticRewardMapping::getReward(), bpp::LegacyRewardMappingTools::readFromStream(), and bpp::LegacySubstitutionMappingTools::readFromStream().
|
inlineoverridevirtual |
Implements bpp::LegacyMappingInterface.
Definition at line 160 of file Mapping.h.
References nbBranches_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setNumberOfSites(), bpp::LegacyProbabilisticSubstitutionMapping::setNumberOfSites(), bpp::LegacyProbabilisticRewardMapping::setTree(), bpp::LegacyProbabilisticSubstitutionMapping::setTree(), bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
inlineoverridevirtual |
Implements bpp::LegacyMappingInterface.
Definition at line 158 of file Mapping.h.
References nbSites_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setTree(), bpp::LegacyProbabilisticSubstitutionMapping::setTree(), bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
inlineoverridevirtual |
| index | The site index. |
Implements bpp::LegacyMappingInterface.
Definition at line 146 of file Mapping.h.
References isEmpty(), and sitesPositions_.
|
inlineoverridevirtual |
Implements bpp::LegacyMappingInterface.
Definition at line 130 of file Mapping.h.
References tree_.
Referenced by getSitePosition(), setSitePosition(), and tree().
|
inline |
Definition at line 114 of file Mapping.h.
References nbBranches_, nbSites_, nodes_, sitesPositions_, and tree_.
|
inlinevirtual |
Reimplemented in bpp::LegacyProbabilisticRewardMapping, and bpp::LegacyProbabilisticSubstitutionMapping.
Definition at line 164 of file Mapping.h.
References nbSites_, and sitesPositions_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setNumberOfSites(), and bpp::LegacyProbabilisticSubstitutionMapping::setNumberOfSites().
|
inlineoverridevirtual |
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 isEmpty(), and sitesPositions_.
Referenced by bpp::LegacyRewardMappingTools::readFromStream(), and bpp::LegacySubstitutionMappingTools::readFromStream().
|
inline |
Definition at line 138 of file Mapping.h.
References nbBranches_, nodes_, tree(), and tree_.
Referenced by bpp::LegacyProbabilisticRewardMapping::setTree(), and bpp::LegacyProbabilisticSubstitutionMapping::setTree().
|
inlineoverridevirtual |
Implements bpp::LegacyMappingInterface.
Definition at line 132 of file Mapping.h.
References isEmpty(), and tree_.
Referenced by setTree(), bpp::LegacyProbabilisticRewardMapping::setTree(), and bpp::LegacyProbabilisticSubstitutionMapping::setTree().
|
private |
Definition at line 93 of file Mapping.h.
Referenced by getBranchLengths(), getNodeIndex(), getNumberOfBranches(), LegacyAbstractMapping(), operator=(), and setTree().
|
private |
Definition at line 92 of file Mapping.h.
Referenced by getNumberOfSites(), operator=(), and setNumberOfSites().
|
private |
Definition at line 91 of file Mapping.h.
Referenced by getBranchLengths(), getNode(), getNodeIndex(), LegacyAbstractMapping(), operator=(), and setTree().
|
private |
Definition at line 90 of file Mapping.h.
Referenced by getSitePosition(), operator=(), setNumberOfSites(), and setSitePosition().
|
private |
Definition at line 89 of file Mapping.h.
Referenced by isEmpty(), LegacyAbstractMapping(), operator=(), setTree(), and tree().