From a9275adce368caaeaabc54bf0ca62a20a074e568 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 6 May 2019 15:00:10 -0400 Subject: changed the way cutoffs function to prevent erros, and added measurement for path length --- lib/src/network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/src') diff --git a/lib/src/network.cpp b/lib/src/network.cpp index 0cacdf9..250a38e 100644 --- a/lib/src/network.cpp +++ b/lib/src/network.cpp @@ -296,8 +296,8 @@ void elastic_network::fracture(hooks& m, double weight, double cutoff) { current_info cx = hook_x.solve(fuses); current_info cy = hook_y.solve(fuses); - bool done_x = cx.conductivity < cutoff * G.vertices.size() || cx.conductivity != cx.conductivity; - bool done_y = cy.conductivity < cutoff * G.vertices.size() || cy.conductivity != cy.conductivity; + bool done_x = cx.conductivity < 0.1 / G.edges.size(); + bool done_y = cy.conductivity < 0.1 / G.edges.size(); if (done_x && done_y) { break; -- cgit v1.2.3-70-g09d2