X-Git-Url: https://scm.cri.mines-paristech.fr/git/linpy.git/blobdiff_plain/0995f79a8db531aa3a2ca951af65f3f0fa4943e5..9431c353bd39a1fbb855580ee34931a07321a0f1:/pypol/domains.py?ds=sidebyside diff --git a/pypol/domains.py b/pypol/domains.py index 3ab7d44..255c995 100644 --- a/pypol/domains.py +++ b/pypol/domains.py @@ -312,6 +312,12 @@ class Domain: points.append(Point(coordinates)) return points + def __contains__(self, point): + for polyhedron in self.polyhedra: + if point in polyhedron: + return True + return False + def subs(self, symbol, expression=None): polyhedra = [polyhedron.subs(symbol, expression) for polyhedron in self.polyhedra]