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

Method fail

gecode/float/trace/tracer.cpp:80–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 void
81 StdFloatTracer::fail(const Space&, const FloatTraceRecorder& t) {
82 os << "trace<Float>::fail(id:" << t.id();
83 if (t.group().in())
84 os << ",g:" << t.group().id();
85 os << ") slack: ";
86 double sl_i = static_cast<double>(t.slack().initial());
87 double sl_p = static_cast<double>(t.slack().previous());
88 double sl_c = static_cast<double>(t.slack().current());
89 double p_c = 100.0 * (sl_c / sl_i);
90 double p_d = 100.0 * (sl_p / sl_i) - p_c;
91 os << std::showpoint << std::setprecision(4)
92 << p_c << "% - "
93 << std::showpoint << std::setprecision(4)
94 << p_d << '%'
95 << std::endl;
96 }
97
98 void
99 StdFloatTracer::done(const Space&, const FloatTraceRecorder& t) {

Callers 5

runMetaMethod · 0.45
slaveMethod · 0.45
p_int_inFunction · 0.45
p_set_inFunction · 0.45
dopostFunction · 0.45

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