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

Method fix

gecode/int/trace/tracer.cpp:71–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 void
72 StdIntTracer::fix(const Space&, const IntTraceRecorder& t) {
73 os << "trace<Int>::fix(id:" << t.id();
74 if (t.group().in())
75 os << ",g:" << t.group().id();
76 os << ") slack: ";
77 double sl_i = static_cast<double>(t.slack().initial());
78 double sl_p = static_cast<double>(t.slack().previous());
79 double sl_c = static_cast<double>(t.slack().current());
80 double p_c = 100.0 * (sl_c / sl_i);
81 double p_d = 100.0 * (sl_p / sl_i) - p_c;
82 os << std::showpoint << std::setprecision(4)
83 << p_c << "% - "
84 << std::showpoint << std::setprecision(4)
85 << p_d << '%'
86 << std::endl;
87 }
88
89 void
90 StdIntTracer::fail(const Space&, const IntTraceRecorder& 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