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

Method solution

test/float/transcendental.cpp:117–121  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

115 : Test("Transcendental::Log::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
116 /// %Test whether \a x is solution
117 virtual MaybeType solution(const Assignment& x) const {
118 if (x[0].max() < 0.0)
119 return MT_FALSE;
120 return eq(log(x[0]), x[1]);
121 }
122 /// Post constraint on \a x
123 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
124 if (flip())

Callers

nothing calls this directly

Calls 2

logFunction · 0.50
maxMethod · 0.45

Tested by

no test coverage detected