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