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

Method fix

gecode/set/trace/tracer.cpp:84–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 void
85 StdSetTracer::fix(const Space&, const SetTraceRecorder& t) {
86 os << "trace<Set>::fix(id:" << t.id();
87 if (t.group().in())
88 os << ",g:" << t.group().id();
89 os << ") slack: ";
90 double sl_i = static_cast<double>(t.slack().initial());
91 double sl_p = static_cast<double>(t.slack().previous());
92 double sl_c = static_cast<double>(t.slack().current());
93 double p_c = 100.0 * (sl_c / sl_i);
94 double p_d = 100.0 * (sl_p / sl_i) - p_c;
95 os << std::showpoint << std::setprecision(4)
96 << p_c << "% - "
97 << std::showpoint << std::setprecision(4)
98 << p_d << '%'
99 << std::endl;
100 }
101
102 void
103 StdSetTracer::fail(const Space&, const SetTraceRecorder& 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