|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.id.pbw.hyfo.hyph.ShortTernaryTree
public class ShortTernaryTree
| Nested Class Summary | |
|---|---|
class |
ShortTernaryTree.TernaryIterator
|
class |
ShortTernaryTree.TernaryTreeWalker
|
| Constructor Summary | |
|---|---|
ShortTernaryTree(int size)
Creates a new instance of ShortTernaryTree |
|
| Method Summary | |
|---|---|
Subsearch |
find_next(int[] key,
int index,
int node_num)
Returns a Subsearch representing a position in the tree at which
non-null DATA was found while tracing a given key. |
int |
find(int[] key)
Find the data pointer associated with a given key, or 0 if the key does not occur . |
int |
get_equal_node(int node)
Gets the node number from the equal link of the given node. |
String |
get_key(List<Integer> stack)
Derive a string from the list of codepoints representing the key. |
int |
get_node_data_ptr(int node)
Gets the node data. |
void |
initialize_data_array()
Finalizes the data initialization of this ShortTernaryTree. |
ShortTernaryTree.TernaryIterator |
iterator()
Gets an in-order iterator over the tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShortTernaryTree(int size)
throws HyphenationException
HyphenationException| Method Detail |
|---|
public int get_node_data_ptr(int node)
get_node_data_ptr in interface TernaryTreenode - the number of the data node.
public int find(int[] key)
find in interface TernaryTreekey - the key, as an array of Unicode codepoints.
DATA or null.
public Subsearch find_next(int[] key,
int index,
int node_num)
Subsearch representing a position in the tree at which
non-null DATA was found while tracing a given key. This is a
match of a prefix of the search key. The returned Subsearch can
subsequently be used to find the next longer prefix of the key with
associated DATA.
find_next in interface TernaryTreekey - the key of which prefixes are being sought.index - the next Unicode character of the search string. A prefix
equal to or longer than this position of the key will be the next found,
if one exists.node_num - the node number at which the search commences.
Subsearch representing the next located prefix of the
key, or null.
public void initialize_data_array()
throws HyphenationException
ShortTernaryTree. This assumes that
all required nodes have been added to the tree. The parallel arrays representing the
node links (equal, less, greater, parent and the
pointer to the node data are all reset to their minimum size. The List of
DATA values which has been collected is reduced to an array.
initialize_data_array in interface TernaryTreeHyphenationExceptionpublic String get_key(List<Integer> stack)
TernaryTree
get_key in interface TernaryTreestack - the list of codepoints representing the key.
public ShortTernaryTree.TernaryIterator iterator()
TernaryTree
iterator in interface TernaryTreepublic int get_equal_node(int node)
TernaryTree
get_equal_node in interface TernaryTreenode - the node whoe equal link is required.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||