BaseOperation#
Module for all set-based operations Base class.
- class BaseOperation(geometries)[source]#
Bases:
OperationInterface,BaseDomainBase class for all set operation defined on geometric domains, implementing common functionality.
All specific operation types should inherit from this class and implement the abstract methods defined in both the following interfaces:
OperationInterface, andDomainInterface.This class is not meant to be instantiated directly.
Initialization of the
OperationInterfaceclass.- Parameters:
geometries (list[BaseDomain] | tuple[BaseDomain]) – The list of domains on which to perform the set operation.
- Raises:
TypeError – If geometries is neither a list nor a tuple.
ValueError – If geometries elements are not instances of
BaseDomain.NotImplementedError – If the dimensions of the geometries are not consistent.
- update(domain)[source]#
Update the domain resulting from the operation.
- Parameters:
domain (DomainInterface) – The domain whose labels are to be merged into the current one.
- Raises:
NotImplementedError – If the geometries involved in the operation are of different types.
TypeError – If the passed domain is not of the same type of all the geometries involved in the operation.
- Returns:
A new domain instance with the merged labels.
- Return type:
- property sample_modes#
The list of available sampling modes.
- property variables#
The list of variables of the domain.
- property domain_dict#
Returns a dictionary representation of the operation domain.
- Returns:
The dictionary representation of the operation domain.
- Return type:
- property range#
The range variables of each geometry.
- Returns:
The range variables of each geometry.
- Return type:
- property fixed#
The fixed variables of each geometry.
- Returns:
The fixed variables of each geometry.
- Return type:
- property geometries#
The domains on which to perform the set operation.
- Returns:
The domains on which to perform the set operation.
- Return type: