void update_box_using_bitset(box & b, vector<ibex::Interval> const & v, ibex::BitSet const & s) { if (s.empty()) { return; } unsigned v_idx = 0; for (int i = s.min(); i <= s.max(); ++i) { if (s.contain(i)) { b[i] = v[v_idx++]; } } }
vector<ibex::Interval> extract_from_box_using_bitset(box const & b, ibex::BitSet const & s) { vector<ibex::Interval> v; if (s.empty()) { return v; } for (int i = s.min(); i <= s.max(); ++i) { if (s.contain(i)) { v.push_back(b[i]); } } return v; }