mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-22 17:37:39 +00:00
rogueviz::sag:: min_visible_weight is now configurable
This commit is contained in:
@@ -816,6 +816,8 @@ namespace sag {
|
|||||||
printf("loglikelihood = %lf\n", (double) loglik);
|
printf("loglikelihood = %lf\n", (double) loglik);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ld min_visible_weight = .1;
|
||||||
|
|
||||||
void readsag(const char *fname) {
|
void readsag(const char *fname) {
|
||||||
maxweight = 0;
|
maxweight = 0;
|
||||||
FILE *f = fopen(fname, "rt");
|
FILE *f = fopen(fname, "rt");
|
||||||
@@ -870,7 +872,7 @@ namespace sag {
|
|||||||
} */
|
} */
|
||||||
for(int i=0; i<isize(sagedges); i++) {
|
for(int i=0; i<isize(sagedges); i++) {
|
||||||
edgeinfo& ei = 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.weight >= maxwei[ei.i] / 5 || ei.weight >= maxwei[ei.j] / 5);
|
||||||
|
|
||||||
ei.weight2 = pow((double) ei.weight, (double) edgepower) * edgemul;
|
ei.weight2 = pow((double) ei.weight, (double) edgepower) * edgemul;
|
||||||
@@ -1411,6 +1413,9 @@ int readArgs() {
|
|||||||
shift(); sag::hightemp = argf();
|
shift(); sag::hightemp = argf();
|
||||||
shift(); sag::lowtemp = argf();
|
shift(); sag::lowtemp = argf();
|
||||||
}
|
}
|
||||||
|
else if(argis("-sagmin")) {
|
||||||
|
shift(); sag::min_visible_weight = argf();
|
||||||
|
}
|
||||||
// (2) read the edge data
|
// (2) read the edge data
|
||||||
else if(argis("-sagpar")) {
|
else if(argis("-sagpar")) {
|
||||||
PHASE(3);
|
PHASE(3);
|
||||||
|
Reference in New Issue
Block a user