%Test whether \a x is solution
| 302 | : Test("Transcendental::Pow::N::"+str(_base)+"::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false), base(_base) {} |
| 303 | /// %Test whether \a x is solution |
| 304 | virtual MaybeType solution(const Assignment& x) const { |
| 305 | if ((x[0].max() <= 0.0) || (base <= 0.0)) |
| 306 | return MT_FALSE; |
| 307 | return eq(exp(x[0] * log(base)), x[0]); |
| 308 | } |
| 309 | /// Post constraint on \a x |
| 310 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 311 | Gecode::pow(home, base, x[0], x[0]); |