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

Method extendAssignment

test/float/trigonometric.cpp:266–276  ·  view source on GitHub ↗

Extend assignment \a x

Source from the content-addressed store, hash-verified

264 }
265 /// Extend assignment \a x
266 virtual bool extendAssignment(Assignment& x) const {
267 if ((x[0].min() > 1.0) || (x[0].max() < -1.0))
268 return false;
269 Gecode::FloatVal d = asin(x[0]);
270 if (Gecode::Float::subset(d, dom)) {
271 x.set(1, d);
272 return true;
273 } else {
274 return false;
275 }
276 }
277 /// Post constraint on \a x
278 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
279 Gecode::asin(home, x[0], x[1]);

Callers

nothing calls this directly

Calls 5

asinFunction · 0.50
subsetFunction · 0.50
minMethod · 0.45
maxMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected