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

Method extendAssignment

test/float/trigonometric.cpp:335–345  ·  view source on GitHub ↗

Extend assignment \a x

Source from the content-addressed store, hash-verified

333 }
334 /// Extend assignment \a x
335 virtual bool extendAssignment(Assignment& x) const {
336 if ((x[0].min() > 1.0) || (x[0].max() < -1.0))
337 return false;
338 Gecode::FloatVal d = acos(x[0]);
339 if (Gecode::Float::subset(d, dom)) {
340 x.set(1, d);
341 return true;
342 } else {
343 return false;
344 }
345 }
346 /// Post constraint on \a x
347 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
348 Gecode::acos(home, x[0], x[1]);

Callers

nothing calls this directly

Calls 5

acosFunction · 0.50
subsetFunction · 0.50
minMethod · 0.45
maxMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected