|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSuffixTree
Field Summary | |
private java.lang.String |
alphabet
permitted characters in the strings |
private int |
noNodes
total number of nodes in the tree |
private InternalNode |
root
the root of the tree |
private ListOfTokens |
tokens
the strings in the tree |
Constructor Summary | |
SuffixTree(java.lang.String alphabet)
Alphabet specifies what characters are allowed in the strings added to the suffix tree. |
Method Summary | |
(package private) int |
addToken(java.lang.String token)
adds a new string to the suffix tree |
(package private) int |
getIndex(int position)
Returns the index of the token that contains position. |
(package private) int |
getLCE(java.lang.String pattern,
int pos,
NodeInterface node)
Returns the length of the Longest Common Extension (LCE), starting at position pos of the pattern, and leftIndex from the string collection. |
int |
getNoNodes()
returns the total no of nodes in the tree |
(package private) InternalNode |
getRoot()
returns the root of the tree |
(package private) int |
getStart(int indexToken)
returns the starting index of the token at indexToken |
(package private) java.lang.String |
getSubstring(int leftIndex)
returns the suffix starting at leftIndex |
(package private) java.lang.String |
getSubstring(int leftIndex,
int length)
returns the substring starting at leftIndex and having length length from the string collection |
(package private) int |
getTotalLength()
returns the total length of the strings in the tree |
(package private) void |
updateNoNodes(int value)
updates the total no of nodes in the tree, after a new string was inserted |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private InternalNode root
private java.lang.String alphabet
private ListOfTokens tokens
private int noNodes
Constructor Detail |
public SuffixTree(java.lang.String alphabet)
Method Detail |
final int addToken(java.lang.String token)
final InternalNode getRoot()
final java.lang.String getSubstring(int leftIndex, int length)
final int getLCE(java.lang.String pattern, int pos, NodeInterface node)
final java.lang.String getSubstring(int leftIndex)
final int getStart(int indexToken)
final int getIndex(int position)
final int getTotalLength()
public final int getNoNodes()
final void updateNoNodes(int value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |