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

Method extendAssignment

test/float/transcendental.cpp:280–289  ·  view source on GitHub ↗

Extend assignment \a x

Source from the content-addressed store, hash-verified

278 }
279 /// Extend assignment \a x
280 virtual bool extendAssignment(Assignment& x) const {
281 if (base <= 0.0) return false;
282 Gecode::FloatVal d = exp(x[0]*log(base));
283 if (Gecode::Float::subset(d, dom)) {
284 x.set(1, d);
285 return true;
286 } else {
287 return false;
288 }
289 }
290 /// Post constraint on \a x
291 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
292 Gecode::pow(home, base, x[0], x[1]);

Callers

nothing calls this directly

Calls 4

expFunction · 0.50
logFunction · 0.50
subsetFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected