14 const Tree* treeP = &tree;
25 numberOfAncestors_ = 0;
26 branchLengths_.clear();
29 nodeNumberOfSons_.clear();
52 const Node* son = (*node)[
static_cast<int>(i)];
60 computeForSubtree_(son, subHeight, subDepth);
63 if (subHeight > height)
72 branchLengths_.push_back(
log(0));
74 nodeHeights_.push_back(height);
75 nodeDepths_.push_back(depth);
The phylogenetic node class.
virtual bool hasDistanceToFather() const
Tell is this node has a distance to the father.
virtual bool isLeaf() const
virtual double getDistanceToFather() const
Get the distance to the father node is there is one, otherwise throw a NodeException.
virtual size_t getNumberOfSons() const
void computeForSubtree_(const Node *node, double &height, size_t &depth)
void setTree(const Tree &tree)
Compute statistics for a given input tree.
The phylogenetic tree class.
virtual N * getRootNode()
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.
double log(const ExtendedFloat &ef)