Defines | |
| #define | tail_is_walkable_char(t, s, suffix_idx, c) (tail_get_suffix ((t), (s)) [suffix_idx] == (c)) |
| Test walkability in tail with a character. | |
Typedefs | |
| typedef _Tail | Tail |
| Double-array structure type. | |
Functions | |
| Tail * | tail_open (const char *path, const char *name, TrieIOMode mode) |
| Open tail data from file. | |
| int | tail_close (Tail *t) |
| Close tail data. | |
| int | tail_save (Tail *t) |
| Save tail data. | |
| const TrieChar * | tail_get_suffix (const Tail *t, TrieIndex index) |
| Get suffix. | |
| Bool | tail_set_suffix (Tail *t, TrieIndex index, const TrieChar *suffix) |
| Set suffix of existing entry. | |
| TrieIndex | tail_add_suffix (Tail *t, const TrieChar *suffix) |
| Add a new suffix. | |
| TrieData | tail_get_data (Tail *t, TrieIndex index) |
| Get data associated to suffix entry. | |
| Bool | tail_set_data (Tail *t, TrieIndex index, TrieData data) |
| Set data associated to suffix entry. | |
| void | tail_delete (Tail *t, TrieIndex index) |
| Delete suffix entry. | |
| int | tail_walk_str (Tail *t, TrieIndex s, short *suffix_idx, const TrieChar *str, int len) |
| Walk in tail with a string. | |
| Bool | tail_walk_char (Tail *t, TrieIndex s, short *suffix_idx, TrieChar c) |
| Walk in tail with a character. | |
| #define tail_is_walkable_char | ( | t, | |||
| s, | |||||
| suffix_idx, | |||||
| c | ) | (tail_get_suffix ((t), (s)) [suffix_idx] == (c)) |
Test walkability in tail with a character.
| t | : the tail data | |
| s | : the tail data index | |
| suffix_idx | : current character index in suffix | |
| c | : the character to test walkability |
Add a new suffix.
| t | : the tail data | |
| suffix | : the new suffix |
| int tail_close | ( | Tail * | t | ) |
Close tail data.
| t | : the tail data |
Delete suffix entry.
| t | : the tail data | |
| index | : the index of the suffix to delete |
Get data associated to suffix entry.
| t | : the tail data | |
| index | : the index of the suffix |
Get suffix.
| t | : the tail data | |
| index | : the index of the suffix |
| Tail* tail_open | ( | const char * | path, | |
| const char * | name, | |||
| TrieIOMode | mode | |||
| ) |
Open tail data from file.
| path | : the path that stores the tail files | |
| name | : the name of the tail data (not actual file name) | |
| mode | : openning mode, read or write |
| int tail_save | ( | Tail * | t | ) |
Save tail data.
| t | : the tail data |
Set data associated to suffix entry.
| t | : the tail data | |
| index | : the index of the suffix | |
| data | : the data to set |
Set suffix of existing entry.
| t | : the tail data | |
| index | : the index of the suffix | |
| suffix | : the new suffix |
Walk in tail with a character.
| t | : the tail data | |
| s | : the tail data index | |
| suffix_idx | : pointer to current character index in suffix | |
| c | : the character to use in walking |
Walk in tail with a string.
| t | : the tail data | |
| s | : the tail data index | |
| suffix_idx | : pointer to current character index in suffix | |
| str | : the string to use in walking | |
| len | : total characters in str to walk |
1.4.7