Operation docs update (#154)

* Operation Interface Enhancement + Clarification
- added set notation to all the geometry operations
- added a warning to say sample_surface=True doesn't work

* minor fix docs

* fix operation_interface.py doc

---------

Co-authored-by: Dario Coscia <dariocoscia@Dario-Coscia.local>
Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
This commit is contained in:
Kush
2023-07-12 15:49:37 +02:00
committed by Nicola Demo
parent 2d0256a179
commit 0ea17d8ff4
5 changed files with 52 additions and 8 deletions

View File

@@ -9,7 +9,16 @@ class Difference(OperationInterface):
""" PINA implementation of Difference of Domains."""
def __init__(self, geometries):
""" PINA implementation of Difference of Domains.
"""
PINA implementation of Difference of Domains.
Given two sets :math:`A` and :math:`B` then the
domain difference is defined as:
..:math:
A \setminus B = \{x \mid x \in A \text{ and } x \not\in B\},
with :math:`x` a point in :math:`\mathbb{R}^N` and :math:`N`
the dimension of the geometry space.
:param list geometries: A list of geometries from 'pina.geometry'
such as 'EllipsoidDomain' or 'CartesianDomain'. The first
@@ -32,7 +41,7 @@ class Difference(OperationInterface):
if geometry.is_inside(point):
return False
return self.geometries[0].is_inside(point, check_border)
def sample(self, n, mode='random', variables='all'):
"""Sample routine for difference domain.