BaseOperation#

Module for all set-based operations Base class.

class BaseOperation(geometries)[source]#

Bases: OperationInterface, BaseDomain

Base 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, and DomainInterface.

This class is not meant to be instantiated directly.

Initialization of the OperationInterface class.

Parameters:

geometries (list[BaseDomain] | tuple[BaseDomain]) – The list of domains on which to perform the set operation.

Raises:
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:

BaseOperation

property sample_modes#

The list of available sampling modes.

Returns:

The list of available sampling modes.

Return type:

list[str]

property variables#

The list of variables of the domain.

Returns:

The list of variables of the domain.

Return type:

list[str]

property domain_dict#

Returns a dictionary representation of the operation domain.

Returns:

The dictionary representation of the operation domain.

Return type:

dict

property range#

The range variables of each geometry.

Returns:

The range variables of each geometry.

Return type:

dict

property fixed#

The fixed variables of each geometry.

Returns:

The fixed variables of each geometry.

Return type:

dict

property geometries#

The domains on which to perform the set operation.

Returns:

The domains on which to perform the set operation.

Return type:

list[BaseDomain]