void
Slur_configuration::add_score (Real s, string desc)
{
+ if (s < 0)
+ {
+ programming_error ("Negative demerits found for slur. Ignoring");
+ s = 0.0;
+ }
+
if (s)
{
- score_card_ += to_string ("%s=%.2f ", desc.c_str (), s);
+ if (score_card_.length () > 0)
+ score_card_ += ", ";
+ score_card_ += to_string ("%s=%.2f", desc.c_str (), s);
score_ += s;
}
}
demerit *= exp (state.dir_ * d * slope
* state.parameters_.edge_slope_exponent_);
- add_score (demerit, "edge");
+
+ string dir_str = d == LEFT ? "L" : "R";
+ add_score (demerit, dir_str + " edge");
}
while (flip (&d) != LEFT);
}