Package pal.tree
Class ParameterizedTree.ParameterizedTreeBase
java.lang.Object
pal.tree.ParameterizedTree.ParameterizedTreeBase
- All Implemented Interfaces:
Serializable,IdGroup,Parameterized,Units,UnitsProvider,Tree
- Direct Known Subclasses:
ClockTree,LogParameterizedTree,MutationRateModelTree,UnconstrainedTree
- Enclosing interface:
- ParameterizedTree
public abstract static class ParameterizedTree.ParameterizedTreeBase
extends Object
implements Parameterized, Tree
For parameterisations that work by adjusting a base tree (that is, they aren't really
tree's themselves...)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.misc.IdGroup
IdGroup.UtilsNested classes/interfaces inherited from interface pal.misc.Parameterized
Parameterized.Null, Parameterized.ParameterizedBase, Parameterized.ParameterizedUser, Parameterized.UtilsNested classes/interfaces inherited from interface pal.tree.Tree
Tree.TreeBase -
Field Summary
Fields inherited from interface pal.misc.Units
DAYS, EXPECTED_SUBSTITUTIONS, GENERATIONS, MONTHS, SAMPLE, SHORT_UNIT_NAMES, UNIT_NAMES, UNKNOWN, YEARS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidThis method is called to ensure that the calls to other methods in this interface are valid.final ObjectgetAttribute(Node node, String name) protected TreegetCopy()The cheapy copy that just creates a SimpleTreefinal NodegetExternalNode(int i) returns the ith external node in the tree.final intreturns a count of the number of external nodes (tips) in this tree.final intReturns the number of identifiers in this groupfinal IdentifiergetIdentifier(int i) Returns the ith identifier.final NodegetInternalNode(int i) returns the ith internal node in the tree.final intreturns a count of the number of internal nodes (and hence clades) in this tree.final intfinal NodegetRoot()Returns the root node of this tree.final intgetUnits()Gets the units that this tree's branch lengths and node heights are expressed in.final voidsetAttribute(Node node, String name, Object value) Sets an named attribute for a given node.protected voidsetBaseTree(Tree baseTree) final voidsetIdentifier(int i, Identifier id) Sets the ith identifier.final voidThis method constructs a tree from the given root node.toString()final intreturns the index of the identifier with the given name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface pal.misc.Parameterized
getDefaultValue, getLowerLimit, getNumParameters, getParameter, getUpperLimit, setParameter, setParameterSE
-
Constructor Details
-
ParameterizedTreeBase
Cloning constructor -
ParameterizedTreeBase
public ParameterizedTreeBase() -
ParameterizedTreeBase
-
-
Method Details
-
setBaseTree
-
getBaseTree
-
getRoot
Returns the root node of this tree. -
setRoot
Description copied from interface:TreeThis method constructs a tree from the given root node. -
getIdentifier
Description copied from interface:IdGroupReturns the ith identifier.- Specified by:
getIdentifierin interfaceIdGroup
-
setIdentifier
Description copied from interface:IdGroupSets the ith identifier.- Specified by:
setIdentifierin interfaceIdGroup
-
getIdCount
public final int getIdCount()Description copied from interface:IdGroupReturns the number of identifiers in this group- Specified by:
getIdCountin interfaceIdGroup
-
whichIdNumber
Description copied from interface:IdGroupreturns the index of the identifier with the given name.- Specified by:
whichIdNumberin interfaceIdGroup
-
getExternalNodeCount
public final int getExternalNodeCount()returns a count of the number of external nodes (tips) in this tree.- Specified by:
getExternalNodeCountin interfaceTree- Returns:
- a count of the number of external nodes (tips) in this tree.
-
getInternalNodeCount
public final int getInternalNodeCount()returns a count of the number of internal nodes (and hence clades) in this tree.- Specified by:
getInternalNodeCountin interfaceTree- Returns:
- a count of the number of internal nodes (and hence clades) in this tree.
-
getNodeCount
public final int getNodeCount() -
getExternalNode
returns the ith external node in the tree.- Specified by:
getExternalNodein interfaceTree- Returns:
- the ith external node in the tree.
-
getInternalNode
returns the ith internal node in the tree.- Specified by:
getInternalNodein interfaceTree- Returns:
- the ith internal node in the tree.
-
createNodeList
public final void createNodeList()This method is called to ensure that the calls to other methods in this interface are valid.- Specified by:
createNodeListin interfaceTree
-
getUnits
public final int getUnits()Description copied from interface:TreeGets the units that this tree's branch lengths and node heights are expressed in.- Specified by:
getUnitsin interfaceTree- Specified by:
getUnitsin interfaceUnitsProvider- Returns:
- the units relating to this object.
-
setAttribute
Description copied from interface:TreeSets an named attribute for a given node.- Specified by:
setAttributein interfaceTree- Parameters:
node- the node whose attribute is being set.name- the name of the attribute.value- the new value of the attribute.
-
getAttribute
- Specified by:
getAttributein interfaceTree- Parameters:
node- the node being interrogated.name- the name of the attribute of interest.- Returns:
- an object representing the named attributed for the numbered node.
-
toString
-
getCopy
The cheapy copy that just creates a SimpleTree -
getOrthogonalHints
- Returns:
- null by default (implying not hint information)
-