%Test whether \a x is solution
| 184 | : Test("Transcendental::Log::N::"+str(_base)+"::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false), base(_base) {} |
| 185 | /// %Test whether \a x is solution |
| 186 | virtual MaybeType solution(const Assignment& x) const { |
| 187 | if ((x[0].max() <= 0.0) || (base <= 0.0)) |
| 188 | return MT_FALSE; |
| 189 | return eq(log(x[0]) / log(base), x[1]); |
| 190 | } |
| 191 | /// Post constraint on \a x |
| 192 | virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) { |
| 193 | Gecode::log(home, base, x[0], x[1]); |