From 997e3c68590b274c372a6785cda5a69887683891 Mon Sep 17 00:00:00 2001 From: Danielle Bolan Date: Fri, 8 Aug 2014 17:47:55 +0200 Subject: [PATCH] Update plot examples --- doc/domain.rst | 15 +-------------- doc/examples.rst | 31 +++++++++++++++++++++++++++---- doc/images/union.jpg | Bin 0 -> 24624 bytes doc/linexpr.rst | 6 ++++++ doc/polyhedra.rst | 4 +--- 5 files changed, 35 insertions(+), 21 deletions(-) create mode 100644 doc/images/union.jpg diff --git a/doc/domain.rst b/doc/domain.rst index 4cd79d9..edf8934 100644 --- a/doc/domain.rst +++ b/doc/domain.rst @@ -3,8 +3,6 @@ Domains Module .. py:class :: Domain - The properties of a domain can be are found using the following - .. py:method:: symbols Returns a tuple of the symbols that exsist in a domain. @@ -21,8 +19,6 @@ Domains Module Returns ``True`` if a domain depends on the given dimensions. - The unary properties of a domain can be inspected using the following methods. - .. py:method:: isempty(self) Return ``True`` is a domain is empty. @@ -39,8 +35,6 @@ Domains Module It is not guarenteed that a domain is disjoint. If it is necessary, this method will return a domain as disjoint. - The following methods compare two domains to find the binary properties. - .. py:method:: isdisjoint(self, other) Return ``True`` if the intersection of *self* and *other* results in an empty set. @@ -74,9 +68,6 @@ Domains Module Test whether every element in *other* is in a domain. - - The following methods implement unary operations on a domain. - .. py:method:: complement(self) ¬self @@ -98,8 +89,6 @@ Domains Module Return a single sample subset of a domain. - The following methods implement binary operations on two domains. - .. py:method:: intersection(self, other) self | other @@ -120,8 +109,6 @@ Domains Module Return the sum of two domains. - The following methods use lexicographical ordering to find the maximum or minimum element in a domain. - .. py:method:: lexmin(self) Return a new set containing the lexicographic minimum of the elements in the set. @@ -131,7 +118,7 @@ Domains Module Return a new set containing the lexicographic maximum of the elements in the set. - A 2D or 3D domain can be plotted using the :meth:`plot` function. The points, verticies, and faces of a domain can be inspected using the following functions. +A 2D or 3D domain can be plotted using the :meth:`plot` function. The points, verticies, and faces of a domain can be inspected using the following functions. .. py:method:: points(self) diff --git a/doc/examples.rst b/doc/examples.rst index 62a7dfd..13c59fc 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -18,16 +18,16 @@ Basic Examples >>> #test equality >>> square1 == square2 False - >>> # find the union of two polygons - >>> square1 + square2 + >>> # compute the union of two polygons + >>> square1 | square2 Or(And(Ge(x, 0), Ge(-x + 2, 0), Ge(y, 0), Ge(-y + 2, 0)), And(Ge(x - 2, 0), Ge(-x + 4, 0), Ge(y - 2, 0), Ge(-y + 4, 0))) >>> # check if square1 and square2 are disjoint >>> square1.disjoint(square2) False - >>> # find the intersection of two polygons + >>> # compute the intersection of two polygons >>> square1 & square2 And(Eq(y - 2, 0), Eq(x - 2, 0)) - >>> # find the convex union of two polygons + >>> # compute the convex union of two polygons >>> Polyhedron(square1 | sqaure2) And(Ge(x, 0), Ge(-x + 4, 0), Ge(y, 0), Ge(-y + 4, 0), Ge(x - y + 2, 0), Ge(-x + y + 2, 0)) @@ -39,6 +39,7 @@ Basic Examples (x, y) >>> square1.inequalities (x, -x + 2, y, -y + 2) + >>> # project out the variable x >>> square1.project([x]) And(Ge(-y + 2, 0), Ge(y, 0)) @@ -70,4 +71,26 @@ Plot Examples [Point({x: Fraction(0, 1), y: Fraction(1, 1)}), Point({x: Fraction(-1, 1), y: Fraction(0, 1)}), Point({x: Fraction(1, 1), y: Fraction(0, 1)}), Point({x: Fraction(0, 1), y: Fraction(-1, 1)})] >>> diamond.points() [Point({x: -1, y: 0}), Point({x: 0, y: -1}), Point({x: 0, y: 0}), Point({x: 0, y: 1}), Point({x: 1, y: 0})] + + The user also can pass another plot to the :meth:`plot` method. This can be useful to compare two polyhedrons on the same axis. This example illustrates the union of two squares. + + >>> from linpy import * + >>> import matplotlib.pyplot as plt + >>> from matplotlib import pylab + >>> x, y = symbols('x y') + >>> square1 = Le(0, x) & Le(x, 2) & Le(0, y) & Le(y, 2) + >>> square2 = Le(1, x) & Le(x, 3) & Le(1, y) & Le(y, 3) + >>> fig = plt.figure() + >>> plot = fig.add_subplot(1, 1, 1, aspect='equal') + >>> square1.plot(plot, facecolor='red', alpha=0.3) + >>> square2.plot(plot, facecolor='blue', alpha=0.3) + >>> squares = Polyhedron(square1 + square2) + >>> squares.plot(plot, facecolor='blue', alpha=0.3) + >>> pylab.show() + + .. figure:: images/union.jpg + :align: center + + + diff --git a/doc/images/union.jpg b/doc/images/union.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7d14ae8e22e6f46e425b1d79fc75a275743794e6 GIT binary patch literal 24624 zcmeHv1zc6j{_jE*6cnT-WRub=CCx?<5Kua#MLGm&5O8CFND2r@OGtNzf|8gW~2MiW57jODH$mM0|Njsz<&UG z5Rd@QVqsxpojHq*jeYLiS)B947tZ72o+l?H!Y95=0inK3K}AKwaFvOMj-8&0ikXjv z{W>QP4-bS%K!l%5_$oIK*WpVr&Ye4V9{2pE3l}bN(NfWJ{U3kOp8$fhr>>py#l)Zk zP7z>W5@4X~00`L5GZ?>ofWLk)PGO!tgN1$e91bpcL-9r66b2^dsneKe&YV6C-t7T? z51b}ALrBYc6N^a60GrO1nCoe9!dZIp{LduH-`5zpAJ{!RheJwsiJXG*3KKI6D-Z7t zK7Ii~iCdCV(zj(~RaDi~HSTF@85$Xzn3|be*gH5nIlH(%e*VJC`=!q--;mHZVc`*P zBcl?NlHaGKrln^T6c!bil$MoO)YR71H#B}}`r6Ui)!ozE*FP{mF*!9oGdnlGu)eXm zwGH3d-P=Fx7Y2a&mu`W7|I)Ez{UQMSb?WqK%+uJ1{lYlq3?7&Sr_a!GViDd{!Zxra zqT_mcmRLMEA^-C^dT!-4k_UF*aYz|>#u?WSyY@@Z{=SYq`-gh=TgQIy*8p%H69XJP zOacH3H21pSw9nGNy~^f_;SLNul}`IX8V*V=2hzF8!3BDF~;`u>JF6* zAA_gjubgci_MCKcob9vKMyaJnOe4cbO?TYiH*VxaQ@b`FK9S_I1qoBg&}4k`ih=y% zZKq`>AWp}dDBGUb)Cx;>3ZUxQBi&dpido`sqi*oSz&n%zU(n4xRmzN>Xp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{Bnl|ITKdr=6;n`3?|2lk%sQ9_#hzINBu!S7$ z0dE(9mM5(h{_tAdrbmia> zsMxsvJa+xo>if@jd1*fMcz&uX#zcL@M+0P%!z61`9DEwEe(%OO z-CZ22Ks&UQFB>UZrYY8zzTt(cKsYR@i7rpD$V+}bGKd9`?0>+9{<2StzaN$kt~ z<=EIPCYS2o^U<)ey|bi229_pS3IMIq!2zHRtEYCi$?vf@qwIYViwGqi5R z6&e{;% b&!Ls0zOv#ZsmTD&OVfJ&i^vuTy8nLxur$`D literal 0 HcmV?d00001 diff --git a/doc/linexpr.rst b/doc/linexpr.rst index 4101252..2aab652 100644 --- a/doc/linexpr.rst +++ b/doc/linexpr.rst @@ -3,6 +3,9 @@ Linear Expression Module This class implements linear expressions. +.. py:class:: Expression + + .. py:method:: coefficient(self, symbol) Return the coefficient value of the given symbol. @@ -38,6 +41,9 @@ This class implements linear expressions. .. py:method:: tosympy(self) Return an expression as a sympy object. + +.. py:class:: Symbol(Expression) + .. py:class:: Dummy(Symbol) diff --git a/doc/polyhedra.rst b/doc/polyhedra.rst index 736cff6..47462a7 100644 --- a/doc/polyhedra.rst +++ b/doc/polyhedra.rst @@ -3,7 +3,7 @@ Polyhedra Module .. py:class:: Polyhedron - Polyhedron class allows users to build and inspect polyherons. The following methods provide the properties of a polyhedron. + Polyhedron class allows users to build and inspect polyherons. .. py:method:: equalities(self) @@ -17,8 +17,6 @@ Polyhedra Module Return ta list of the constraints of a polyhedron. - The following unary operations can be used to inspect a polyhedron. - .. py:method:: disjoint(self) Returns a polyhedron as a disjoint. -- 2.20.1