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

Method solution

test/float/transcendental.cpp:255–259  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

253 : Test("Transcendental::Pow::N::"+str(_base)+"::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false), base(_base) {}
254 /// %Test whether \a x is solution
255 virtual MaybeType solution(const Assignment& x) const {
256 if (base <= 0.0)
257 return MT_FALSE;
258 return eq(exp(x[0] * log(base)), x[1]);
259 }
260 /// Post constraint on \a x
261 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
262 Gecode::pow(home, base, x[0], x[1]);

Callers

nothing calls this directly

Calls 2

expFunction · 0.50
logFunction · 0.50

Tested by

no test coverage detected