Polyhedra Module
================
-.. py:class:: Polyhedron
+Polyhedron class allows users to build and inspect polyherons. Polyhedron inherits all methods from the :class:`Domain` class.
-Polyhedra Properties
---------------------
+.. py:class:: Polyhedron(Domain)
- .. py:method:: equalities(self)
+ .. py:method:: __new__(cls, equalities=None, inequalities=None)
- Return a list of the equalities in a set.
-
- .. py:method:: inequalities(self)
-
- Return a list of the inequalities in a set.
+ Create and return a new Polyhedron from a string or list of equalities and inequalities.
- .. py:method:: constraints(self)
-
- Return ta list of the constraints of a set.
+ .. attribute:: equalities
+
+ Returns a list of the equalities in a polyhedron.
+
+ .. attribute:: inequalities
+
+ Returns a list of the inequalities in a polyhedron.
+
+ .. attribute:: constraints
+
+ Returns a list of the constraints of a polyhedron.
+
+ .. py:method:: make_disjoint(self)
+
+ Returns a polyhedron as a disjoint.
-Unary Operations
-----------------
- .. py:method:: disjoint(self)
-
- Returns this set as a disjoint set.
-
.. py:method:: isuniverse(self)
-
- Return true if this set is the Universe set.
+ Return ``True`` if a polyhedron is the Universe set.
+
.. py:method:: aspolyhedron(self)
- Return polyhedral hull of this set.
+ Return the polyhedral hull of a polyhedron.
+
+ .. py:method:: __contains__(self, point)
+
+ Report whether a polyhedron constains an integer point
.. py:method:: subs(self, symbol, expression=None)
-
- Subsitute expression into given set and returns the result.
-
- .. py:method:: Lt(left, right)
-
- Assert first set is less than the second set.
-
- .. py:method:: Le(left, right)
-
- Assert first set is less than or equal to the second set.
-
- .. py:method:: Eq(left, right)
-
- Assert first set is equal to the second set.
-
- .. py:method:: Ne(left, right)
-
- Assert first set is not equal to the second set.
+
+ Subsitute the given value into an expression and return the resulting
+ expression.
+
+ .. py:method:: fromstring(cls, string)
- .. py:method:: Gt(left, right)
-
- Assert first set is greater than the second set.
+ Create and return a Polyhedron from a string.
+
- .. py:method:: Ge(left, right)
-
- Assert first set is greater than or equal to the second set.
+To create a polyhedron, the user can use the following functions to define equalities and inequalities as the constraints.
+
+.. py:function:: Eq(left, right)
+
+ Returns a Polyhedron instance with a single constraint as *left* equal to *right*.
+
+.. py:function:: Ne(left, right)
+
+ Returns a Polyhedron instance with a single constraint as *left* not equal to *right*.
+
+.. py:function:: Lt(left, right)
+
+ Returns a Polyhedron instance with a single constraint as *left* less than *right*.
+
+.. py:function:: Le(left, right)
+
+ Returns a Polyhedron instance with a single constraint as *left* less than or equal to *right*.
+
+.. py:function:: Gt(left, right)
+
+ Returns a Polyhedron instance with a single constraint as *left* greater than *right*.
+
+.. py:function:: Ge(left, right)
+
+ Returns a Polyhedron instance with a single constraint as *left* greater than or equal to *right*.