/*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
static
void removeVertices(const flat_set<NFAVertex> &verts, NFAUndirectedGraph &ug,
- ue2::unordered_map<NFAVertex, NFAUndirectedVertex> &old2new,
- ue2::unordered_map<NFAVertex, NFAUndirectedVertex> &new2old) {
+ ue2::unordered_map<NFAVertex, NFAUndirectedVertex> &old2new,
+ ue2::unordered_map<NFAUndirectedVertex, NFAVertex> &new2old) {
for (auto v : verts) {
assert(contains(old2new, v));
auto uv = old2new.at(v);
createUnGraph(g.g, true, true, ug, old2new, newIdx2old);
// Construct reverse mapping.
- ue2::unordered_map<NFAVertex, NFAUndirectedVertex> new2old;
+ ue2::unordered_map<NFAUndirectedVertex, NFAVertex> new2old;
for (const auto &m : old2new) {
new2old.emplace(m.second, m.first);
}
// Collect vertex lists per component.
for (const auto &m : split_components) {
- NFAVertex uv = m.first;
+ NFAUndirectedVertex uv = m.first;
u32 c = m.second;
assert(contains(new2old, uv));
NFAVertex v = new2old.at(uv);
/*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
const vector<RoseInEdge> &local = by_src[v];
vector<NGHolder *> graphs;
- map<RoseInVertex, vector<RoseInEdge> > by_graph;
+ map<NGHolder *, vector<RoseInEdge> > by_graph;
for (const auto &e : local) {
NGHolder *gp = ig[e].graph.get();
if (!contains(by_graph, gp)) {
/*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
w = created[key];
}
- NFAVertex p = pv.first;
+ RoseVertex p = pv.first;
RoseEdge e;
bool added;
const vector<RoseVertex> &images = vertex_map[u];
// We should have no dupes.
- assert(set<NFAVertex>(images.begin(), images.end()).size()
+ assert(set<RoseVertex>(images.begin(), images.end()).size()
== images.size());
for (auto v_image : images) {
}
static
-u32 findMaxSafeDelay(const RoseInGraph &ig, RoseInVertex u, RoseVertex v) {
+u32 findMaxSafeDelay(const RoseInGraph &ig, RoseInVertex u, RoseInVertex v) {
// First, check the overlap constraints on (u,v).
size_t max_delay;
if (ig[v].type == RIV_LITERAL) {
// Called by isNoRunsLiteral below.
static
-bool isNoRunsVertex(const RoseBuildImpl &build, NFAVertex u) {
+bool isNoRunsVertex(const RoseBuildImpl &build, RoseVertex u) {
const RoseGraph &g = build.g;
if (!g[u].isBoring()) {
DEBUG_PRINTF("u=%zu is not boring\n", g[u].idx);
deque<UncalcLeafKey> &ordered) {
const RoseGraph &g = tbi.g;
- vector<NFAVertex> suffix_vertices; // vertices with suffix graphs
+ vector<RoseVertex> suffix_vertices; // vertices with suffix graphs
ue2::unordered_map<const NGHolder *, u32> fcount; // ref count per graph
for (auto v : vertices_range(g)) {
ReportID new_report = tbi.getNewNfaReport();
shared_ptr<NGHolder> new_graph = cloneHolder(*b_h);
duplicateReport(*new_graph, b_left.leftfix_report, new_report);
- pruneReportIfUnused(tbi, new_graph, set<NFAVertex>(),
- b_left.leftfix_report);
+ pruneReportIfUnused(tbi, new_graph, {}, b_left.leftfix_report);
rrm[a_left_id].erase(a);
rrm[b_left_id].erase(b);