|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pal.tree.ParameterizedTree
abstract base class for a tree with an Parameterized interface
Fields inherited from interface pal.misc.Units |
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, YEARS |
Constructor Summary | |
ParameterizedTree()
|
Method Summary | |
void |
createNodeList()
This method is called to ensure that the calls to other methods in this interface are valid. |
java.lang.Object |
getAttribute(Node node,
java.lang.String name)
|
Tree |
getBaseTree()
|
Node |
getExternalNode(int i)
returns the ith external node in the tree. |
int |
getExternalNodeCount()
returns a count of the number of external nodes (tips) in this tree. |
Node |
getInternalNode(int i)
returns the ith internal node in the tree. |
int |
getInternalNodeCount()
returns a count of the number of internal nodes (and hence clades) in this tree. |
Node |
getRoot()
Returns the root node of this tree. |
int |
getUnits()
Gets the units that this tree's branch lengths and node heights are expressed in. |
void |
setAttribute(Node node,
java.lang.String name,
java.lang.Object value)
Sets an named attribute for a given node. |
void |
setBaseTree(Tree tree)
|
void |
setRoot(Node root)
This method constructs a tree from the given root node. |
void |
setUnits(int units)
Sets the units that this tree's branch lengths and node heights are expressed in. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface pal.misc.Parameterized |
getDefaultValue, getLowerLimit, getNumParameters, getParameter, getUpperLimit, setParameter, setParameterSE |
Constructor Detail |
public ParameterizedTree()
Method Detail |
public void setBaseTree(Tree tree)
public Tree getBaseTree()
public final Node getRoot()
getRoot
in interface Tree
pal.tree.Tree
public final void setRoot(Node root)
Tree
setRoot
in interface Tree
pal.tree.Tree
root
- the root node of the tree to construct.public final int getExternalNodeCount()
getExternalNodeCount
in interface Tree
pal.tree.Tree
public final int getInternalNodeCount()
getInternalNodeCount
in interface Tree
pal.tree.Tree
public final Node getExternalNode(int i)
getExternalNode
in interface Tree
pal.tree.Tree
public final Node getInternalNode(int i)
getInternalNode
in interface Tree
pal.tree.Tree
public final void createNodeList()
createNodeList
in interface Tree
public final int getUnits()
Tree
getUnits
in interface Tree
public final void setUnits(int units)
Tree
setUnits
in interface Tree
public final void setAttribute(Node node, java.lang.String name, java.lang.Object value)
Tree
setAttribute
in interface Tree
pal.tree.Tree
node
- the node whose attribute is being set.name
- the name of the attribute.value
- the new value of the attribute.public final java.lang.Object getAttribute(Node node, java.lang.String name)
getAttribute
in interface Tree
pal.tree.Tree
node
- the node being interrogated.name
- the name of the attribute of interest.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |