.. py:class :: Domain
- .. py:method:: symbols
+ .. attribute:: symbols
Returns a tuple of the symbols that exsist in a domain.
- .. py:method:: dimension
+ .. attribute:: dimension
Returns the number of variables that exist in a domain.
- .. py:method:: disjoint
-
- Returns a domain as disjoint.
-
- .. py:method:: involves_vars(self, dims)
-
- Returns ``True`` if a domain depends on the given dimensions.
-
.. py:method:: isempty(self)
Return ``True`` is a domain is empty.
Test whether every element in *other* is in a domain.
.. py:method:: complement(self)
- ¬self
+ ~self
Return the complement of a domain.
Return a new domain without any redundant constraints.
- .. py:method:: project(self, dims)
+ .. py:method:: project(self, variables)
- Return a new domain with the given dimensions removed.
+ Return a new domain with the given variables removed.
.. py:method:: aspolyhedron(self)
Return a single sample subset of a domain.
.. py:method:: intersection(self, other)
+ __or__
self | other
Return a new domain with the elements that are common between *self* and *other*.
.. py:method:: union(self, other)
+ __and__
self & other
Return a new domain with all the elements from *self* and *other*.
.. py:method:: difference(self, other)
+ __sub__
self - other
Return a new domain with the elements in a domain that are not in *other* .
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` method. The points, vertices, and faces of a domain can be inspected using the following functions.
.. py:method:: points(self)
.. py:method:: plot(self, plot=None, **kwargs)
- Return a plot of the given domain.
+ Return a plot of the given domain or add a plot to a plot instance.