summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/src/network.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/src/network.cpp b/lib/src/network.cpp
index 58dde78..2bbd9b8 100644
--- a/lib/src/network.cpp
+++ b/lib/src/network.cpp
@@ -310,8 +310,6 @@ void network::update_backbone(const std::vector<double>& c, const std::array<dou
// if any of them spans the torus and therefore can carry current.
if (std::any_of(all_sigs.begin(), all_sigs.end(), cycle_check_current)) {
// If none does, we remove it from the backbone!
- seen_pairs_x[{G.dual_edges[i].v[0], G.dual_edges[i].v[1]}] = true;
- seen_pairs_y[{G.dual_edges[i].v[0], G.dual_edges[i].v[1]}] = true;
backbone[i] = true;
// We're not done yet: we've severed the stem but the pop remains! We
@@ -347,7 +345,9 @@ void network::update_backbone(const std::vector<double>& c, const std::array<dou
}
}
}
- } else if (std::any_of(all_sigs.begin(), all_sigs.end(), cycle_check_wrap_x)) {
+ }
+
+ if (std::any_of(all_sigs.begin(), all_sigs.end(), cycle_check_wrap_x)) {
// If the bond separates a wrapping path, breaking it would end the
// fracture and therefore it will never be removed from the backbone
// in this manner. We can skip it in the future.
@@ -462,10 +462,6 @@ void network::update_backbone(const std::vector<double>& c, const std::array<dou
}
if (std::any_of(all_sigs.begin(), all_sigs.end(), cycle_check_current)) {
- // one of our pairs qualifies for trimming!
- seen_pairs_x[{d1, d2}] = true;
- seen_pairs_y[{d1, d2}] = true;
-
// We separate the flaps of the bowtie (there may be more than
// two!) into distinct sets.
std::list<std::set<unsigned>> flaps = this->get_tie_flaps(v);
@@ -498,7 +494,9 @@ void network::update_backbone(const std::vector<double>& c, const std::array<dou
}
}
}
- } else if (std::any_of(all_sigs.begin(), all_sigs.end(), cycle_check_wrap_x)) {
+ }
+
+ if (std::any_of(all_sigs.begin(), all_sigs.end(), cycle_check_wrap_x)) {
seen_pairs_x[{d1, d2}] = true;
} else if (std::any_of(all_sigs.begin(), all_sigs.end(), cycle_check_wrap_y)) {
seen_pairs_y[{d1, d2}] = true;