mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
ng_restructuring: wire start to tops in idx order
This commit is contained in:
parent
1a24b0b4db
commit
e108cb841f
@ -52,7 +52,11 @@ namespace ue2 {
|
||||
static
|
||||
void wireStartToTops(NGHolder &g, const flat_set<NFAVertex> &tops,
|
||||
vector<NFAEdge> &tempEdges) {
|
||||
for (NFAVertex v : tops) {
|
||||
// Construct edges in vertex index order, for determinism.
|
||||
vector<NFAVertex> ordered_tops(begin(tops), end(tops));
|
||||
sort(begin(ordered_tops), end(ordered_tops), make_index_ordering(g));
|
||||
|
||||
for (NFAVertex v : ordered_tops) {
|
||||
assert(!isLeafNode(v, g));
|
||||
|
||||
const NFAEdge &e = add_edge(g.start, v, g).first;
|
||||
|
Loading…
x
Reference in New Issue
Block a user