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

Method solution

test/float/trigonometric.cpp:359–363  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

357 : Test("Trigonometric::ACos::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
358 /// %Test whether \a x is solution
359 virtual MaybeType solution(const Assignment& x) const {
360 if ((x[0].min() > 1.0) || (x[0].max() < -1.0))
361 return MT_FALSE;
362 return eq(acos(x[0]), x[0]);
363 }
364 /// Post constraint on \a x
365 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
366 Gecode::acos(home, x[0], x[0]);

Callers

nothing calls this directly

Calls 3

acosFunction · 0.50
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected