MCPcopy Create free account
hub / github.com/Gecode/gecode / fix

Method fix

gecode/float/trace/tracer.cpp:62–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 void
63 StdFloatTracer::fix(const Space&, const FloatTraceRecorder& t) {
64 os << "trace<Float>::fix(id:" << t.id();
65 if (t.group().in())
66 os << ",g:" << t.group().id();
67 os << ") slack: ";
68 double sl_i = static_cast<double>(t.slack().initial());
69 double sl_p = static_cast<double>(t.slack().previous());
70 double sl_c = static_cast<double>(t.slack().current());
71 double p_c = 100.0 * (sl_c / sl_i);
72 double p_d = 100.0 * (sl_p / sl_i) - p_c;
73 os << std::showpoint << std::setprecision(4)
74 << p_c << "% - "
75 << std::showpoint << std::setprecision(4)
76 << p_d << '%'
77 << std::endl;
78 }
79
80 void
81 StdFloatTracer::fail(const Space&, const FloatTraceRecorder& t) {

Callers

nothing calls this directly

Calls 7

groupMethod · 0.80
initialMethod · 0.80
previousMethod · 0.80
currentMethod · 0.80
idMethod · 0.45
inMethod · 0.45
slackMethod · 0.45

Tested by

no test coverage detected