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

Method done

gecode/float/trace/tracer.cpp:98–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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