46 #include <Bpp/Clonable.h> 149 public virtual Clonable
172 virtual std::string
getName()
const = 0;
174 virtual void setName(
const std::string& name) = 0;
196 virtual std::vector<int>
getNodesId()
const = 0;
231 virtual bool hasNode(
int nodeId)
const = 0;
virtual Clonable * getNodeProperty(int nodeId, const std::string &name)=0
virtual size_t getNumberOfLeaves() const =0
virtual Tree * cloneSubtree(int newRootId) const =0
clones a Subtree rooted at given node Id
virtual void setVoidBranchLengths(double brLen)=0
Give a length to branches that don't have one in a tree.
virtual size_t getNumberOfNodes() const =0
virtual std::vector< std::string > getBranchPropertyNames(int nodeId) const =0
virtual std::vector< int > getInnerNodesId() const =0
virtual std::vector< int > getAncestorsId(int nodeId) const =0
virtual int getRootId() const =0
virtual std::string getName() const =0
Tree name.
virtual void newOutGroup(int nodeId)=0
Root a tree by specifying an outgroup.
virtual std::vector< int > getNodesId() const =0
virtual void scaleTree(double factor)=0
Scale a given tree.
virtual Clonable * removeNodeProperty(int nodeId, const std::string &name)=0
virtual void rootAt(int nodeId)=0
Change the root node.
virtual void setNodeName(int nodeId, const std::string &name)=0
Interface for phylogenetic tree objects.
virtual bool hasNodeProperty(int nodeId, const std::string &name) const =0
virtual std::vector< int > getLeavesId() const =0
virtual void setBranchProperty(int nodeId, const std::string &name, const Clonable &property)=0
virtual int getFatherId(int parentId) const =0
virtual bool hasFather(int nodeId) const =0
virtual double getTotalLength()=0
Get the total length (sum of all branch lengths) of a tree.
virtual int getNextId()=0
Get an id.
virtual void setNodeProperty(int nodeId, const std::string &name, const Clonable &property)=0
virtual bool hasNode(int nodeId) const =0
virtual bool isLeaf(int nodeId) const =0
virtual std::vector< double > getBranchLengths() const =0
virtual bool hasBranchProperty(int nodeId, const std::string &name) const =0
virtual void setName(const std::string &name)=0
Exception thrown when something is wrong with a particular node.
virtual void deleteDistanceToFather(int nodeId)=0
virtual std::vector< std::string > getLeavesNames() const =0
virtual Clonable * removeBranchProperty(int nodeId, const std::string &name)=0
void swapNodes(const Tree &tree, int nodeId, size_t i1=0, size_t i2=1)
Swap two son nodes.
virtual void setDistanceToFather(int nodeId, double length)=0
virtual std::vector< std::string > getNodePropertyNames(int nodeId) const =0
virtual double getDistanceToFather(int nodeId) const =0
virtual bool unroot()=0
Unroot a rooted tree.
virtual bool hasNodeName(int nodeId) const =0
virtual bool isMultifurcating() const =0
Tell if the tree is multifurcating.
virtual int getLeafId(const std::string &name) const =0
virtual bool isRoot(int nodeId) const =0
virtual bool hasDistanceToFather(int nodeId) const =0
Exception thrown when a tree is expected to be rooted.
virtual std::vector< int > getBranchesId() const =0
virtual void deleteNodeName(int nodeId)=0
virtual void resetNodesId()=0
Number nodes.
virtual Clonable * getBranchProperty(int nodeId, const std::string &name)=0
virtual std::vector< int > getSonsId(int parentId) const =0
General exception thrown when something is wrong with a particular node.
virtual void setBranchLengths(double brLen)=0
Set all the branch lengths of a tree.
virtual bool isRooted() const =0
Tell if the tree is rooted.
virtual std::string getNodeName(int nodeId) const =0