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

Method fail

gecode/set/trace/tracer.cpp:102–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 void
103 StdSetTracer::fail(const Space&, const SetTraceRecorder& t) {
104 os << "trace<Set>::fail(id:" << t.id();
105 if (t.group().in())
106 os << ",g:" << t.group().id();
107 os << ") slack: ";
108 double sl_i = static_cast<double>(t.slack().initial());
109 double sl_p = static_cast<double>(t.slack().previous());
110 double sl_c = static_cast<double>(t.slack().current());
111 double p_c = 100.0 * (sl_c / sl_i);
112 double p_d = 100.0 * (sl_p / sl_i) - p_c;
113 os << std::showpoint << std::setprecision(4)
114 << p_c << "% - "
115 << std::showpoint << std::setprecision(4)
116 << p_d << '%'
117 << std::endl;
118 }
119
120 void
121 StdSetTracer::done(const Space&, const SetTraceRecorder& t) {

Callers 1

pairFunction · 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