bpp-phyl
2.2.0
|
Compute several quantities on a tree simulateously, optimizing the recursions on the tree. More...
#include <Bpp/Phyl/PhyloStatistics.h>
Public Member Functions | |
PhyloStatistics () | |
virtual | ~PhyloStatistics () |
Clonable * | clone () const |
void | setTree (const Tree &tree) |
Compute statistics for a given input tree. More... | |
size_t | getNumberOfLeaves () const |
size_t | getNumberOfAncestors () const |
const std::vector< double > & | getBranchLengths () const |
const std::vector< double > & | getNodeHeights () const |
const std::vector< size_t > & | getNodeDepths () const |
const std::vector< size_t > & | getNodeNumberOfSons () const |
const std::vector< int > & | getNodeIds () const |
Private Member Functions | |
void | computeForSubtree_ (const Node *node, double &height, size_t &depth) |
Private Attributes | |
size_t | numberOfLeaves_ |
size_t | numberOfAncestors_ |
std::vector< double > | branchLengths_ |
std::vector< double > | nodeHeights_ |
std::vector< size_t > | nodeDepths_ |
std::vector< size_t > | nodeNumberOfSons_ |
std::vector< int > | nodeIds_ |
Compute several quantities on a tree simulateously, optimizing the recursions on the tree.
This class uses a TreeTemplate. If the input tree is not a TreeTemplate, then a copy is performed before any computation.
Definition at line 60 of file PhyloStatistics.h.
|
inline |
Definition at line 73 of file PhyloStatistics.h.
Referenced by clone().
|
inlinevirtual |
Definition at line 77 of file PhyloStatistics.h.
|
inline |
Definition at line 84 of file PhyloStatistics.h.
References PhyloStatistics().
|
private |
Definition at line 73 of file PhyloStatistics.cpp.
References bpp::Node::getDistanceToFather(), bpp::Node::getNumberOfSons(), bpp::Node::hasDistanceToFather(), and bpp::Node::isLeaf().
|
inline |
Definition at line 95 of file PhyloStatistics.h.
References branchLengths_.
|
inline |
Definition at line 97 of file PhyloStatistics.h.
References nodeDepths_.
|
inline |
Definition at line 96 of file PhyloStatistics.h.
References nodeHeights_.
|
inline |
Definition at line 99 of file PhyloStatistics.h.
References nodeIds_.
|
inline |
Definition at line 98 of file PhyloStatistics.h.
References nodeNumberOfSons_.
|
inline |
Definition at line 94 of file PhyloStatistics.h.
References numberOfAncestors_.
|
inline |
Definition at line 93 of file PhyloStatistics.h.
References numberOfLeaves_.
void PhyloStatistics::setTree | ( | const Tree & | tree | ) |
Compute statistics for a given input tree.
tree | The tree for which the statistics should be computed. |
Definition at line 47 of file PhyloStatistics.cpp.
References bpp::TreeTemplate< N >::getRootNode().
|
private |
Definition at line 66 of file PhyloStatistics.h.
Referenced by getBranchLengths().
|
private |
Definition at line 68 of file PhyloStatistics.h.
Referenced by getNodeDepths().
|
private |
Definition at line 67 of file PhyloStatistics.h.
Referenced by getNodeHeights().
|
private |
Definition at line 70 of file PhyloStatistics.h.
Referenced by getNodeIds().
|
private |
Definition at line 69 of file PhyloStatistics.h.
Referenced by getNodeNumberOfSons().
|
private |
Definition at line 65 of file PhyloStatistics.h.
Referenced by getNumberOfAncestors().
|
private |
Definition at line 64 of file PhyloStatistics.h.
Referenced by getNumberOfLeaves().