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

Method solution

test/float/trigonometric.cpp:239–243  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

237 : Test("Trigonometric::ASin::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
238 /// %Test whether \a x is solution
239 virtual MaybeType solution(const Assignment& x) const {
240 if ((x[0].min() > 1.0) || (x[0].max() < -1.0))
241 return MT_FALSE;
242 return eq(asin(x[0]), x[1]);
243 }
244 /// Post constraint on \a x
245 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
246 if (flip())

Callers

nothing calls this directly

Calls 3

asinFunction · 0.50
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected