|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
interface for a node (includes branch) in a binary/non-binary rooted/unrooted tree
Method Summary | |
void |
addChild(Node c)
add new child node |
double |
getBranchLength()
Get 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. |
Node |
getChild(int n)
get child node |
int |
getChildCount()
Returns the number of children this node has. |
Identifier |
getIdentifier()
Returns the identifier for this node. |
double |
getNodeHeight()
Get the height of this node relative to the most recent node. |
int |
getNumber()
return the index of this node |
Node |
getParent()
Returns the parent node of this node. |
byte[] |
getSequence()
Returns the sequence at this node, in the form an array of bytes. |
void |
insertChild(Node c,
int pos)
add new child node (insertion at a specific position) |
boolean |
isLeaf()
check whether this node is an external node |
boolean |
isRoot()
check whether this node is a root node |
Node |
removeChild(int n)
remove child |
void |
setBranchLength(double value)
Set the length 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. |
void |
setChild(int n,
Node node)
set child node |
void |
setIdentifier(Identifier id)
Set identifier for this 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. |
void |
setNumber(int number)
set the index of this node |
void |
setParent(Node node)
Set the parent node of this node. |
void |
setSequence(byte[] array)
Sets the sequence using an array of bytes. |
Method Detail |
public Node getParent()
public void setParent(Node node)
public byte[] getSequence()
public void setSequence(byte[] array)
public int getNumber()
public void setNumber(int number)
public double getBranchLength()
public void setBranchLength(double value)
public double getBranchLengthSE()
public void setBranchLengthSE(double value)
public double getNodeHeight()
public void setNodeHeight(double value)
public void setNodeHeight(double value, boolean adjustChildBranchLengths)
adjustChildBranchLengths
- if truepublic Identifier getIdentifier()
public void setIdentifier(Identifier id)
public int getChildCount()
public boolean isLeaf()
public boolean isRoot()
public Node getChild(int n)
n
- number of child
public void setChild(int n, Node node)
n
- numberpublic void addChild(Node c)
c
- new child nodepublic void insertChild(Node c, int pos)
c
- new child node
+ @param pos positionpublic Node removeChild(int n)
n
- number of child to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |