mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-02 04:27:42 +03:00
smallwrite: bfs ordering, refine daddy selection
This commit is contained in:
committed by
Matthew Barr
parent
3b3f6b739c
commit
10f52346ca
@@ -452,6 +452,13 @@ void buildAutomaton(LitTrie &trie,
|
||||
ACVisitor ac_vis(trie, failure_map, ordering);
|
||||
boost::breadth_first_search(trie, trie.root, visitor(ac_vis));
|
||||
|
||||
// Renumber with BFS ordering, which is assumed by other DFA construction
|
||||
// code (i.e. Sherman state computation).
|
||||
size_t idx = 0;
|
||||
for (auto v : ordering) {
|
||||
trie[v].index = idx++;
|
||||
}
|
||||
|
||||
// Compute missing edges from failure map.
|
||||
for (auto v : ordering) {
|
||||
DEBUG_PRINTF("vertex %zu\n", trie[v].index);
|
||||
|
Reference in New Issue
Block a user