bpp-phyl
2.2.0
|
Parsimony data structure for double-recursive (DR) algorithm. More...
#include <Bpp/Phyl/Parsimony/DRTreeParsimonyData.h>
Public Member Functions | |
DRTreeParsimonyData (const TreeTemplate< Node > *tree) | |
DRTreeParsimonyData (const DRTreeParsimonyData &data) | |
DRTreeParsimonyData & | operator= (const DRTreeParsimonyData &data) |
virtual | ~DRTreeParsimonyData () |
DRTreeParsimonyData * | clone () const |
void | setTree (const TreeTemplate< Node > *tree) |
Set the tree associated to the data. More... | |
DRTreeParsimonyNodeData & | getNodeData (int nodeId) |
const DRTreeParsimonyNodeData & | getNodeData (int nodeId) const |
DRTreeParsimonyLeafData & | getLeafData (int nodeId) |
const DRTreeParsimonyLeafData & | getLeafData (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 |
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 (const SiteContainer &sites, const StateMap &stateMap) throw (Exception) |
void | reInit () throw (Exception) |
size_t | getRootArrayPosition (size_t site) const |
unsigned int | getWeight (size_t pos) const |
const TreeTemplate< Node > * | getTree () const |
Protected Member Functions | |
void | init (const Node *node, const SiteContainer &sites, const StateMap &stateMap) throw (Exception) |
void | reInit (const Node *node) throw (Exception) |
void | setTreeP_ (const TreeTemplate< Node > *tree) |
const TreeTemplate< Node > * | getTreeP_ () const |
Protected Attributes | |
std::vector< size_t > | rootPatternLinks_ |
std::vector< unsigned int > | rootWeights_ |
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_ |
SiteContainer * | 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 195 of file DRTreeParsimonyData.h.
|
inline |
Definition at line 209 of file DRTreeParsimonyData.h.
Referenced by clone().
DRTreeParsimonyData::DRTreeParsimonyData | ( | const DRTreeParsimonyData & | data | ) |
Definition at line 52 of file DRTreeParsimonyData.cpp.
References shrunkData_.
|
inlinevirtual |
Definition at line 225 of file DRTreeParsimonyData.h.
References shrunkData_.
|
inlinevirtual |
Implements bpp::TreeParsimonyData.
Definition at line 227 of file DRTreeParsimonyData.h.
References DRTreeParsimonyData().
Referenced by bpp::DRTreeParsimonyScore::operator=().
|
inlinevirtual |
Implements bpp::TreeParsimonyData.
Definition at line 290 of file DRTreeParsimonyData.h.
|
inline |
Definition at line 272 of file DRTreeParsimonyData.h.
References nodeData_.
|
inline |
Definition at line 276 of file DRTreeParsimonyData.h.
References nodeData_.
|
inline |
Definition at line 263 of file DRTreeParsimonyData.h.
References leafData_.
Referenced by bpp::DRTreeParsimonyScore::computeScoresPostorder(), and bpp::DRTreeParsimonyScore::computeScoresPreorder().
|
inline |
Definition at line 267 of file DRTreeParsimonyData.h.
References leafData_.
|
inlinevirtual |
Implements bpp::TreeParsimonyData.
Definition at line 254 of file DRTreeParsimonyData.h.
References nodeData_.
Referenced by bpp::DRTreeParsimonyScore::computeScores(), bpp::DRTreeParsimonyScore::computeScoresPostorder(), and bpp::DRTreeParsimonyScore::computeScoresPreorder().
|
inlinevirtual |
Implements bpp::TreeParsimonyData.
Definition at line 258 of file DRTreeParsimonyData.h.
References nodeData_.
|
inline |
Definition at line 303 of file DRTreeParsimonyData.h.
References nbDistinctSites_.
|
inline |
Definition at line 304 of file DRTreeParsimonyData.h.
References nbSites_.
|
inline |
Definition at line 305 of file DRTreeParsimonyData.h.
References nbStates_.
|
inlinevirtualinherited |
Implements bpp::TreeParsimonyData.
Definition at line 99 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::rootPatternLinks_.
Referenced by bpp::DRTreeParsimonyScore::getScoreForSite().
|
inline |
Definition at line 297 of file DRTreeParsimonyData.h.
References rootBitsets_.
|
inline |
Definition at line 295 of file DRTreeParsimonyData.h.
References rootBitsets_.
Referenced by bpp::DRTreeParsimonyScore::computeScores().
|
inline |
Definition at line 296 of file DRTreeParsimonyData.h.
References rootBitsets_.
|
inline |
Definition at line 301 of file DRTreeParsimonyData.h.
References rootScores_.
Referenced by bpp::DRTreeParsimonyScore::getScore(), and bpp::DRTreeParsimonyScore::getScoreForSite().
|
inline |
Definition at line 299 of file DRTreeParsimonyData.h.
References rootScores_.
Referenced by bpp::DRTreeParsimonyScore::computeScores().
|
inline |
Definition at line 300 of file DRTreeParsimonyData.h.
References rootScores_.
|
inline |
Definition at line 281 of file DRTreeParsimonyData.h.
References nodeData_.
|
inline |
Definition at line 285 of file DRTreeParsimonyData.h.
References nodeData_.
|
inlinevirtualinherited |
Implements bpp::TreeParsimonyData.
Definition at line 109 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::tree_.
|
inlineprotectedinherited |
Definition at line 113 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::tree_.
Referenced by reInit().
|
inlineinherited |
Definition at line 104 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::rootWeights_.
Referenced by bpp::DRTreeParsimonyScore::getScore().
void DRTreeParsimonyData::init | ( | const SiteContainer & | sites, |
const StateMap & | stateMap | ||
) | |||
throw | ( | Exception | |
) |
Definition at line 90 of file DRTreeParsimonyData.cpp.
References bpp::SitePatterns::getIndices(), bpp::SitePatterns::getSites(), and bpp::SitePatterns::getWeights().
|
protected |
Definition at line 112 of file DRTreeParsimonyData.cpp.
References bpp::DRTreeParsimonyNodeData::eraseNeighborArrays(), bpp::DRTreeParsimonyLeafData::getBitsetsArray(), bpp::DRTreeParsimonyNodeData::getBitsetsArrayForNeighbor(), bpp::Node::getId(), bpp::DRTreeParsimonyNodeData::getScoresArrayForNeighbor(), bpp::DRTreeParsimonyNodeData::setNode(), and bpp::DRTreeParsimonyLeafData::setNode().
DRTreeParsimonyData & DRTreeParsimonyData::operator= | ( | const DRTreeParsimonyData & | data | ) |
Definition at line 71 of file DRTreeParsimonyData.cpp.
References leafData_, nbDistinctSites_, nbSites_, nbStates_, nodeData_, bpp::AbstractTreeParsimonyData::operator=(), rootBitsets_, rootScores_, and shrunkData_.
void DRTreeParsimonyData::reInit | ( | ) | ||
throw | ( | Exception | ||
) |
Definition at line 178 of file DRTreeParsimonyData.cpp.
References bpp::AbstractTreeParsimonyData::getTreeP_().
Referenced by bpp::DRTreeParsimonyScore::topologyChangeTested().
|
protected |
Definition at line 184 of file DRTreeParsimonyData.cpp.
References bpp::DRTreeParsimonyNodeData::eraseNeighborArrays(), bpp::DRTreeParsimonyNodeData::getBitsetsArrayForNeighbor(), bpp::Node::getId(), bpp::DRTreeParsimonyNodeData::getScoresArrayForNeighbor(), and bpp::DRTreeParsimonyNodeData::setNode().
|
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 239 of file DRTreeParsimonyData.h.
References leafData_, nodeData_, bpp::AbstractTreeParsimonyData::setTreeP_(), and bpp::AbstractTreeParsimonyData::tree_.
Referenced by bpp::DRTreeParsimonyScore::DRTreeParsimonyScore(), and bpp::DRTreeParsimonyScore::operator=().
|
inlineprotectedinherited |
Definition at line 112 of file AbstractTreeParsimonyData.h.
References bpp::AbstractTreeParsimonyData::tree_.
Referenced by setTree().
|
mutableprivate |
Definition at line 200 of file DRTreeParsimonyData.h.
Referenced by getLeafData(), operator=(), and setTree().
|
private |
Definition at line 206 of file DRTreeParsimonyData.h.
Referenced by getNumberOfDistinctSites(), and operator=().
|
private |
Definition at line 204 of file DRTreeParsimonyData.h.
Referenced by getNumberOfSites(), and operator=().
|
private |
Definition at line 205 of file DRTreeParsimonyData.h.
Referenced by getNumberOfStates(), and operator=().
|
mutableprivate |
Definition at line 199 of file DRTreeParsimonyData.h.
Referenced by getBitsetsArray(), getNodeData(), getScoresArray(), operator=(), and setTree().
|
mutableprivate |
Definition at line 201 of file DRTreeParsimonyData.h.
Referenced by getRootBitset(), getRootBitsets(), and operator=().
|
protectedinherited |
Definition at line 70 of file AbstractTreeParsimonyData.h.
Referenced by bpp::AbstractTreeParsimonyData::getRootArrayPosition(), and bpp::AbstractTreeParsimonyData::operator=().
|
mutableprivate |
Definition at line 202 of file DRTreeParsimonyData.h.
Referenced by getRootScore(), getRootScores(), and operator=().
|
protectedinherited |
Definition at line 71 of file AbstractTreeParsimonyData.h.
Referenced by bpp::AbstractTreeParsimonyData::getWeight(), and bpp::AbstractTreeParsimonyData::operator=().
|
private |
Definition at line 203 of file DRTreeParsimonyData.h.
Referenced by DRTreeParsimonyData(), operator=(), and ~DRTreeParsimonyData().
|
protectedinherited |
Definition at line 72 of file AbstractTreeParsimonyData.h.
Referenced by bpp::AbstractTreeParsimonyData::getTree(), bpp::AbstractTreeParsimonyData::getTreeP_(), bpp::AbstractTreeParsimonyData::operator=(), setTree(), and bpp::AbstractTreeParsimonyData::setTreeP_().