public Node
interface for a node (includes branch) in a binary/non-binary rooted/unrooted tree
Node getParent()
Returns the parent node of this node.
void setParent(Node node)
Set the parent node of this node.
kotlin.Array[] getSequence()
Returns the sequence at this node, in the form an array of bytes.
void setSequence(kotlin.Array[] array)
Sets the sequence using an array of bytes.
int getNumber()
return the index of this node
void setNumber(int number)
set the index of this node
double getBranchLength()
Get the length of the branch attaching this node to its parent.
void setBranchLength(double value)
Set the length of the branch attaching this node to its parent.
double getBranchLengthSE()
Get the length SE of the branch attaching this node to its parent.
void setBranchLengthSE(double value)
Set the length SE of the branch attaching this node to its parent.
double getNodeHeight()
Get the height of this node relative to the most recent node.
void setNodeHeight(double value)
Set the height of this node relative to the most recent node.
void setNodeHeight(double value,
boolean adjustChildBranchLengths)
Set the height of this node relative to the most recent node.
adjustChildBranchLengths - if trueTaxon getIdentifier()
Returns the identifier for this node.
void setIdentifier(Taxon id)
Set identifier for this node.
int getChildCount()
Returns the number of children this node has.
boolean isLeaf()
check whether this node is an external node
boolean isRoot()
check whether this node is a root node
Node getChild(int n)
get child node
n - number of childvoid setChild(int n,
Node node)
set child node
n - numbervoid addChild(Node c)
add new child node
c - new child nodevoid insertChild(Node c, int pos)
add new child node (insertion at a specific position)
c - new child node + @param pos positionNode removeChild(int n)
remove child
n - number of child to be removed