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

Method fail

gecode/int/trace/tracer.cpp:89–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 void
90 StdIntTracer::fail(const Space&, const IntTraceRecorder& t) {
91 os << "trace<Int>::fail(id:" << t.id();
92 if (t.group().in())
93 os << ",g:" << t.group().id();
94 os << ") slack: ";
95 double sl_i = static_cast<double>(t.slack().initial());
96 double sl_p = static_cast<double>(t.slack().previous());
97 double sl_c = static_cast<double>(t.slack().current());
98 double p_c = 100.0 * (sl_c / sl_i);
99 double p_d = 100.0 * (sl_p / sl_i) - p_c;
100 os << std::showpoint << std::setprecision(4)
101 << p_c << "% - "
102 << std::showpoint << std::setprecision(4)
103 << p_d << '%'
104 << std::endl;
105 }
106
107 void
108 StdIntTracer::done(const Space&, const IntTraceRecorder& t) {

Callers 7

relFunction · 0.45
sequenceFunction · 0.45
binpackingFunction · 0.45
pairFunction · 0.45
pairWithOffsetsFunction · 0.45
relFunction · 0.45
postFunction · 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