IntervalProd.contains_set¶
- IntervalProd.contains_set(other, atol=0.0)[source]¶
Return
True
ifother
is (almost) contained in this set.- Parameters:
- other
Set
Set to be tested.
- atolfloat, optional
Maximum allowed distance in maximum norm from
other
toself
.
- other
- Raises:
- AttributeError
if
other
does not have bothmin
andmax
methods.
Examples
>>> min_pt1, max_pt1 = [-1, 0, 2], [-0.5, 0, 3] >>> rbox1 = IntervalProd(min_pt1, max_pt1) >>> min_pt2, max_pt2 = [-0.6, 0, 2.1], [-0.5, 0, 2.5] >>> rbox2 = IntervalProd(min_pt2, max_pt2) >>> rbox1.contains_set(rbox2) True >>> rbox2.contains_set(rbox1) False