IntervalProd.contains_set

IntervalProd.contains_set(self, other, atol=0.0)[source]

Return True if other is (almost) contained in this set.

Parameters
otherSet

Set to be tested.

atolfloat, optional

Maximum allowed distance in maximum norm from other to self.

Raises
AttributeError

if other does not have both min and max 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