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

Method solution

test/float/trigonometric.cpp:290–294  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

288 : Test("Trigonometric::ASin::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
289 /// %Test whether \a x is solution
290 virtual MaybeType solution(const Assignment& x) const {
291 if ((x[0].min() > 1.0) || (x[0].max() < -1.0))
292 return MT_FALSE;
293 return eq(asin(x[0]), x[0]);
294 }
295 /// Post constraint on \a x
296 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
297 Gecode::asin(home, x[0], x[0]);

Callers

nothing calls this directly

Calls 3

asinFunction · 0.50
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected