const BoxList BoxLib::intersect (const BoxList& bl, const BoxList& br) { BL_ASSERT(bl.ixType() == br.ixType()); BoxList newbl(bl); return newbl.intersect(br); }
void BoxList::catenate (BoxList& blist) { BL_ASSERT(ixType() == blist.ixType()); lbox.splice(lbox.end(), blist.lbox); BL_ASSERT(blist.isEmpty()); }
void BoxList::join (const BoxList& blist) { BL_ASSERT(ixType() == blist.ixType()); std::list<Box> lb = blist.lbox; lbox.splice(lbox.end(), lb); }
const BoxList BoxLib::complementIn (const Box& b, const BoxList& bl) { BL_ASSERT(bl.ixType() == b.ixType()); BoxList newb(b.ixType()); newb.complementIn(b,bl); return newb; }
bool BoxList::contains (const BoxList& bl) const { if (isEmpty() || bl.isEmpty()) return false; BL_ASSERT(ixType() == bl.ixType()); if (!minimalBox().contains(bl.minimalBox())) return false; BoxArray ba(*this); for (const_iterator bli = bl.begin(), End = bl.end(); bli != End; ++bli) if (!ba.contains(*bli)) return false; return true; }