X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/ce31a1de5082c55b5eed1825ae95d827c55a8b92..d4b772a5d2f29c4f54564ea09f5b65289cadcaa1:/pypol/domains.py?ds=sidebyside diff --git a/pypol/domains.py b/pypol/domains.py index 5d98af8..10d12c5 100644 --- a/pypol/domains.py +++ b/pypol/domains.py @@ -6,8 +6,7 @@ from fractions import Fraction from . import islhelper from .islhelper import mainctx, libisl -from .geometry import GeometricObject -from .coordinates import Point +from .geometry import GeometricObject, Point from .linexprs import Expression, Symbol @@ -439,6 +438,12 @@ class Domain(GeometricObject): strings = [repr(polyhedron) for polyhedron in self.polyhedra] return 'Or({})'.format(', '.join(strings)) + def _repr_latex_(self): + strings = [] + for polyhedron in self.polyhedra: + strings.append('({})'.format(polyhedron._repr_latex_().strip('$'))) + return '${}$'.format(' \\vee '.join(strings)) + @classmethod def fromsympy(cls, expr): import sympy