Post constraint on \a x
| 110 | } |
| 111 | /// Post constraint on \a x |
| 112 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 113 | using namespace Gecode; |
| 114 | FloatVarArray y(home,4,dom.min(),dom.max()); |
| 115 | channel(home, x[0], y[0]); |
| 116 | channel(home, x[1], y[1]); |
| 117 | channel(home, x[2], y[2]); |
| 118 | channel(home, x[3], y[3]); |
| 119 | LinFloatExpr reg[3] = {y[0],y[1],y[2]}; |
| 120 | rel(home, y[3], FRT_EQ, expr(home, eval(lis,reg))); |
| 121 | } |
| 122 | }; |
| 123 | |
| 124 | /// %Test linear relations over float variables |