bpp-phyl3
3.0.0
|
Partial implementation of the TreeParsimonyData interface. More...
#include <Bpp/Phyl/Parsimony/AbstractTreeParsimonyData.h>
Public Member Functions | |
AbstractTreeParsimonyData (std::shared_ptr< const TreeTemplate< Node >> tree) | |
AbstractTreeParsimonyData (const AbstractTreeParsimonyData &atpd) | |
AbstractTreeParsimonyData & | operator= (const AbstractTreeParsimonyData &atpd) |
virtual | ~AbstractTreeParsimonyData () |
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 |
TreeParsimonyDataInterface * | clone () const override=0 |
virtual size_t | getArrayPosition (int parentId, int sonId, size_t currentPosition) const =0 |
virtual TreeParsimonyNodeDataInterface & | nodeData (int nodeId)=0 |
virtual const TreeParsimonyNodeDataInterface & | nodeData (int nodeId) const =0 |
Protected Member Functions | |
void | setTree (std::shared_ptr< const TreeTemplate< Node >> tree) |
Protected Attributes | |
std::vector< size_t > | rootPatternLinks_ |
std::vector< unsigned int > | rootWeights_ |
std::shared_ptr< 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 correspondence 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 31 of file AbstractTreeParsimonyData.h.
|
inline |
Definition at line 40 of file AbstractTreeParsimonyData.h.
|
inline |
Definition at line 46 of file AbstractTreeParsimonyData.h.
|
inlinevirtual |
Definition at line 61 of file AbstractTreeParsimonyData.h.
|
overridepure virtualinherited |
Implements bpp::Clonable.
Implemented in bpp::DRTreeParsimonyData.
|
pure virtualinherited |
Implemented in bpp::DRTreeParsimonyData.
|
inlineoverridevirtual |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 64 of file AbstractTreeParsimonyData.h.
References rootPatternLinks_.
|
inlineoverridevirtual |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 76 of file AbstractTreeParsimonyData.h.
References tree_.
|
inline |
Definition at line 69 of file AbstractTreeParsimonyData.h.
References rootWeights_.
|
pure virtualinherited |
Implemented in bpp::DRTreeParsimonyData.
|
pure virtualinherited |
Implemented in bpp::DRTreeParsimonyData.
|
inline |
Definition at line 52 of file AbstractTreeParsimonyData.h.
References rootPatternLinks_, rootWeights_, and tree_.
Referenced by bpp::DRTreeParsimonyData::operator=().
|
inlineprotected |
Definition at line 79 of file AbstractTreeParsimonyData.h.
Referenced by bpp::DRTreeParsimonyData::setTree().
|
inlineoverridevirtual |
Implements bpp::TreeParsimonyDataInterface.
Definition at line 74 of file AbstractTreeParsimonyData.h.
References tree_.
Referenced by bpp::DRTreeParsimonyData::init(), bpp::DRTreeParsimonyData::reInit(), setTree(), and bpp::DRTreeParsimonyData::setTree().
|
protected |
Definition at line 35 of file AbstractTreeParsimonyData.h.
Referenced by getRootArrayPosition(), bpp::DRTreeParsimonyData::init(), and operator=().
|
protected |
Definition at line 36 of file AbstractTreeParsimonyData.h.
Referenced by getWeight(), bpp::DRTreeParsimonyData::init(), and operator=().
|
protected |
Definition at line 37 of file AbstractTreeParsimonyData.h.
Referenced by getTree(), operator=(), setTree(), bpp::DRTreeParsimonyData::setTree(), and tree().