bpp-phyl3
3.0.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 () |
PhyloStatistics * | 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 25 of file PhyloStatistics.h.
|
inline |
Definition at line 38 of file PhyloStatistics.h.
Referenced by clone().
|
inlinevirtual |
Definition at line 42 of file PhyloStatistics.h.
|
inlinevirtual |
Implements bpp::Clonable.
Definition at line 44 of file PhyloStatistics.h.
References PhyloStatistics().
|
private |
Definition at line 39 of file PhyloStatistics.cpp.
References bpp::Node::getDistanceToFather(), bpp::Node::getNumberOfSons(), bpp::Node::hasDistanceToFather(), bpp::Node::isLeaf(), and bpp::log().
|
inline |
Definition at line 55 of file PhyloStatistics.h.
References branchLengths_.
|
inline |
Definition at line 57 of file PhyloStatistics.h.
References nodeDepths_.
|
inline |
Definition at line 56 of file PhyloStatistics.h.
References nodeHeights_.
|
inline |
Definition at line 59 of file PhyloStatistics.h.
References nodeIds_.
|
inline |
Definition at line 58 of file PhyloStatistics.h.
References nodeNumberOfSons_.
|
inline |
Definition at line 54 of file PhyloStatistics.h.
References numberOfAncestors_.
|
inline |
Definition at line 53 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 12 of file PhyloStatistics.cpp.
References bpp::TreeTemplate< N >::getRootNode().
|
private |
Definition at line 31 of file PhyloStatistics.h.
Referenced by getBranchLengths().
|
private |
Definition at line 33 of file PhyloStatistics.h.
Referenced by getNodeDepths().
|
private |
Definition at line 32 of file PhyloStatistics.h.
Referenced by getNodeHeights().
|
private |
Definition at line 35 of file PhyloStatistics.h.
Referenced by getNodeIds().
|
private |
Definition at line 34 of file PhyloStatistics.h.
Referenced by getNodeNumberOfSons().
|
private |
Definition at line 30 of file PhyloStatistics.h.
Referenced by getNumberOfAncestors().
|
private |
Definition at line 29 of file PhyloStatistics.h.
Referenced by getNumberOfLeaves().