X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/blobdiff_plain/960f0c252361dfd696359f803aae40a9b13b14a6..454a26a54cc7ff563ab278567f3bbad9c6ff42bb:/doc/polyhedra.rst diff --git a/doc/polyhedra.rst b/doc/polyhedra.rst index 736cff6..f6f1a30 100644 --- a/doc/polyhedra.rst +++ b/doc/polyhedra.rst @@ -1,58 +1,74 @@ Polyhedra Module ================ -.. py:class:: Polyhedron +Polyhedron class allows users to build and inspect polyherons. Polyhedron inherits all methods from the :class:`Domain` class. - Polyhedron class allows users to build and inspect polyherons. The following methods provide the properties of a polyhedron. +.. py:class:: Polyhedron(Domain) - .. py:method:: equalities(self) + .. py:method:: __new__(cls, equalities=None, inequalities=None) + + Create and return a new Polyhedron from a string or list of equalities and inequalities. - Return a list of the equalities in a polyhedron. + .. attribute:: equalities - .. py:method:: inequalities(self) + Returns a list of the equalities in a polyhedron. - Return a list of the inequalities in a polyhedron. + .. attribute:: inequalities - .. py:method:: constraints(self) + Returns a list of the inequalities in a polyhedron. - Return ta list of the constraints of a polyhedron. + .. attribute:: constraints - The following unary operations can be used to inspect a polyhedron. + Returns a list of the constraints of a polyhedron. - .. py:method:: disjoint(self) + .. py:method:: make_disjoint(self) Returns a polyhedron as a disjoint. .. py:method:: isuniverse(self) Return ``True`` if a polyhedron is the Universe set. + + .. py:method:: aspolyhedron(self) + + 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) - Subsitutes an expression into a polyhedron and returns the result. + Subsitute the given value into an expression and return the resulting + expression. + + .. py:method:: fromstring(cls, string) + + Create and return a Polyhedron from a string. + -To create a polyhedron, the user must use the folloing functions to define equalities and inequalities as the contraints. +To create a polyhedron, the user can use the following functions to define equalities and inequalities as the constraints. .. py:function:: Eq(left, right) - Create a constraint by setting *left* equal to *right*. + Returns a Polyhedron instance with a single constraint as *left* equal to *right*. .. py:function:: Ne(left, right) - Create a constraint by setting *left* not equal to *right*. + Returns a Polyhedron instance with a single constraint as *left* not equal to *right*. .. py:function:: Lt(left, right) - Create a constraint by setting *left* less than *right*. + Returns a Polyhedron instance with a single constraint as *left* less than *right*. .. py:function:: Le(left, right) - Create a constraint by setting *left* less than or equal to *right*. + Returns a Polyhedron instance with a single constraint as *left* less than or equal to *right*. .. py:function:: Gt(left, right) - Create a constraint by setting *left* greater than *right*. + Returns a Polyhedron instance with a single constraint as *left* greater than *right*. .. py:function:: Ge(left, right) - Create a constraint by setting *left* greater than or equal to *right*. + Returns a Polyhedron instance with a single constraint as *left* greater than or equal to *right*.