projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve comparison methods in LinExpr
[linpy.git]
/
doc
/
reference.rst
diff --git
a/doc/reference.rst
b/doc/reference.rst
index
e0efdde
..
e649227
100644
(file)
--- a/
doc/reference.rst
+++ b/
doc/reference.rst
@@
-2,6
+2,7
@@
Module Reference
================
Module Reference
================
+
Symbols
-------
Symbols
-------
@@
-203,7
+204,7
@@
For example, if ``x`` is a :class:`Symbol`, then ``x + 1`` is an instance of :cl
.. classmethod:: fromsympy(expr)
Create a linear expression from a :mod:`sympy` expression.
.. classmethod:: fromsympy(expr)
Create a linear expression from a :mod:`sympy` expression.
- Raise :exc:`
Valu
eError` is the :mod:`sympy` expression is not linear.
+ Raise :exc:`
Typ
eError` is the :mod:`sympy` expression is not linear.
.. method:: tosympy()
.. method:: tosympy()
@@
-227,6
+228,7
@@
They are implemented by the :class:`Rational` class, that inherits from both :cl
See the documentation of :class:`fractions.Fraction` for more information and examples.
See the documentation of :class:`fractions.Fraction` for more information and examples.
+
Polyhedra
---------
Polyhedra
---------
@@
-278,10
+280,20
@@
This space can be unbounded.
The tuple of constraints, i.e., equalities and inequalities.
This is semantically equivalent to: ``equalities + inequalities``.
The tuple of constraints, i.e., equalities and inequalities.
This is semantically equivalent to: ``equalities + inequalities``.
+ .. method:: convex_union(polyhedron[, ...])
+
+ Return the convex union of two or more polyhedra.
+
+ .. method:: asinequalities()
+
+ Express the polyhedron using inequalities, given as a list of expressions greater or equal to 0.
+
.. method:: widen(polyhedron)
Compute the *standard widening* of two polyhedra, à la Halbwachs.
.. method:: widen(polyhedron)
Compute the *standard widening* of two polyhedra, à la Halbwachs.
+ In its current implementation, this method is slow and should not be used on large polyhedra.
+
.. data:: Empty
.. data:: Empty
@@
-493,7
+505,7
@@
The following functions create :class:`Polyhedron` or :class:`Domain` instances
.. function:: Ne(expr1, expr2[, expr3, ...])
Create the domain such that ``expr1 != expr2 != expr3 ...``.
.. function:: Ne(expr1, expr2[, expr3, ...])
Create the domain such that ``expr1 != expr2 != expr3 ...``.
- The result is a :class:`Domain`, not a :class:`Polyhedron`.
+ The result is a :class:`Domain`
object
, not a :class:`Polyhedron`.
.. function:: Ge(expr1, expr2[, expr3, ...])
.. function:: Ge(expr1, expr2[, expr3, ...])
@@
-505,14
+517,14
@@
The following functions create :class:`Polyhedron` or :class:`Domain` instances
The following functions combine :class:`Polyhedron` or :class:`Domain` instances using logic operators:
The following functions combine :class:`Polyhedron` or :class:`Domain` instances using logic operators:
-.. function:: Or(domain1, domain2[, ...])
-
- Create the union domain of the domains given in arguments.
-
.. function:: And(domain1, domain2[, ...])
Create the intersection domain of the domains given in arguments.
.. function:: And(domain1, domain2[, ...])
Create the intersection domain of the domains given in arguments.
+.. function:: Or(domain1, domain2[, ...])
+
+ Create the union domain of the domains given in arguments.
+
.. function:: Not(domain)
Create the complementary domain of the domain given in argument.
.. function:: Not(domain)
Create the complementary domain of the domain given in argument.
@@
-677,7
+689,7
@@
Geometric Objects
.. method:: cross(vector)
Compute the cross product of two 3D vectors.
.. method:: cross(vector)
Compute the cross product of two 3D vectors.
- If either one of the vectors is not t
ri
dimensional, a :exc:`ValueError` exception is raised.
+ If either one of the vectors is not t
hree-
dimensional, a :exc:`ValueError` exception is raised.
.. method:: dot(vector)
.. method:: dot(vector)