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

Method extendAssignment

test/float/arithmetic.cpp:334–342  ·  view source on GitHub ↗

Extend assignment \a x

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

sqrtFunction · 0.50
absFunction · 0.50
subsetFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected