|
void | build (bool heavy=true) |
| 前計算 オートマトンを構築する
|
|
unordered_map< int, int > | match (const string &str, int now=0) |
| str の中に出現する全パターンの出現回数を返す
|
|
pair< int64_t, int > | move (const char &c, int now=0) |
| 現在のノード now から文字 c で遷移したときの(見つかったパターンの総数, 次のノード)を返す
|
|
pair< int64_t, int > | move (const string &str, int now=0) |
| str に対して move を適用する。(見つかったパターンの総数, 最終ノードを返す)
|
|
| Trie () |
|
| Trie (int len) |
|
void | update_direct (int node, int id) |
|
void | update_child (int node, int child, int id) |
|
void | add (const string &str, int str_index, int node_index, int id) |
|
void | add (const string &str, int id) |
|
void | add (const string &str) |
| 文字列 str を追加する
|
|
void | query (const string &str, const function< void(int)> &f, int str_index, int node_index) |
|
void | query (const string &str, const function< void(int)> &f) |
| strをprefixとして持つ全ての文字列に対し、見つかった文字列のインデックスそれぞれに対してfを実行する
|
|
int | count () const |
| 文字列の総数
|
|
int | count (const string &s) |
|
int | size () const |
| ノードの総数
|
|
void | insert (const string &s) |
|
void | erase (const string &s) |
|
template<int char_size, int margin>
struct AhoCorasick< char_size, margin >
AhoCorasick
aho.hpp の 76 行目に定義があります。