%Test whether \a x is solution
| 253 | : Test("Transcendental::Pow::N::"+str(_base)+"::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false), base(_base) {} |
| 254 | /// %Test whether \a x is solution |
| 255 | virtual MaybeType solution(const Assignment& x) const { |
| 256 | if (base <= 0.0) |
| 257 | return MT_FALSE; |
| 258 | return eq(exp(x[0] * log(base)), x[1]); |
| 259 | } |
| 260 | /// Post constraint on \a x |
| 261 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 262 | Gecode::pow(home, base, x[0], x[1]); |