|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
One Aho-Corasick trie/DFA node: a dense 256-entry goto row plus fail/output links. More...
#include <aho_corasick.hpp>
Public Member Functions | |
| ac_node () | |
| A trie node with no edges yet: every goto_ entry is -1 until ac_automaton::build makes the row total. | |
One Aho-Corasick trie/DFA node: a dense 256-entry goto row plus fail/output links.
goto_ starts as a sparse trie edge set (missing = -1) during ac_automaton::build and ends as a TOTAL transition function (goto-function-as-DFA): every entry is a valid state index once construction finishes, so a search-time lookup is a single array read with no fail-chain walk. Dense only, no sparse or hybrid row: this engine is built for literal alternations of tens of nodes, where the whole table is a few kilobytes, and a sparse row would trade that certain cost for a lookup that is no longer one read.