| 45 | |
| 46 | template<class A, class B> |
| 47 | ExecStatus |
| 48 | Exp<A,B>::post(Home home, A x0, B x1) { |
| 49 | if (x0 == x1) { |
| 50 | return ES_FAILED; |
| 51 | } else { |
| 52 | GECODE_ME_CHECK(x1.gq(home,0.0)); |
| 53 | } |
| 54 | GECODE_ME_CHECK(x1.eq(home,exp(x0.domain()))); |
| 55 | if (x1.max() == 0.0) |
| 56 | return ES_FAILED; |
| 57 | GECODE_ME_CHECK(x0.eq(home,log(x1.domain()))); |
| 58 | (void) new (home) Exp<A,B>(home,x0,x1); |
| 59 | return ES_OK; |
| 60 | } |
| 61 | |
| 62 | |
| 63 | template<class A, class B> |