Interface SuffixTree

All Known Implementing Classes:
AbstractSuffixTree, CharSequenceSuffixTree

public interface SuffixTree
A general interface for a suffix tree for a sequence of elements (most commonly characters).
Author:
Garret Wilson
  • Method Details

    • isExplicit

      boolean isExplicit()
      Returns:
      Whether the suffix tree is explicit, with every suffix ending on a leaf node.
    • getNodes

      Iterable<? extends SuffixTree.Node> getNodes()
      Returns:
      A read-only iterable of the nodes in the tree.
    • getNodeCount

      int getNodeCount()
      Returns:
      The number of nodes in the suffix tree.
    • getRootNode

      SuffixTree.Node getRootNode()
      Retrieves the root node of the tree. This is a convenience method to retrieve the node with index zero.
      Returns:
      The identified node.
    • getNode

      SuffixTree.Node getNode(int nodeIndex)
      Retrieves the identified node.
      Parameters:
      nodeIndex - The index of the node to retrieve.
      Returns:
      The identified node.
      Throws:
      IndexOutOfBoundsException - if the given node index does not identify a node in this suffix tree.
    • getEdges

      Iterable<? extends SuffixTree.Edge> getEdges()
      Returns:
      A read-only iterable of edges in the tree.