inline std::string Test::str(Gecode::FloatVal f) { std::stringstream s; s << "[" << f.min() << ":" << f.max() << "]"; return s.str(); }
inline CpltAssignment::CpltAssignment(int n, const Gecode::FloatVal& d, Gecode::FloatNum s) : Assignment(n,d), dsv(new Gecode::FloatVal[static_cast<unsigned int>(n)]), step(s) { using namespace Gecode; for (int i=n; i--; ) dsv[i] = FloatVal(d.min(),nextafter(d.min(),d.max())); }
inline ExtAssignment::ExtAssignment(int n, const Gecode::FloatVal& d, Gecode::FloatNum s, const Test * pb) : Assignment(n,d),curPb(pb), dsv(new Gecode::FloatVal[static_cast<unsigned int>(n)]), step(s) { using namespace Gecode; for (int i=n-1; i--; ) dsv[i] = FloatVal(d.min(),nextafter(d.min(),d.max())); ++(*this); }
/// %Test whether \a x is solution virtual MaybeType solution(const Assignment& x) const { for (int i=x.size(); i--; ) if ((x[i].max() > c.max()) || (x[i].min() < c.min())) return MT_FALSE; return MT_TRUE; }