summaryrefslogtreecommitdiff
path: root/lib/src
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-05-07 12:34:37 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-05-07 12:34:37 -0400
commit98b6303894018c626b68e135c892af46b4a6b9de (patch)
treebde72caea8c9199ae9f1035259de4a843863cf90 /lib/src
parentbbad06faef7c5386e9179f7d2a0bcc946187bb15 (diff)
downloadfuse_networks-98b6303894018c626b68e135c892af46b4a6b9de.tar.gz
fuse_networks-98b6303894018c626b68e135c892af46b4a6b9de.tar.bz2
fuse_networks-98b6303894018c626b68e135c892af46b4a6b9de.zip
fixed bounds for good, expect maybe later specialization to the number of remaining fuses
Diffstat (limited to 'lib/src')
-rw-r--r--lib/src/network.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/src/network.cpp b/lib/src/network.cpp
index 47e5851..e885fcb 100644
--- a/lib/src/network.cpp
+++ b/lib/src/network.cpp
@@ -324,7 +324,7 @@ void elastic_network::fracture(hooks& m, double weight, double cutoff) {
long double max_val = std::numeric_limits<long double>::lowest();
for (unsigned i = 0; i < G.edges.size(); i++) {
- if (!fuses[i] && ctot.currents[i] > cutoff) {
+ if (!fuses[i] && ctot.currents[i] > 1.0 / G.edges.size()) {
long double val = logl(ctot.currents[i]) - thresholds[i];
if (val > max_val) {
max_val = val;