MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / iter

Method iter

code/strings/aho_corasick.cpp:13–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 aho_corasick(vector<string> keywords) {
12 go = new go_node();
13 iter(k, keywords) {
14 go_node *cur = go;
15 iter(c, *k)
16 cur = cur->next.find(*c) != cur->next.end() ?
17 cur->next[*c] : (cur->next[*c] = new go_node());
18 cur->out = new out_node(*k, cur->out); }
19 queue<go_node*> q;
20 iter(a, go->next) q.push(a->second);
21 while (!q.empty()) {

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.80
iterFunction · 0.50
findMethod · 0.45

Tested by

no test coverage detected