Skip to content
Snippets Groups Projects
Commit d196042c authored by Radek Hušek's avatar Radek Hušek Committed by Radek Hušek
Browse files

Implement EXPLICIT_NORMAL_EDGES

Also fixes related typos
parent 95e8bbd6
No related branches found
No related tags found
No related merge requests found
...@@ -14,9 +14,9 @@ BOOL_OPTION(OPTIMIZE_COMBINE, 0) ...@@ -14,9 +14,9 @@ BOOL_OPTION(OPTIMIZE_COMBINE, 0)
BOOL_OPTION(USE_NEXT_FORB, 1) BOOL_OPTION(USE_NEXT_FORB, 1)
BOOL_OPTION(EXPLICIT_NOMAL_EDGES, 0) BOOL_OPTION(EXPLICIT_NORMAL_EDGES, 0)
REQUIRES(EXPLICIT_NORMAL_EDGES, USE_NEXT_FORB) REQUIRES(EXPLICIT_NORMAL_EDGES, USE_NEXT_FORB)
BOOL_OPTION(USE_TWO_CUTS, 0) BOOL_OPTION(USE_TWO_CUTS, 0)
REQUIRES(USE_TWO_CUTS, USE_NEXT_FORB && EXPLICIT_NOMAL_EDGES) REQUIRES(USE_TWO_CUTS, USE_NEXT_FORB && EXPLICIT_NORMAL_EDGES)
...@@ -44,6 +44,9 @@ struct Tester : public AbstractTester { ...@@ -44,6 +44,9 @@ struct Tester : public AbstractTester {
std::vector<EdgeId> classEdges; std::vector<EdgeId> classEdges;
std::vector< std::pair<EdgeId, Mapping> > nonClassEdges; std::vector< std::pair<EdgeId, Mapping> > nonClassEdges;
# if EXPLICIT_NORMAL_EDGES
std::vector< EdgeId > normalEdges;
# endif
virtual void init( virtual void init(
int edges_, int edges_,
...@@ -75,12 +78,22 @@ struct Tester : public AbstractTester { ...@@ -75,12 +78,22 @@ struct Tester : public AbstractTester {
map.assign(edge, neg ? Ring::one : Ring::negate(Ring::one)); map.assign(edge, neg ? Ring::one : Ring::negate(Ring::one));
} }
} }
# if EXPLICIT_NORMAL_EDGES
std::vector<bool> edgeList(edges, 1);
for (size_t i = 0; i < edges; i++)
if (edgeList[i]) normalEdges.push_back(i);
# endif
} }
#if USE_NEXT_FORB #if USE_NEXT_FORB
bool nextForb(Mapping& forb) { bool nextForb(Mapping& forb) {
# if EXPLICIT_NORMAL_EDGES
for (auto i : normalEdges) {
# else
for (size_t i = 0; i < edges; i++) { for (size_t i = 0; i < edges; i++) {
# endif
T v = forb[i] + 1; T v = forb[i] + 1;
if (v >= Ring::size) { if (v >= Ring::size) {
forb.assign(i, 1); forb.assign(i, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment