From 95b1c4d9fa8a5f9eb8b57927939dd7ffb9ccd7ff Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 28 Jun 2018 10:28:37 +0200 Subject: [PATCH] rogueviz::sag:: min_visible_weight is now configurable --- rogueviz.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rogueviz.cpp b/rogueviz.cpp index 4f32318b..9bc5a1bb 100644 --- a/rogueviz.cpp +++ b/rogueviz.cpp @@ -816,6 +816,8 @@ namespace sag { printf("loglikelihood = %lf\n", (double) loglik); } + ld min_visible_weight = .1; + void readsag(const char *fname) { maxweight = 0; FILE *f = fopen(fname, "rt"); @@ -870,7 +872,7 @@ namespace sag { } */ for(int i=0; i= 0.1; + ei.visible = ei.weight >= min_visible_weight; // (ei.weight >= maxwei[ei.i] / 5 || ei.weight >= maxwei[ei.j] / 5); ei.weight2 = pow((double) ei.weight, (double) edgepower) * edgemul; @@ -1411,6 +1413,9 @@ int readArgs() { shift(); sag::hightemp = argf(); shift(); sag::lowtemp = argf(); } + else if(argis("-sagmin")) { + shift(); sag::min_visible_weight = argf(); + } // (2) read the edge data else if(argis("-sagpar")) { PHASE(3);