bpp-phyl3
3.0.0
|
Parsimony data structure for double-recursive (DR) algorithm. More...
#include <Bpp/Phyl/Parsimony/DRTreeParsimonyData.h>
Public Member Functions | |
DRTreeParsimonyData (std::shared_ptr< const TreeTemplate< Node >> tree) | |
DRTreeParsimonyData (const DRTreeParsimonyData &data) | |
DRTreeParsimonyData & | operator= (const DRTreeParsimonyData &data) |
virtual | ~DRTreeParsimonyData () |
DRTreeParsimonyData * | clone () const override |
void | setTree (std::shared_ptr< const TreeTemplate< Node >> tree) |
Set the tree associated to the data. More... | |
DRTreeParsimonyNodeData & | nodeData (int nodeId) override |
const DRTreeParsimonyNodeData & | nodeData (int nodeId) const override |
DRTreeParsimonyLeafData & | leafData (int nodeId) |
const DRTreeParsimonyLeafData & | leafData (int nodeId) const |
std::vector< Bitset > & | getBitsetsArray (int nodeId, int neighborId) |
const std::vector< Bitset > & | getBitsetsArray (int nodeId, int neighborId) const |
std::vector< unsigned int > & | getScoresArray (int nodeId, int neighborId) |
const std::vector< unsigned int > & | getScoresArray (int nodeId, int neighborId) const |
size_t | getArrayPosition (int parentId, int sonId, size_t currentPosition) const override |
std::vector< Bitset > & | getRootBitsets () |
const std::vector< Bitset > & | getRootBitsets () const |
const Bitset & | getRootBitset (size_t i) const |
std::vector< unsigned int > & | getRootScores () |
const std::vector< unsigned int > & | getRootScores () const |
unsigned int | getRootScore (size_t i) const |
size_t | getNumberOfDistinctSites () const |
size_t | getNumberOfSites () const |
size_t | getNumberOfStates () const |
void | init (std::shared_ptr< const SiteContainerInterface > sites, std::shared_ptr< const StateMapInterface > stateMap) |
void | reInit () |
size_t | getRootArrayPosition (size_t site) const override |
unsigned int | getWeight (size_t pos) const |
const TreeTemplate< Node > & | tree () const override |
std::shared_ptr< const TreeTemplate< Node > > | getTree () const override |
Protected Member Functions | |
void | init_ (const Node *node, std::shared_ptr< const SiteContainerInterface > sites, std::shared_ptr< const StateMapInterface > stateMap) |
void | reInit_ (const Node *node) |
Protected Attributes | |
std::vector< size_t > | rootPatternLinks_ |
std::vector< unsigned int > | rootWeights_ |
std::shared_ptr< const TreeTemplate< Node > > | tree_ |
Private Attributes | |
std::map< int, DRTreeParsimonyNodeData > | nodeData_ |
std::map< int, DRTreeParsimonyLeafData > | leafData_ |
std::vector< Bitset > | rootBitsets_ |
std::vector< unsigned int > | rootScores_ |
std::unique_ptr< SiteContainerInterface > | shrunkData_ |
size_t | nbSites_ |
size_t | nbStates_ |
size_t | nbDistinctSites_ |
Parsimony data structure for double-recursive (DR) algorithm.
States are coded using bitsets for faster computing (
The dataset is first compressed, removing all identical sites. The resulting dataset is stored in shrunkData_. The corresponding positions are stored in rootPatternLinks_, inherited from AbstractTreeParsimonyData.
Definition at line 160 of file DRTreeParsimonyData.h.
|
inline |
Definition at line 174 of file DRTreeParsimonyData.h.
Referenced by clone().
DRTreeParsimonyData::DRTreeParsimonyData | ( | const DRTreeParsimonyData & | data | ) |
Definition at line 16 of file DRTreeParsimonyData.cpp.
References shrunkData_.
|
inlinevirtual |
Definition at line 190 of file DRTreeParsimonyData.h.
|
inlineoverridevirtual |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 192 of file DRTreeParsimonyData.h.
References DRTreeParsimonyData().
|
inlineoverridevirtual |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 255 of file DRTreeParsimonyData.h.
|
inline |
Definition at line 237 of file DRTreeParsimonyData.h.
References nodeData_.
|
inline |
Definition at line 241 of file DRTreeParsimonyData.h.
References nodeData_.
|
inline |
Definition at line 268 of file DRTreeParsimonyData.h.
References nbDistinctSites_.
|
inline |
Definition at line 269 of file DRTreeParsimonyData.h.
References nbSites_.
|
inline |
Definition at line 270 of file DRTreeParsimonyData.h.
References nbStates_.
|
inlineoverridevirtualinherited |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 64 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::rootPatternLinks_.
|
inline |
Definition at line 262 of file DRTreeParsimonyData.h.
References rootBitsets_.
|
inline |
Definition at line 260 of file DRTreeParsimonyData.h.
References rootBitsets_.
|
inline |
Definition at line 261 of file DRTreeParsimonyData.h.
References rootBitsets_.
|
inline |
Definition at line 266 of file DRTreeParsimonyData.h.
References rootScores_.
|
inline |
Definition at line 264 of file DRTreeParsimonyData.h.
References rootScores_.
|
inline |
Definition at line 265 of file DRTreeParsimonyData.h.
References rootScores_.
|
inline |
Definition at line 246 of file DRTreeParsimonyData.h.
References nodeData_.
|
inline |
Definition at line 250 of file DRTreeParsimonyData.h.
References nodeData_.
|
inlineoverridevirtualinherited |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 76 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::tree_.
|
inlineinherited |
Definition at line 69 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::rootWeights_.
void DRTreeParsimonyData::init | ( | std::shared_ptr< const SiteContainerInterface > | sites, |
std::shared_ptr< const StateMapInterface > | stateMap | ||
) |
Definition at line 52 of file DRTreeParsimonyData.cpp.
References bpp::SitePatterns::getIndices(), bpp::SitePatterns::getSites(), bpp::SitePatterns::getWeights(), init_(), nbDistinctSites_, nbSites_, nbStates_, rootBitsets_, bpp::AbstractTreeParsimonyData::rootPatternLinks_, rootScores_, bpp::AbstractTreeParsimonyData::rootWeights_, shrunkData_, and bpp::AbstractTreeParsimonyData::tree().
|
protected |
Definition at line 85 of file DRTreeParsimonyData.cpp.
References bpp::DRTreeParsimonyNodeData::eraseNeighborArrays(), bpp::DRTreeParsimonyLeafData::getBitsetsArray(), bpp::DRTreeParsimonyNodeData::getBitsetsArrayForNeighbor(), bpp::Node::getId(), bpp::Node::getName(), bpp::Node::getNumberOfSons(), bpp::DRTreeParsimonyNodeData::getScoresArrayForNeighbor(), bpp::Node::getSon(), bpp::Sequence::getValue(), bpp::Node::hasFather(), bpp::Node::isLeaf(), leafData(), leafData_, nbDistinctSites_, nbStates_, nodeData(), nodeData_, bpp::DRTreeParsimonyNodeData::setNode(), and bpp::DRTreeParsimonyLeafData::setNode().
Referenced by init().
|
inline |
|
inline |
Definition at line 232 of file DRTreeParsimonyData.h.
References leafData_.
|
inlineoverridevirtual |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 223 of file DRTreeParsimonyData.h.
References nodeData_.
|
inlineoverridevirtual |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 219 of file DRTreeParsimonyData.h.
References nodeData_.
DRTreeParsimonyData & DRTreeParsimonyData::operator= | ( | const DRTreeParsimonyData & | data | ) |
Definition at line 33 of file DRTreeParsimonyData.cpp.
References leafData_, nbDistinctSites_, nbSites_, nbStates_, nodeData_, bpp::AbstractTreeParsimonyData::operator=(), rootBitsets_, rootScores_, and shrunkData_.
void DRTreeParsimonyData::reInit | ( | ) |
Definition at line 155 of file DRTreeParsimonyData.cpp.
References reInit_(), and bpp::AbstractTreeParsimonyData::tree().
|
protected |
Definition at line 162 of file DRTreeParsimonyData.cpp.
References bpp::DRTreeParsimonyNodeData::eraseNeighborArrays(), bpp::DRTreeParsimonyNodeData::getBitsetsArrayForNeighbor(), bpp::Node::getId(), bpp::Node::getNumberOfSons(), bpp::DRTreeParsimonyNodeData::getScoresArrayForNeighbor(), bpp::Node::getSon(), bpp::Node::hasFather(), bpp::Node::isLeaf(), nbDistinctSites_, nodeData(), nodeData_, and bpp::DRTreeParsimonyNodeData::setNode().
Referenced by reInit().
|
inline |
Set the tree associated to the data.
All node data will be actualized accordingly by calling the setNode() method on the corresponding nodes.
tree | The tree to be associated to this data. |
Definition at line 204 of file DRTreeParsimonyData.h.
References leafData_, nodeData_, bpp::AbstractTreeParsimonyData::setTree(), bpp::AbstractTreeParsimonyData::tree(), and bpp::AbstractTreeParsimonyData::tree_.
|
inlineoverridevirtualinherited |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 74 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::tree_.
Referenced by init(), reInit(), bpp::AbstractTreeParsimonyData::setTree(), and setTree().
|
mutableprivate |
Definition at line 165 of file DRTreeParsimonyData.h.
Referenced by init_(), leafData(), operator=(), and setTree().
|
private |
Definition at line 171 of file DRTreeParsimonyData.h.
Referenced by getNumberOfDistinctSites(), init(), init_(), operator=(), and reInit_().
|
private |
Definition at line 169 of file DRTreeParsimonyData.h.
Referenced by getNumberOfSites(), init(), and operator=().
|
private |
Definition at line 170 of file DRTreeParsimonyData.h.
Referenced by getNumberOfStates(), init(), init_(), and operator=().
|
mutableprivate |
Definition at line 164 of file DRTreeParsimonyData.h.
Referenced by getBitsetsArray(), getScoresArray(), init_(), nodeData(), operator=(), reInit_(), and setTree().
|
mutableprivate |
Definition at line 166 of file DRTreeParsimonyData.h.
Referenced by getRootBitset(), getRootBitsets(), init(), and operator=().
|
protectedinherited |
Definition at line 35 of file AbstractTreeParsimonyData.h.
Referenced by bpp::AbstractTreeParsimonyData::getRootArrayPosition(), init(), and bpp::AbstractTreeParsimonyData::operator=().
|
mutableprivate |
Definition at line 167 of file DRTreeParsimonyData.h.
Referenced by getRootScore(), getRootScores(), init(), and operator=().
|
protectedinherited |
Definition at line 36 of file AbstractTreeParsimonyData.h.
Referenced by bpp::AbstractTreeParsimonyData::getWeight(), init(), and bpp::AbstractTreeParsimonyData::operator=().
|
private |
Definition at line 168 of file DRTreeParsimonyData.h.
Referenced by DRTreeParsimonyData(), init(), and operator=().
|
protectedinherited |
Definition at line 37 of file AbstractTreeParsimonyData.h.
Referenced by bpp::AbstractTreeParsimonyData::getTree(), bpp::AbstractTreeParsimonyData::operator=(), bpp::AbstractTreeParsimonyData::setTree(), setTree(), and bpp::AbstractTreeParsimonyData::tree().