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

Method extendAssignment

test/float/arithmetic.cpp:470–480  ·  view source on GitHub ↗

Extend assignment \a x

Source from the content-addressed store, hash-verified

468 }
469 /// Extend assignment \a x
470 virtual bool extendAssignment(Assignment& x) const {
471 if ((n == 0) || (x[0].max() < 0))
472 return false;
473 Gecode::FloatVal d = nroot(x[0],n);
474 if (Gecode::Float::subset(d, dom)) {
475 x.set(1, d);
476 return true;
477 } else {
478 return false;
479 }
480 }
481 /// Post constraint on \a x
482 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
483 Gecode::nroot(home, x[0], n, x[1]);

Callers

nothing calls this directly

Calls 4

nrootFunction · 0.50
subsetFunction · 0.50
maxMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected