|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.ir.retrievalmodels.representation.suffixtree.SuffixTreeNode
public class SuffixTreeNode
This class represents the nodes of any suffix tree instance. Every nodes contains several information about its incoming edge, the suffixes it represents and its children.
Constructor Summary | |
---|---|
SuffixTreeNode()
|
Method Summary | |
---|---|
void |
addChild(SuffixTreeNode newNode)
Adds a childnode to the nodes set of children. |
java.util.List<SuffixTreeNode> |
getChildren()
Gets the set of children of this node. |
int |
getCommonPrefixLength()
Gets the length of the prefix which is common to all suffixes this node represents. |
java.lang.String |
getCommonSuffix()
Gets the common suffix represented by this node. |
java.util.List<java.lang.Integer> |
getIds()
Gets the ids of the texts which are represented by this node. |
java.lang.String |
getIncomingEdgeLabel()
Gets the label of the incoming edge of this node. |
java.util.List<java.lang.String> |
getIncomingEdgeWords(java.util.List<java.lang.String> vocabulary)
|
java.util.List<Suffix> |
getSuffixes()
Returns all suffixes this node represents. |
java.util.List<java.lang.String> |
getTexts()
Gets the set of texts which are represented by this node. |
boolean |
isLeaf()
Returns whether this node is a leaf or not. |
void |
setCommonPrefixLength(int commonPrefixLength)
Sets the length of the prefix which is common to all suffixes this node represents. |
void |
setLeaf(boolean isLeaf)
Sets whether this node should be a leaf or not. |
void |
setSuffixes(java.util.List<Suffix> suffixes)
Sets the suffixes this node should represent in a suffix tree. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SuffixTreeNode()
Method Detail |
---|
public void setSuffixes(java.util.List<Suffix> suffixes)
suffixes
- A set of suffixes.public void addChild(SuffixTreeNode newNode)
newNode
- A node.public void setCommonPrefixLength(int commonPrefixLength)
commonPrefixLength
- The common prefix length.public java.util.List<SuffixTreeNode> getChildren()
public int getCommonPrefixLength()
public java.util.List<Suffix> getSuffixes()
public boolean isLeaf()
public void setLeaf(boolean isLeaf)
isLeaf
- A flag indicating whether this node should be a leaf or not.public java.lang.String getIncomingEdgeLabel()
public java.util.List<java.lang.String> getIncomingEdgeWords(java.util.List<java.lang.String> vocabulary)
public java.lang.String getCommonSuffix()
public java.util.List<java.lang.String> getTexts()
public java.util.List<java.lang.Integer> getIds()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |