X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/cd2197879049a836b02a331adf0a00c0b87fe043..82e100a9d5e7db532fda649849dc784148e55069:/examples/squares.py diff --git a/examples/squares.py b/examples/squares.py index 4389d87..e00821e 100755 --- a/examples/squares.py +++ b/examples/squares.py @@ -9,8 +9,11 @@ sq2 = Le(2, x) & Le(x, 4) & Le(2, y) & Le(y, 4) sq3 = Le(0, x) & Le(x, 3) & Le(0, y) & Le(y, 3) sq4 = Le(1, x) & Le(x, 2) & Le(1, y) & Le(y, 2) sq5 = Le(1, x) & Le(x, 2) & Le(1, y) -sq6 = Le(1, x) & Le(x, 2) & Le(1, y) & Eq(y, 3) +sq6 = Le(1, x) & Le(x, 2) & Le(1, y) & Le(y, 3) sq7 = Le(0, x) & Le(x, 2) & Le(0, y) & Eq(z, 2) & Le(a, 3) +p = Le(2*x+1, y) & Le(-2*x-1, y) & Le(y, 1) + + universe = Polyhedron([]) q = sq1 - sq2 e = Empty @@ -69,3 +72,7 @@ print() print('sq1 has {} parameters'.format(sq1.num_parameters())) print() print('does sq1 constraints involve x?', sq1.involves_dims([x])) +print() +print('the verticies for s are:', p.vertices()) +print() +print(p.plot())