- addEdge
Adds an edge from n1 to n2. This EdgeType is ignored as rooted trees use
directed edges.
- addVertex
Adds a node to the tree and refreshes its vertex. this is useful to add vertices
that were in anothe
- getRoot
Returns the root node of this tree. If the root was not set explicitly, this
searches the tree and r
- setRoot
Sets the root node. This explicitly sets a root node. The node is returned by
#getRoot() but this do
- vertexCount
Returns the number of vertices
- <init>
Create a new empty tree with a DefaultEdgeFactory and directed edges.
- cloneTree
Clones the tree located at the given node. Calls #getSubtree(TreeNode) with the
given node.
- findLeastCommonAncestor
This method returns the LCA of a list of nodes.
- getLeaves
Returns an array of all leaves. This uses TreeNode#getLeaves() on the root of
the tree. Be sure the
- getName
Returns the name of this tree
- removeEdge
Delegates to #removeEdge(TreeNode,TreeNode)
- removeVertex
Removes given TreeNode from this tree.