| 123 | } |
| 124 | |
| 125 | Gecode::FloatNum randFValUp(Gecode::FloatNum l, Gecode::FloatNum u, Gecode::Support::RandomGenerator& rand) { |
| 126 | using namespace Gecode; |
| 127 | using namespace Gecode::Float; |
| 128 | Rounding r; |
| 129 | return |
| 130 | r.sub_up( |
| 131 | u, |
| 132 | r.mul_down( |
| 133 | r.div_down( |
| 134 | rand(static_cast<unsigned int>(Int::Limits::max)), |
| 135 | static_cast<FloatNum>(Int::Limits::max) |
| 136 | ), |
| 137 | r.sub_down(u,l) |
| 138 | ) |
| 139 | ); |
| 140 | } |
| 141 | |
| 142 | |
| 143 | TestSpace::TestSpace(int n, Gecode::FloatVal& d0, Gecode::FloatNum s, |