rogueviz::sag:: min_visible_weight is now configurable

This commit is contained in:
Zeno Rogue 2018-06-28 10:28:37 +02:00
parent 3e566b9fdb
commit 95b1c4d9fa
1 changed files with 6 additions and 1 deletions

View File

@ -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<isize(sagedges); i++) {
edgeinfo& ei = sagedges[i];
ei.visible = ei.weight >= 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);