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

Method solution

test/float/arithmetic.cpp:464–468  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

462 : Test("Arithmetic::NRoot::N::"+str(_n)+"::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false), n(_n) {}
463 /// %Test whether \a x is solution
464 virtual MaybeType solution(const Assignment& x) const {
465 if ((n == 0) || (x[0].max() < 0.0))
466 return MT_FALSE;
467 return eq(nroot(x[0],n), x[1]);
468 }
469 /// Extend assignment \a x
470 virtual bool extendAssignment(Assignment& x) const {
471 if ((n == 0) || (x[0].max() < 0))

Callers

nothing calls this directly

Calls 2

nrootFunction · 0.50
maxMethod · 0.45

Tested by

no test coverage detected