public class SuffixTrie<I> extends AbstractGraph<SuffixTrieNode<I>,SuffixTrieNode<I>> implements DOTPlottableGraph<SuffixTrieNode<I>,SuffixTrieNode<I>>
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_GRAPH_REPRESENTABLE |
protected List<SuffixTrieNode<I>> |
nodes |
protected SuffixTrieNode<I> |
root |
| Modifier | Constructor and Description |
|---|---|
|
SuffixTrie()
Constructor.
|
|
SuffixTrie(boolean graphRepresentable)
Constructor.
|
protected |
SuffixTrie(boolean graphRepresentable,
SuffixTrieNode<I> root)
Internal constructor.
|
protected |
SuffixTrie(SuffixTrieNode<I> root)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SuffixTrieNode<I> |
add(I symbol,
SuffixTrieNode<I> parent)
Adds a word to the trie.
|
GraphDOTHelper<SuffixTrieNode<I>,SuffixTrieNode<I>> |
getGraphDOTHelper() |
Collection<SuffixTrieNode<I>> |
getNodes() |
Collection<SuffixTrieNode<I>> |
getOutgoingEdges(SuffixTrieNode<I> node) |
SuffixTrieNode<I> |
getRoot()
Returns the root of this trie.
|
SuffixTrieNode<I> |
getTarget(SuffixTrieNode<I> edge) |
iterator, iterator, nodeIDs, nodeIDs, size, sizecreateDynamicNodeMapping, createDynamicNodeMapping, createStaticNodeMapping, createStaticNodeMappingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDynamicNodeMapping, createStaticNodeMappingpublic static final boolean DEFAULT_GRAPH_REPRESENTABLE
protected final SuffixTrieNode<I> root
protected final List<SuffixTrieNode<I>> nodes
public SuffixTrie()
public SuffixTrie(boolean graphRepresentable)
graphRepresentable - whether the trie should be graph representable.protected SuffixTrie(SuffixTrieNode<I> root)
root - the root node.protected SuffixTrie(boolean graphRepresentable, SuffixTrieNode<I> root)
graphRepresentable - whether the trie should be graph representable.root - the root node.public Collection<SuffixTrieNode<I>> getNodes()
getNodes in interface Graph<SuffixTrieNode<I>,SuffixTrieNode<I>>public Collection<SuffixTrieNode<I>> getOutgoingEdges(SuffixTrieNode<I> node)
getOutgoingEdges in interface IndefiniteGraph<SuffixTrieNode<I>,SuffixTrieNode<I>>public SuffixTrieNode<I> getTarget(SuffixTrieNode<I> edge)
getTarget in interface IndefiniteGraph<SuffixTrieNode<I>,SuffixTrieNode<I>>public GraphDOTHelper<SuffixTrieNode<I>,SuffixTrieNode<I>> getGraphDOTHelper()
getGraphDOTHelper in interface DOTPlottableGraph<SuffixTrieNode<I>,SuffixTrieNode<I>>public SuffixTrieNode<I> add(I symbol, SuffixTrieNode<I> parent)
symbol - the first symbol of the word.parent - the remaining suffix of the word.public SuffixTrieNode<I> getRoot()
Copyright © 2013. All Rights Reserved.