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

Method extendAssignment

test/float/transcendental.cpp:211–221  ·  view source on GitHub ↗

Extend assignment \a x

Source from the content-addressed store, hash-verified

209 }
210 /// Extend assignment \a x
211 virtual bool extendAssignment(Assignment& x) const {
212 if ((x[0].max() <= 0.0) || (base <= 0.0))
213 return false;
214 Gecode::FloatVal d = log(x[0])/log(base);
215 if (Gecode::Float::subset(d, dom)) {
216 x.set(1, d);
217 return true;
218 } else {
219 return false;
220 }
221 }
222 /// Post constraint on \a x
223 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
224 Gecode::log(home, base, x[0], x[1]);

Callers

nothing calls this directly

Calls 4

logFunction · 0.50
subsetFunction · 0.50
maxMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected