Package pal.tree

Interface Tree

    • Method Detail

      • getRoot

        Node getRoot()
        Returns:
        the root node of this tree.
      • setRoot

        void setRoot​(Node root)
        This method constructs a tree from the given root node.
        Parameters:
        root - the root node of the tree to construct.
      • getExternalNodeCount

        int getExternalNodeCount()
        Returns:
        a count of the number of external nodes (tips) in this tree.
      • getInternalNodeCount

        int getInternalNodeCount()
        Returns:
        a count of the number of internal nodes (and hence clades) in this tree.
      • getExternalNode

        Node getExternalNode​(int i)
        Returns:
        the ith external node in the tree.
      • getInternalNode

        Node getInternalNode​(int i)
        Returns:
        the ith internal node in the tree.
      • createNodeList

        void createNodeList()
        This method is called to ensure that the calls to other methods in this interface are valid.
      • getUnits

        int getUnits()
        Gets the units that this tree's branch lengths and node heights are expressed in.
        Specified by:
        getUnits in interface UnitsProvider
        Returns:
        the units relating to this object.
      • setAttribute

        void setAttribute​(Node node,
                          java.lang.String name,
                          java.lang.Object value)
        Sets an named attribute for a given node.
        Parameters:
        node - the node whose attribute is being set.
        name - the name of the attribute.
        value - the new value of the attribute.
      • getAttribute

        java.lang.Object getAttribute​(Node node,
                                      java.lang.String name)
        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.
      • getCopy

        Tree getCopy()
        Returns:
        a clone of this tree