bpp-phyl3
3.0.0
|
The phylogenetic node class. More...
#include <Bpp/Phyl/Tree/Node.h>
Public Member Functions | |
Node () | |
Build a new void Node object. More... | |
Node (int id) | |
Build a new Node with specified id. More... | |
Node (const std::string &name) | |
Build a new Node with specified name. More... | |
Node (int id, const std::string &name) | |
Build a new Node with specified id and name. More... | |
Node (const Node &node) | |
Copy constructor. More... | |
Node & | operator= (const Node &node) |
Assignation operator. More... | |
Node * | clone () const |
virtual | ~Node () |
void | addSubTree (const PhyloTree &tree, std::shared_ptr< PhyloNode > phyloNode) |
std::vector< const Node * > | getNeighbors () const |
std::vector< Node * > | getNeighbors () |
virtual size_t | degree () const |
virtual bool | operator== (const Node &node) const |
virtual bool | isLeaf () const |
virtual bool | hasNoSon () const |
Identity | |
virtual int | getId () const |
Get the node's id. More... | |
virtual void | setId (int id) |
Set this node's id. More... | |
virtual std::vector< int > | getSonsId () const |
Name: | |
virtual std::string | getName () const |
Get the name associated to this node, if there is one, otherwise throw a NodeException. More... | |
virtual void | setName (const std::string &name) |
Give a name or update the name associated to the node. More... | |
virtual void | deleteName () |
Delete the name associated to this node (do nothing if there is no name). More... | |
virtual bool | hasName () const |
Tell is this node has a name. More... | |
Distances: | |
virtual double | getDistanceToFather () const |
Get the distance to the father node is there is one, otherwise throw a NodeException. More... | |
virtual void | setDistanceToFather (double distance) |
Set or update the distance toward the father node. More... | |
virtual void | deleteDistanceToFather () |
Delete the distance to the father node. More... | |
virtual bool | hasDistanceToFather () const |
Tell is this node has a distance to the father. More... | |
Father: | |
virtual const Node * | getFather () const |
Get the father of this node is there is one. More... | |
virtual Node * | getFather () |
Get the father of this node is there is one. More... | |
virtual int | getFatherId () const |
virtual void | setFather (Node *node) |
Set the father node of this node. More... | |
virtual Node * | removeFather () |
Remove the father of this node. More... | |
virtual bool | hasFather () const |
Tell if this node has a father node. More... | |
Sons: | |
virtual size_t | getNumberOfSons () const |
virtual std::vector< Node * > & | getSons () |
virtual const Node * | getSon (size_t pos) const |
virtual Node * | getSon (size_t pos) |
virtual void | addSon (size_t pos, Node *node) |
virtual void | addSon (Node *node) |
virtual void | setSon (size_t pos, Node *node) |
virtual Node * | removeSon (size_t pos) |
virtual void | removeSon (Node *node) |
virtual void | removeSons () |
virtual void | swap (size_t branch1, size_t branch2) |
virtual size_t | getSonPosition (const Node *son) const |
Operators: | |
| |
Node * | operator[] (int i) |
const Node * | operator[] (int i) const |
Node properties: | |
virtual void | setNodeProperty (const std::string &name, const Clonable &property) |
Set/add a node property. More... | |
virtual Clonable * | getNodeProperty (const std::string &name) |
virtual const Clonable * | getNodeProperty (const std::string &name) const |
virtual Clonable * | removeNodeProperty (const std::string &name) |
virtual void | deleteNodeProperty (const std::string &name) |
virtual void | removeNodeProperties () |
Remove all node properties. More... | |
virtual void | deleteNodeProperties () |
Delete all node properties. More... | |
virtual bool | hasNodeProperty (const std::string &name) const |
virtual std::vector< std::string > | getNodePropertyNames () const |
Branch properties: | |
virtual void | setBranchProperty (const std::string &name, const Clonable &property) |
Set/add a branch property. More... | |
virtual Clonable * | getBranchProperty (const std::string &name) |
virtual const Clonable * | getBranchProperty (const std::string &name) const |
virtual Clonable * | removeBranchProperty (const std::string &name) |
virtual void | deleteBranchProperty (const std::string &name) |
virtual void | removeBranchProperties () |
Remove all branch properties. More... | |
virtual void | deleteBranchProperties () |
Delete all branch properties. More... | |
virtual bool | hasBranchProperty (const std::string &name) const |
virtual std::vector< std::string > | getBranchPropertyNames () const |
virtual bool | hasBootstrapValue () const |
virtual double | getBootstrapValue () const |
Protected Attributes | |
int | id_ |
std::string * | name_ |
std::vector< Node * > | sons_ |
Node * | father_ |
double * | distanceToFather_ |
std::map< std::string, Clonable * > | nodeProperties_ |
std::map< std::string, Clonable * > | branchProperties_ |
The phylogenetic node class.
This class is for use with the TreeTemplate class, an implementation of the Tree interface. TreeTemplates are made made of nodes, instances of this class. Since trees are oriented (rooted), each node has one father node and possibly many son nodes. Leaves are nodes without descendant and root is defined has the without father. Inner nodes will generally contain two descendants (the tree is then called bifurcating), but mutlifurcating trees are also allowed with this kind of description. In the rooted case, each inner node also defines a subtree. This allows to work recursively on trees, which is very convenient in most cases.
This class is made the more general as possible, while keeping it very simple. It contains:
Methods are provided to help the building of trees from scratch. Trees are more easily built from root to leaves: The addSon(Node) method adds a node to the list of direct descendants of a given node. The son node will also have its father set to the current node. It is also possible to build a tree starting from the leaves using the setFather method. Changing the parent node will automatically append the current node to the son nodes of the new father.
|
inline |
Build a new void Node object.
Definition at line 73 of file Node.h.
Referenced by addSubTree(), and clone().
|
inline |
|
inline |
|
inline |
Node::Node | ( | const Node & | node | ) |
Copy constructor.
node | The node to copy. |
Copy constructor:
Definition at line 22 of file Node.cpp.
References branchProperties_, distanceToFather_, hasDistanceToFather(), hasName(), name_, and nodeProperties_.
|
inlinevirtual |
Definition at line 144 of file Node.h.
References branchProperties_, distanceToFather_, name_, and nodeProperties_.
|
inlinevirtual |
|
inlinevirtual |
Definition at line 374 of file Node.h.
References father_, and sons_.
Referenced by addSubTree(), bpp::OptimizationTools::buildDistanceTree(), bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::DRTreeParsimonyScore::doNNI(), bpp::HierarchicalClustering::finalStep(), bpp::NeighborJoining::finalStep(), bpp::PGMA::finalStep(), bpp::AbstractAgglomerativeDistanceMethod::getParentNode(), bpp::HierarchicalClustering::getParentNode(), bpp::PGMA::getParentNode(), bpp::TreeTemplateTools::getRandomTree(), bpp::TreeTemplateTools::midRoot(), bpp::Nhx::parenthesisToNode(), bpp::TreeTemplateTools::parenthesisToNode(), swap(), bpp::BipartitionList::toTree(), and bpp::TreeTemplateTools::unresolveUncertainNodes().
Sons:
Definition at line 72 of file Node.cpp.
References addSon(), addSubTree(), bpp::AssociationTreeGraphImplObserver< class, class, class >::getIncomingEdges(), bpp::AssociationTreeGraphImplObserver< class, class, class >::getNodeIndex(), bpp::AssociationTreeGraphImplObserver< class, class, class >::getSons(), Node(), setBranchProperty(), setDistanceToFather(), setId(), setName(), and setNodeProperty().
Referenced by addSubTree(), and bpp::TreeTemplateTools::buildFromPhyloTree().
|
inlinevirtual |
Definition at line 463 of file Node.h.
References getNumberOfSons(), and hasFather().
Referenced by bpp::DRTreeParsimonyScore::computeScoresForNode(), bpp::DRTreeParsimonyScore::computeScoresPostorderForNode(), bpp::DRTreeParsimonyScore::computeScoresPreorderForNode(), and isLeaf().
|
inlinevirtual |
|
inlinevirtual |
Definition at line 620 of file Node.h.
References branchProperties_, and hasBranchProperty().
Referenced by bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), and bpp::TreeTemplateTools::deleteBranchProperties().
|
inlinevirtual |
Delete the distance to the father node.
Definition at line 276 of file Node.h.
References distanceToFather_.
Referenced by bpp::TreeTemplateTools::deleteBranchLengths().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Definition at line 530 of file Node.h.
References hasNodeProperty(), and nodeProperties_.
Referenced by bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), and bpp::TreeTemplateTools::deleteNodeProperties().
|
virtual |
Definition at line 168 of file Node.cpp.
References bpp::TreeTools::BOOTSTRAP, getBranchProperty(), and hasBranchProperty().
|
inlinevirtual |
Definition at line 592 of file Node.h.
References branchProperties_, and hasBranchProperty().
Referenced by bpp::PhyloTree::addSubTree(), bpp::BootstrapValuesTreeDrawingListener::afterDrawBranch(), bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), getBootstrapValue(), bpp::TreeTemplateTools::getBranchProperties(), bpp::TreeTemplateTools::midRoot(), bpp::TreeTemplateTools::nodeToParenthesis(), bpp::Nhx::propertiesToParenthesis(), bpp::TreeTemplateTools::treeToParenthesis(), and bpp::TreeTemplateTools::unresolveUncertainNodes().
|
inlinevirtual |
Definition at line 600 of file Node.h.
References branchProperties_, and hasBranchProperty().
|
inlinevirtual |
Definition at line 655 of file Node.h.
References branchProperties_, and bpp::MapTools::getKeys().
Referenced by bpp::PhyloTree::addSubTree(), bpp::TreeTemplateTools::getBranchPropertyNames(), and bpp::TreeTemplateTools::midRoot().
|
inlinevirtual |
Get the distance to the father node is there is one, otherwise throw a NodeException.
Definition at line 250 of file Node.h.
References distanceToFather_, and hasDistanceToFather().
Referenced by bpp::PhyloTree::addSubTree(), bpp::BranchLengthsTreeDrawingListener::afterDrawBranch(), bpp::PhyloStatistics::computeForSubtree_(), bpp::LegacyRewardMappingTools::computeRewardVectors(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectors(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsMarginal(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveraging(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveragingMarginal(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::NonHomogeneousSequenceSimulator::dEvolveInternal(), bpp::TreeTemplateTools::dropSubtree(), bpp::NonHomogeneousSequenceSimulator::evolve(), bpp::PhylogramDrawBranchEvent::getBranchCursor(), bpp::TreeTemplateTools::getBranchLengths(), bpp::TreeTemplateTools::getHeight(), bpp::TreeTemplateTools::getHeights(), bpp::HierarchicalClustering::getParentNode(), bpp::PGMA::getParentNode(), bpp::TreeTemplateTools::getSubtreeMoments_(), bpp::TreeTemplateTools::getTotalLength(), bpp::NonHomogeneousSequenceSimulator::init(), bpp::TreeTemplateTools::midRoot(), bpp::Nhx::nodeToParenthesis(), bpp::TreeTemplateTools::nodeToParenthesis(), bpp::TreeTemplateTools::processDistsInSubtree_(), bpp::PhylogramPlot::recursivePlot_(), bpp::TreeTemplateTools::scaleTree(), bpp::Nhx::treeToParenthesis(), bpp::TreeTemplateTools::treeToParenthesis(), bpp::TreeTemplateTools::unresolveUncertainNodes(), bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
inlinevirtual |
Get the father of this node is there is one.
Reimplemented in bpp::NodeTemplate< NodeInfos >.
Definition at line 313 of file Node.h.
References father_.
|
inlinevirtual |
Get the father of this node is there is one.
Reimplemented in bpp::NodeTemplate< NodeInfos >.
Definition at line 306 of file Node.h.
References father_.
Referenced by bpp::BipartitionList::buildBitBipartitions(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::LegacyRewardMappingTools::computeRewardVectors(), bpp::DRTreeParsimonyScore::computeScoresPostorderForNode(), bpp::DRTreeParsimonyScore::computeScoresPreorder(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectors(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsMarginal(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveraging(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveragingMarginal(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::DRNonHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::DRNonHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::DRHomogeneousTreeLikelihood::displayLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::DRTreeParsimonyScore::doNNI(), bpp::InOrderTreeIterator::doStep(), bpp::TreeTemplateTools::dropSubtree(), bpp::TreeTemplateTools::getAncestorsId(), bpp::TreeTemplateTools::getPathBetweenAnyTwoNodes(), bpp::TreeTemplateTools::midRoot(), bpp::PostOrderTreeIterator::next(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::DRNonHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::NNITopologySearch::searchBetter(), bpp::NNITopologySearch::searchFast(), bpp::NNITopologySearch::searchPhyML(), bpp::NNIHomogeneousTreeLikelihood::testNNI(), and bpp::DRTreeParsimonyScore::testNNI().
|
inlinevirtual |
|
inlinevirtual |
Get the node's id.
Definition at line 170 of file Node.h.
References id_.
Referenced by bpp::AbstractNonHomogeneousTreeLikelihood::AbstractNonHomogeneousTreeLikelihood(), bpp::PhyloTree::addSubTree(), bpp::BipartitionList::buildBitBipartitions(), bpp::PhyloTreeTools::buildFromTreeTemplate(), bpp::GlobalClockTreeLikelihoodFunctionWrapper::computeBranchLengthsFromHeights_(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::LegacyRewardMappingTools::computeRewardVectors(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRTreeParsimonyScore::computeScoresForNode(), bpp::DRTreeParsimonyScore::computeScoresPostorder(), bpp::DRTreeParsimonyScore::computeScoresPostorderForNode(), bpp::DRTreeParsimonyScore::computeScoresPreorder(), bpp::DRTreeParsimonyScore::computeScoresPreorderForNode(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectors(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsMarginal(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveraging(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveragingMarginal(), bpp::RHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeSubtreeLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::AbstractHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::AbstractNonHomogeneousTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTransitionProbabilitiesForNode(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::DRNonHomogeneousTreeLikelihood::computeTreeD2LikelihoodAtNode(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeTreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::DRNonHomogeneousTreeLikelihood::computeTreeDLikelihoodAtNode(), bpp::NonHomogeneousSequenceSimulator::dEvolveInternal(), bpp::DRHomogeneousTreeLikelihood::displayLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::RHomogeneousTreeLikelihood::displayLikelihood(), bpp::RNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::InOrderTreeIterator::doStep(), bpp::TreeTemplateTools::getAncestorsId(), bpp::TreeTemplateTools::getBranchProperties(), getFatherId(), bpp::DRHomogeneousMixedTreeLikelihood::getFirstOrderDerivative(), bpp::DRNonHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getFirstOrderDerivative(), bpp::TreeTemplateTools::getInnerNodesId(), bpp::TreeTemplateTools::getLeavesId(), bpp::PostOrderTreeIterator::getLeftMostPredecessor(), bpp::TreeTemplateTools::getNodeProperties(), bpp::TreeTemplateTools::getNodesId(), bpp::DRHomogeneousMixedTreeLikelihood::getSecondOrderDerivative(), bpp::DRNonHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::DRHomogeneousTreeLikelihood::getSecondOrderDerivative(), getSonPosition(), bpp::TreeTemplateTools::incrementAllIds(), bpp::NonHomogeneousSequenceSimulator::init(), bpp::DRTreeParsimonyData::init_(), bpp::AbstractNonHomogeneousTreeLikelihood::init_(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns(), bpp::TreeTemplateTools::nodeToParenthesis(), bpp::AbstractNonHomogeneousTreeLikelihood::operator=(), bpp::Nhx::propertiesToParenthesis(), bpp::LegacyMarginalAncestralStateReconstruction::recursiveMarginalAncestralStates(), bpp::DRASDRTreeLikelihoodData::reInit(), bpp::DRTreeParsimonyData::reInit_(), removeSon(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::DRNonHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::NNITopologySearch::searchBetter(), bpp::NNITopologySearch::searchFast(), bpp::TreeTemplateTools::searchFirstNodeWithId(), bpp::TreeTemplateTools::searchLeaf(), bpp::NNITopologySearch::searchPhyML(), bpp::AbstractHomogeneousTreeLikelihood::setModel(), bpp::AbstractNonHomogeneousTreeLikelihood::setSubstitutionModelSet(), bpp::NNIHomogeneousTreeLikelihood::testNNI(), bpp::DRTreeParsimonyScore::testNNI(), bpp::LegacyRewardMappingTools::writeToStream(), and bpp::LegacySubstitutionMappingTools::writeToStream().
|
inlinevirtual |
Get the name associated to this node, if there is one, otherwise throw a NodeException.
Definition at line 203 of file Node.h.
References hasName(), and name_.
Referenced by bpp::PhyloTree::addSubTree(), bpp::LeafNamesTreeDrawingListener::afterDrawNode(), bpp::LabelInnerNodesTreeDrawingListener::afterDrawNode(), bpp::LabelCollapsedNodesTreeDrawingListener::afterDrawNode(), bpp::BipartitionList::buildBitBipartitions(), bpp::PhyloTreeTools::buildFromTreeTemplate(), bpp::RHomogeneousTreeLikelihood::displayLikelihood(), bpp::RNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::TreeTemplateTools::getLeavesNames(), bpp::TreeTemplateTools::haveSameOrderedTopology(), bpp::DRTreeParsimonyData::init_(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns(), bpp::Nhx::nodeToParenthesis(), bpp::TreeTemplateTools::nodeToParenthesis(), bpp::TreeTemplateTools::orderTree_(), bpp::TreeTemplateTools::processDistsInSubtree_(), bpp::LegacyMarginalAncestralStateReconstruction::recursiveMarginalAncestralStates(), bpp::TreeTemplateTools::searchLeaf(), bpp::Nhx::treeToParenthesis(), and bpp::TreeTemplateTools::treeToParenthesis().
vector< Node * > Node::getNeighbors | ( | ) |
Definition at line 139 of file Node.cpp.
References father_, hasFather(), and sons_.
vector< const Node * > Node::getNeighbors | ( | ) | const |
Definition at line 127 of file Node.cpp.
References father_, hasFather(), and sons_.
Referenced by bpp::DRTreeParsimonyScore::computeScoresForNode(), bpp::DRTreeParsimonyScore::computeScoresPostorderForNode(), bpp::DRTreeParsimonyScore::computeScoresPreorderForNode(), bpp::NodeTemplate< NodeInfos >::getNeighbors(), and bpp::TreeTemplateTools::getRemainingNeighbors().
|
inlinevirtual |
Definition at line 502 of file Node.h.
References hasNodeProperty(), and nodeProperties_.
Referenced by bpp::PhyloTree::addSubTree(), bpp::PhyloTreeTools::buildFromTreeTemplate(), bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), bpp::TreeTemplateTools::getNodeProperties(), and bpp::Nhx::propertiesToParenthesis().
|
inlinevirtual |
Definition at line 510 of file Node.h.
References hasNodeProperty(), and nodeProperties_.
|
inlinevirtual |
Definition at line 565 of file Node.h.
References bpp::MapTools::getKeys(), and nodeProperties_.
Referenced by bpp::PhyloTree::addSubTree(), bpp::PhyloTreeTools::buildFromTreeTemplate(), and bpp::TreeTemplateTools::getNodePropertyNames().
|
inlinevirtual |
Definition at line 355 of file Node.h.
References sons_.
Referenced by bpp::PhyloTree::addSubTree(), bpp::BipartitionList::buildBitBipartitions(), bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), bpp::TreeTemplateTools::cloneSubtree(), bpp::GlobalClockTreeLikelihoodFunctionWrapper::computeBranchLengthsFromHeights_(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::PhyloStatistics::computeForSubtree_(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::LegacyRewardMappingTools::computeRewardVectors(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRTreeParsimonyScore::computeScoresPostorder(), bpp::DRTreeParsimonyScore::computeScoresPreorder(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectors(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveraging(), bpp::RHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeDLikelihood(), degree(), bpp::TreeTemplateTools::deleteBranchLengths(), bpp::TreeTemplateTools::deleteBranchProperties(), bpp::TreeTemplateTools::deleteNodeProperties(), bpp::NonHomogeneousSequenceSimulator::dEvolve(), bpp::NonHomogeneousSequenceSimulator::dEvolveInternal(), bpp::DRHomogeneousTreeLikelihood::displayLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::InOrderTreeIterator::doStep(), bpp::NonHomogeneousSequenceSimulator::evolveInternal(), bpp::TreeTemplateTools::getBranchLengths(), bpp::TreeTemplateTools::getBranchProperties(), bpp::TreeTemplateTools::getBranchPropertyNames(), bpp::TreeTemplateTools::getDepth(), bpp::TreeTemplateTools::getDepths(), bpp::TreeTemplateTools::getHeight(), bpp::TreeTemplateTools::getHeights(), bpp::TreeTemplateTools::getInnerNodesId(), bpp::TreeTemplateTools::getLeavesId(), bpp::TreeTemplateTools::getLeavesNames(), bpp::PostOrderTreeIterator::getLeftMostPredecessor(), bpp::TreeTemplateTools::getNodeProperties(), bpp::TreeTemplateTools::getNodePropertyNames(), bpp::TreeTemplateTools::getNodesId(), bpp::TreeTemplateTools::getNumberOfBranches(), bpp::TreeTemplateTools::getNumberOfLeaves(), bpp::TreeTemplateTools::getNumberOfNodes(), bpp::DRNonHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::TreeTemplateTools::getSubtreeMoments_(), bpp::TreeTemplateTools::getTotalLength(), hasNoSon(), bpp::TreeTemplateTools::haveSameOrderedTopology(), bpp::TreeTemplateTools::incrementAllIds(), bpp::DRTreeParsimonyData::init_(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns(), bpp::TreeTemplateTools::isMultifurcating(), bpp::NonHomogeneousSequenceSimulator::multipleEvolve(), bpp::NonHomogeneousSequenceSimulator::multipleEvolveInternal(), bpp::PostOrderTreeIterator::next(), bpp::PreOrderTreeIterator::next(), bpp::Nhx::nodeToParenthesis(), bpp::TreeTemplateTools::nodeToParenthesis(), bpp::TreeTemplateTools::orderTree_(), bpp::TreeTemplateTools::processDistsInSubtree_(), bpp::LegacyMarginalAncestralStateReconstruction::recursiveMarginalAncestralStates(), bpp::CladogramPlot::recursivePlot_(), bpp::PhylogramPlot::recursivePlot_(), bpp::DRASDRTreeLikelihoodData::reInit(), bpp::DRTreeParsimonyData::reInit_(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::DRNonHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::TreeTemplateTools::scaleTree(), bpp::TreeTemplateTools::searchFirstNodeWithId(), bpp::TreeTemplateTools::searchLeaf(), bpp::TreeTemplateTools::setBranchLengths(), bpp::TreeTemplateTools::setVoidBranchLengths(), bpp::NonHomogeneousSequenceSimulator::simulateSite(), bpp::Nhx::treeToParenthesis(), bpp::TreeTemplateTools::treeToParenthesis(), and bpp::TreeTemplateTools::unresolveUncertainNodes().
|
inlinevirtual |
Reimplemented in bpp::NodeTemplate< NodeInfos >.
Definition at line 368 of file Node.h.
References sons_.
|
inlinevirtual |
Reimplemented in bpp::NodeTemplate< NodeInfos >.
Definition at line 362 of file Node.h.
References sons_.
Referenced by bpp::BipartitionList::buildBitBipartitions(), bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), bpp::GlobalClockTreeLikelihoodFunctionWrapper::computeBranchLengthsFromHeights_(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeDownSubtreeDLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::LegacyRewardMappingTools::computeRewardVectors(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRTreeParsimonyScore::computeScoresPostorder(), bpp::DRTreeParsimonyScore::computeScoresPreorder(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectors(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveraging(), bpp::RHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::RHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeD2Likelihood(), bpp::RHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeTreeDLikelihood(), bpp::TreeTemplateTools::deleteBranchLengths(), bpp::TreeTemplateTools::deleteBranchProperties(), bpp::TreeTemplateTools::deleteNodeProperties(), bpp::DRHomogeneousTreeLikelihood::displayLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::DRTreeParsimonyScore::doNNI(), bpp::InOrderTreeIterator::doStep(), bpp::TreeTemplateTools::getBranchLengths(), bpp::TreeTemplateTools::getBranchProperties(), bpp::TreeTemplateTools::getBranchPropertyNames(), bpp::TreeTemplateTools::getInnerNodesId(), bpp::TreeTemplateTools::getLeavesId(), bpp::TreeTemplateTools::getLeavesNames(), bpp::PostOrderTreeIterator::getLeftMostPredecessor(), bpp::TreeTemplateTools::getNodeProperties(), bpp::TreeTemplateTools::getNodePropertyNames(), bpp::TreeTemplateTools::getNodesId(), bpp::DRNonHomogeneousTreeLikelihood::getSecondOrderDerivative(), bpp::TreeTemplateTools::getSubtreeMoments_(), bpp::TreeTemplateTools::getTotalLength(), bpp::TreeTemplateTools::haveSameOrderedTopology(), bpp::TreeTemplateTools::incrementAllIds(), bpp::DRTreeParsimonyData::init_(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::TreeTemplateTools::isMultifurcating(), bpp::TreeTemplateTools::orderTree_(), bpp::TreeTemplateTools::processDistsInSubtree_(), bpp::LegacyMarginalAncestralStateReconstruction::recursiveMarginalAncestralStates(), bpp::DRASDRTreeLikelihoodData::reInit(), bpp::DRTreeParsimonyData::reInit_(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::DRNonHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::TreeTemplateTools::scaleTree(), bpp::TreeTemplateTools::searchFirstNodeWithId(), bpp::TreeTemplateTools::searchLeaf(), bpp::TreeTemplateTools::setBranchLengths(), bpp::TreeTemplateTools::setVoidBranchLengths(), swap(), bpp::NNIHomogeneousTreeLikelihood::testNNI(), bpp::DRTreeParsimonyScore::testNNI(), bpp::Nhx::treeToParenthesis(), bpp::TreeTemplateTools::treeToParenthesis(), and bpp::TreeTemplateTools::unresolveUncertainNodes().
|
virtual |
Definition at line 151 of file Node.cpp.
References getId(), sons_, and bpp::TextTools::toString().
Referenced by bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::DRTreeParsimonyScore::doNNI(), bpp::NNIHomogeneousTreeLikelihood::testNNI(), and bpp::DRTreeParsimonyScore::testNNI().
|
inlinevirtual |
Definition at line 357 of file Node.h.
References sons_.
Referenced by bpp::TreeTemplateTools::getBestRootInSubtree_(), and bpp::TreeTemplateTools::midRoot().
|
inlinevirtual |
|
virtual |
Definition at line 163 of file Node.cpp.
References bpp::TreeTools::BOOTSTRAP, and hasBranchProperty().
|
inlinevirtual |
Definition at line 653 of file Node.h.
References branchProperties_.
Referenced by bpp::BootstrapValuesTreeDrawingListener::afterDrawBranch(), bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), deleteBranchProperty(), getBootstrapValue(), bpp::TreeTemplateTools::getBranchProperties(), getBranchProperty(), hasBootstrapValue(), bpp::TreeTemplateTools::nodeToParenthesis(), bpp::Nhx::propertiesToParenthesis(), removeBranchProperty(), setBranchProperty(), bpp::TreeTemplateTools::treeToParenthesis(), and bpp::TreeTemplateTools::unresolveUncertainNodes().
|
inlinevirtual |
Tell is this node has a distance to the father.
Definition at line 288 of file Node.h.
References distanceToFather_.
Referenced by bpp::PhyloTree::addSubTree(), bpp::BranchLengthsTreeDrawingListener::afterDrawBranch(), bpp::PhyloStatistics::computeForSubtree_(), bpp::TreeTemplateTools::dropSubtree(), getDistanceToFather(), bpp::TreeTemplateTools::getTotalLength(), Node(), bpp::Nhx::nodeToParenthesis(), bpp::TreeTemplateTools::nodeToParenthesis(), operator=(), bpp::PhylogramPlot::recursivePlot_(), bpp::TreeTemplateTools::setVoidBranchLengths(), bpp::Nhx::treeToParenthesis(), and bpp::TreeTemplateTools::treeToParenthesis().
|
inlinevirtual |
Tell if this node has a father node.
Definition at line 346 of file Node.h.
References father_.
Referenced by bpp::BipartitionList::buildBitBipartitions(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::LegacyRewardMappingTools::computeRewardVectors(), bpp::DRTreeParsimonyScore::computeScoresPreorder(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectors(), bpp::LegacySubstitutionMappingTools::computeSubstitutionVectorsNoAveraging(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), degree(), bpp::NonHomogeneousSequenceSimulator::dEvolveInternal(), bpp::DRHomogeneousTreeLikelihood::displayLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::displayLikelihood(), bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::DRTreeParsimonyScore::doNNI(), bpp::AbstractTreeDrawing::drawAtBranch(), bpp::TreeTemplateTools::dropSubtree(), bpp::NonHomogeneousSequenceSimulator::evolveInternal(), bpp::TreeTemplateTools::getAncestorsId(), getNeighbors(), bpp::TreeTemplateTools::getPathBetweenAnyTwoNodes(), bpp::DRTreeParsimonyData::init_(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::TreeTemplateTools::isRoot(), bpp::NonHomogeneousSequenceSimulator::multipleEvolveInternal(), bpp::TreeTemplateTools::orderTree_(), bpp::TreeTemplateTools::processDistsInSubtree_(), bpp::DRASDRTreeLikelihoodData::reInit(), bpp::DRTreeParsimonyData::reInit_(), bpp::DRHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::DRNonHomogeneousTreeLikelihood::resetLikelihoodArrays(), bpp::TreeTemplateTools::scaleTree(), bpp::NNIHomogeneousTreeLikelihood::testNNI(), and bpp::DRTreeParsimonyScore::testNNI().
|
inlinevirtual |
Tell is this node has a name.
Definition at line 234 of file Node.h.
References name_.
Referenced by bpp::PhyloTree::addSubTree(), bpp::LabelInnerNodesTreeDrawingListener::afterDrawNode(), bpp::LabelCollapsedNodesTreeDrawingListener::afterDrawNode(), bpp::PhyloTreeTools::buildFromTreeTemplate(), getName(), Node(), and operator=().
|
inlinevirtual |
Definition at line 563 of file Node.h.
References nodeProperties_.
Referenced by bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), deleteNodeProperty(), bpp::TreeTemplateTools::getNodeProperties(), getNodeProperty(), bpp::Nhx::propertiesToParenthesis(), removeNodeProperty(), and setNodeProperty().
|
inlinevirtual |
Definition at line 669 of file Node.h.
References getNumberOfSons().
Referenced by bpp::TreeTemplateTools::getLeavesNames(), bpp::TreeTemplateTools::haveSameOrderedTopology(), bpp::Nhx::nodeToParenthesis(), bpp::TreeTemplateTools::nodeToParenthesis(), bpp::TreeTemplateTools::orderTree_(), bpp::TreeTemplateTools::processDistsInSubtree_(), bpp::TreeTemplateTools::searchLeaf(), bpp::Nhx::treeToParenthesis(), and bpp::TreeTemplateTools::treeToParenthesis().
|
inlinevirtual |
Definition at line 667 of file Node.h.
References degree().
Referenced by bpp::LeafNamesTreeDrawingListener::afterDrawNode(), bpp::GlobalClockTreeLikelihoodFunctionWrapper::computeBranchLengthsFromHeights_(), bpp::PhyloStatistics::computeForSubtree_(), bpp::DRNonHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeLikelihoodAtNode_(), bpp::DRHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRNonHomogeneousTreeLikelihood::computeRootLikelihood(), bpp::DRTreeParsimonyScore::computeScoresPostorder(), bpp::DRTreeParsimonyScore::computeScoresPreorder(), bpp::RHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::RNonHomogeneousMixedTreeLikelihood::computeSubtreeLikelihood(), bpp::RNonHomogeneousTreeLikelihood::computeSubtreeLikelihood(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPostfix(), bpp::DRHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::DRNonHomogeneousTreeLikelihood::computeSubtreeLikelihoodPrefix(), bpp::TreeTemplateTools::getInnerNodesId(), bpp::TreeTemplateTools::getLeavesId(), bpp::TreeTemplateTools::getNumberOfLeaves(), bpp::TreeTemplateTools::getSubtreeMoments_(), bpp::DRTreeParsimonyData::init_(), bpp::DRASRTreeLikelihoodData::initLikelihoods(), bpp::DRASDRTreeLikelihoodData::initLikelihoods(), bpp::DRASRTreeLikelihoodData::initLikelihoodsWithPatterns(), bpp::LegacyMarginalAncestralStateReconstruction::recursiveMarginalAncestralStates(), bpp::CladogramPlot::recursivePlot_(), bpp::PhylogramPlot::recursivePlot_(), bpp::DRASDRTreeLikelihoodData::reInit(), and bpp::DRTreeParsimonyData::reInit_().
Assignation operator.
node | the node to copy. |
Assignation operator:
Definition at line 42 of file Node.cpp.
References branchProperties_, distanceToFather_, hasDistanceToFather(), hasName(), id_, name_, and nodeProperties_.
Referenced by bpp::NodeTemplate< NodeInfos >::operator=().
|
inlinevirtual |
|
inline |
|
inline |
|
inlinevirtual |
Remove all branch properties.
Attached objects will not be deleted.
Definition at line 636 of file Node.h.
References branchProperties_.
|
inlinevirtual |
Definition at line 608 of file Node.h.
References branchProperties_, and hasBranchProperty().
|
inlinevirtual |
Remove the father of this node.
Reimplemented in bpp::NodeTemplate< NodeInfos >.
Definition at line 336 of file Node.h.
References father_.
Referenced by removeSon().
|
inlinevirtual |
Remove all node properties.
Attached objects will not be deleted.
Definition at line 546 of file Node.h.
References nodeProperties_.
|
inlinevirtual |
Definition at line 518 of file Node.h.
References hasNodeProperty(), and nodeProperties_.
|
inlinevirtual |
Definition at line 421 of file Node.h.
References getId(), removeFather(), and sons_.
|
inlinevirtual |
Definition at line 411 of file Node.h.
References removeFather(), and sons_.
Referenced by bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::DRTreeParsimonyScore::doNNI(), bpp::TreeTemplateTools::dropSubtree(), bpp::TreeTemplateTools::midRoot(), removeSons(), swap(), and bpp::TreeTemplateTools::unresolveUncertainNodes().
|
inlinevirtual |
Definition at line 437 of file Node.h.
References removeSon(), and sons_.
|
inlinevirtual |
Set/add a branch property.
If no property with the same name is found, the new property will be added to the list. Conversely, the property will be deleted and replaced by the new one. If you want to keep a copy of the old property, consider using the removeBranchProperty function before.
name | The name of the property to set. |
property | The property object (will be cloned). |
Definition at line 585 of file Node.h.
References branchProperties_, and hasBranchProperty().
Referenced by addSubTree(), bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), bpp::TreeTemplateTools::midRoot(), bpp::TreeTemplateTools::parenthesisToNode(), and bpp::Nhx::setNodeProperties().
|
inlinevirtual |
Set or update the distance toward the father node.
Warning: a distance to the father node may be set even if no father node is specified. This is used by several tree reconstruction methods. It may also be useful for manipulating subtrees.
distance | The new distance to the father node. |
Definition at line 266 of file Node.h.
References distanceToFather_.
Referenced by addSubTree(), bpp::OptimizationTools::buildDistanceTree(), bpp::BioNJ::computeTree(), bpp::AbstractAgglomerativeDistanceMethod::computeTree(), bpp::NNIHomogeneousTreeLikelihood::doNNI(), bpp::HierarchicalClustering::finalStep(), bpp::NeighborJoining::finalStep(), bpp::PGMA::finalStep(), bpp::TreeTemplateTools::midRoot(), bpp::Nhx::parenthesisToNode(), bpp::TreeTemplateTools::parenthesisToNode(), bpp::TreeTemplateTools::scaleTree(), bpp::TreeTemplateTools::setBranchLengths(), bpp::TreeTemplateTools::setVoidBranchLengths(), and bpp::TreeTemplateTools::unresolveUncertainNodes().
|
inlinevirtual |
|
inlinevirtual |
Set this node's id.
id | The new identity tag. |
Definition at line 177 of file Node.h.
References id_.
Referenced by addSubTree(), bpp::TreeTemplateTools::incrementAllIds(), bpp::TreeTemplateTools::midRoot(), bpp::TreeTemplateTools::parenthesisToNode(), and bpp::Nhx::setNodeProperties().
|
inlinevirtual |
Give a name or update the name associated to the node.
name | The name to give to the node. |
Definition at line 214 of file Node.h.
References name_.
Referenced by addSubTree(), bpp::Nhx::parenthesisToNode(), and bpp::TreeTemplateTools::parenthesisToNode().
|
inlinevirtual |
Set/add a node property.
If no property with the same name is found, the new property will be added to the list. Conversely, the property will be deleted and replaced by the new one. If you want to keep a copy of the old property, consider using the removeNodeProperty function before.
name | The name of the property to set. |
property | The property object (will be cloned). |
Definition at line 495 of file Node.h.
References hasNodeProperty(), and nodeProperties_.
Referenced by addSubTree(), bpp::Nhx::changeNamesToTags(), bpp::Nhx::changeTagsToNames(), and bpp::Nhx::setNodeProperties().
|
inlinevirtual |
|
virtual |
Definition at line 111 of file Node.cpp.
References addSon(), getSon(), and removeSon().
Referenced by bpp::TreeTemplateTools::orderTree_().
|
mutableprotected |
Definition at line 67 of file Node.h.
Referenced by deleteBranchProperties(), deleteBranchProperty(), getBranchProperty(), getBranchPropertyNames(), hasBranchProperty(), Node(), operator=(), removeBranchProperties(), removeBranchProperty(), setBranchProperty(), and ~Node().
|
protected |
Definition at line 65 of file Node.h.
Referenced by deleteDistanceToFather(), getDistanceToFather(), hasDistanceToFather(), Node(), operator=(), setDistanceToFather(), and ~Node().
|
protected |
Definition at line 64 of file Node.h.
Referenced by addSon(), getFather(), bpp::NodeTemplate< NodeInfos >::getFather(), getFatherId(), getNeighbors(), hasFather(), operator[](), bpp::NodeTemplate< NodeInfos >::operator[](), removeFather(), bpp::NodeTemplate< NodeInfos >::removeFather(), setFather(), and setSon().
|
protected |
Definition at line 61 of file Node.h.
Referenced by getId(), operator=(), operator==(), and setId().
|
protected |
Definition at line 62 of file Node.h.
Referenced by deleteName(), getName(), hasName(), Node(), operator=(), setName(), and ~Node().
|
mutableprotected |
Definition at line 66 of file Node.h.
Referenced by deleteNodeProperties(), deleteNodeProperty(), getNodeProperty(), getNodePropertyNames(), hasNodeProperty(), Node(), operator=(), removeNodeProperties(), removeNodeProperty(), setNodeProperty(), and ~Node().
|
protected |
Definition at line 63 of file Node.h.
Referenced by addSon(), getNeighbors(), getNumberOfSons(), bpp::NodeTemplate< NodeInfos >::getSon(), getSon(), getSonPosition(), getSons(), getSonsId(), operator[](), bpp::NodeTemplate< NodeInfos >::operator[](), removeSon(), removeSons(), setFather(), and setSon().