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

Method solution

test/float/trigonometric.cpp:308–312  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

306 : Test("Trigonometric::ACos::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
307 /// %Test whether \a x is solution
308 virtual MaybeType solution(const Assignment& x) const {
309 if ((x[0].min() > 1.0) || (x[0].max() < -1.0))
310 return MT_FALSE;
311 return eq(acos(x[0]), x[1]);
312 }
313 /// Post constraint on \a x
314 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
315 if (flip())

Callers

nothing calls this directly

Calls 3

acosFunction · 0.50
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected