Add url to setup.py
[linpy.git] / doc / domain.rst
1 Domains Module
2 ==============
3
4 .. py:class :: Domain
5
6 .. attribute:: symbols
7
8 Returns a tuple of the symbols that exsist in a domain.
9
10 .. attribute:: dimension
11
12 Returns the number of variables that exist in a domain.
13
14 .. py:method:: isempty(self)
15
16 Return ``True`` is a domain is empty.
17
18 .. py:method:: isuniverse(self)
19
20 Return ``True`` if a domain is the Universe set.
21
22 .. py:method:: isbounded(self)
23
24 Return ``True`` if a domain is bounded.
25
26 .. py:method:: disjoint(self)
27
28 It is not guarenteed that a domain is disjoint. If it is necessary, this method will return a domain as disjoint.
29
30 .. py:method:: isdisjoint(self, other)
31
32 Return ``True`` if the intersection of *self* and *other* results in an empty set.
33
34 .. py:method:: issubset(self, other)
35
36 Test whether every element in a domain is in *other*.
37
38 .. py:method:: __eq__(self, other)
39 self == other
40
41 Test whether a domain is equal to *other*.
42
43 .. py:method:: __lt__(self, other)
44 self < other
45
46 Test whether a domain is a strict subset of *other*.
47
48 .. py:method:: __le__(self, other)
49 self <= other
50
51 Test whether every element in a domain is in *other*.
52
53 .. py:method:: __gt__(self, other)
54 self > other
55
56 Test whether a domain is a strict superset of *other*.
57
58 .. py:method:: __ge__(self, other)
59 self >= other
60
61 Test whether every element in *other* is in a domain.
62
63 .. py:method:: complement(self)
64 ~self
65
66 Return the complement of a domain.
67
68 .. py:method:: simplify(self)
69
70 Return a new domain without any redundant constraints.
71
72 .. py:method:: project(self, variables)
73
74 Return a new domain with the given variables removed.
75
76 .. py:method:: aspolyhedron(self)
77
78 Return polyhedral hull of a domain.
79
80 .. py:method:: sample(self)
81
82 Return a single sample subset of a domain.
83
84 .. py:method:: intersection(self, other)
85 __or__
86 self | other
87
88 Return a new domain with the elements that are common between *self* and *other*.
89
90 .. py:method:: union(self, other)
91 __and__
92 self & other
93
94 Return a new domain with all the elements from *self* and *other*.
95
96 .. py:method:: difference(self, other)
97 __sub__
98 self - other
99
100 Return a new domain with the elements in a domain that are not in *other* .
101
102 .. py:method:: __add__(self, other)
103 self + other
104
105 Return the sum of two domains.
106
107 .. py:method:: lexmin(self)
108
109 Return a new set containing the lexicographic minimum of the elements in the set.
110
111 .. py:method:: lexmax(self)
112
113 Return a new set containing the lexicographic maximum of the elements in the set.
114
115
116 A 2D or 3D domain can be plotted using the :meth:`plot` method. The points, vertices, and faces of a domain can be inspected using the following functions.
117
118 .. py:method:: points(self)
119
120 Return a list of the points contained in a domain as :class:`Points` objects.
121
122 .. py:method:: vertices(self)
123
124 Return a list of the verticies of a domain.
125
126 .. py:method:: faces(self)
127
128 Return a list of the vertices for each face of a domain.
129
130 .. py:method:: plot(self, plot=None, **kwargs)
131
132 Return a plot of the given domain or add a plot to a plot instance.