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

Method solution

test/float/transcendental.cpp:167–171  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

165 : Test("Transcendental::Log::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
166 /// %Test whether \a x is solution
167 virtual MaybeType solution(const Assignment& x) const {
168 if (x[0].max() < 0.0)
169 return MT_FALSE;
170 return eq(log(x[0]), x[0]);
171 }
172 /// Post constraint on \a x
173 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
174 Gecode::log(home, x[0], x[0]);

Callers

nothing calls this directly

Calls 2

logFunction · 0.50
maxMethod · 0.45

Tested by

no test coverage detected