bpp-phyl
2.2.0
|
Partial implementation of the TreeParsimonyData interface. More...
#include <Bpp/Phyl/Parsimony/AbstractTreeParsimonyData.h>
Public Member Functions | |
AbstractTreeParsimonyData (const TreeTemplate< Node > *tree) | |
AbstractTreeParsimonyData (const AbstractTreeParsimonyData &atpd) | |
AbstractTreeParsimonyData & | operator= (const AbstractTreeParsimonyData &atpd) |
virtual | ~AbstractTreeParsimonyData () |
size_t | getRootArrayPosition (size_t site) const |
unsigned int | getWeight (size_t pos) const |
const TreeTemplate< Node > * | getTree () const |
TreeParsimonyData * | clone () const =0 |
virtual size_t | getArrayPosition (int parentId, int sonId, size_t currentPosition) const =0 |
virtual TreeParsimonyNodeData & | getNodeData (int nodeId)=0 |
virtual const TreeParsimonyNodeData & | getNodeData (int nodeId) const =0 |
Protected Member Functions | |
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_ |
Partial implementation of the TreeParsimonyData interface.
This data structure provides a simple compression, by performing and storing computations only one time per identical sites.
The compression is achieved by the TreeParsimonyScore object. The correspondance between sites in the dataset and the arrays in the structures is given by the rootPatternLinks_ array: the array indice for site if given by:
Finally, the rootWeights_ array gives for each array position, the number of sites with this pattern. The global parsimony score is then given by the sum of all scores for each array position, weighted by the corresponding number of sites.
Definition at line 66 of file AbstractTreeParsimonyData.h.
|
inline |
Definition at line 75 of file AbstractTreeParsimonyData.h.
|
inline |
Definition at line 81 of file AbstractTreeParsimonyData.h.
|
inlinevirtual |
Definition at line 96 of file AbstractTreeParsimonyData.h.
|
pure virtualinherited |
Implemented in bpp::DRTreeParsimonyData.
|
pure virtualinherited |
Implemented in bpp::DRTreeParsimonyData.
|
pure virtualinherited |
Implemented in bpp::DRTreeParsimonyData.
|
pure virtualinherited |
Implemented in bpp::DRTreeParsimonyData.
|
inlinevirtual |
Implements bpp::TreeParsimonyData.
Definition at line 99 of file AbstractTreeParsimonyData.h.
References rootPatternLinks_.
Referenced by bpp::DRTreeParsimonyScore::getScoreForSite().
|
inlinevirtual |
Implements bpp::TreeParsimonyData.
Definition at line 109 of file AbstractTreeParsimonyData.h.
References tree_.
|
inlineprotected |
Definition at line 113 of file AbstractTreeParsimonyData.h.
References tree_.
Referenced by bpp::DRTreeParsimonyData::reInit().
|
inline |
Definition at line 104 of file AbstractTreeParsimonyData.h.
References rootWeights_.
Referenced by bpp::DRTreeParsimonyScore::getScore().
|
inline |
Definition at line 87 of file AbstractTreeParsimonyData.h.
References rootPatternLinks_, rootWeights_, and tree_.
Referenced by bpp::DRTreeParsimonyData::operator=().
|
inlineprotected |
Definition at line 112 of file AbstractTreeParsimonyData.h.
References tree_.
Referenced by bpp::DRTreeParsimonyData::setTree().
|
protected |
Definition at line 70 of file AbstractTreeParsimonyData.h.
Referenced by getRootArrayPosition(), and operator=().
|
protected |
Definition at line 71 of file AbstractTreeParsimonyData.h.
Referenced by getWeight(), and operator=().
|
protected |
Definition at line 72 of file AbstractTreeParsimonyData.h.
Referenced by getTree(), getTreeP_(), operator=(), bpp::DRTreeParsimonyData::setTree(), and setTreeP_().