1 Polyhedra Module
2 ================
4 Polyhedron class allows users to build and inspect polyherons. Polyhedron inherits all methods from the :class:`Domain` class.
6 .. py:class:: Polyhedron(Domain)
8 .. py:method:: __new__(cls, equalities=None, inequalities=None)
10 Create and return a new Polyhedron from a string or list of equalities and inequalities.
12 .. attribute:: equalities
14 Returns a list of the equalities in a polyhedron.
16 .. attribute:: inequalities
18 Returns a list of the inequalities in a polyhedron.
20 .. attribute:: constraints
22 Returns a list of the constraints of a polyhedron.
24 .. py:method:: make_disjoint(self)
26 Returns a polyhedron as a disjoint.
28 .. py:method:: isuniverse(self)
30 Return ``True`` if a polyhedron is the Universe set.
32 .. py:method:: aspolyhedron(self)
34 Return the polyhedral hull of a polyhedron.
36 .. py:method:: __contains__(self, point)
38 Report whether a polyhedron constains an integer point
40 .. py:method:: subs(self, symbol, expression=None)
42 Subsitute the given value into an expression and return the resulting
43 expression.
45 .. py:method:: fromstring(cls, string)
47 Create and return a Polyhedron from a string.
50 To create a polyhedron, the user can use the following functions to define equalities and inequalities as the constraints.
52 .. py:function:: Eq(left, right)
54 Returns a Polyhedron instance with a single constraint as *left* equal to *right*.
56 .. py:function:: Ne(left, right)
58 Returns a Polyhedron instance with a single constraint as *left* not equal to *right*.
60 .. py:function:: Lt(left, right)
62 Returns a Polyhedron instance with a single constraint as *left* less than *right*.
64 .. py:function:: Le(left, right)
66 Returns a Polyhedron instance with a single constraint as *left* less than or equal to *right*.
68 .. py:function:: Gt(left, right)
70 Returns a Polyhedron instance with a single constraint as *left* greater than *right*.
72 .. py:function:: Ge(left, right)
74 Returns a Polyhedron instance with a single constraint as *left* greater than or equal to *right*.