operator_abstract#

This module contains the abstract base class for defining the transformation operators between two polynomial bases.

All transformation operator classes, regardless of their implementation differences, must inherit from this abstract base class to ensure consistent behavior across them.

An instance of OperatorABC is an attribute/property of the TransformationABC class; the instance is responsible for performing the actual transformation when applied to an array of coefficients.

This abstraction layer ensures a uniform interface across all concrete classes. A key feature is the overloading of the matrix multiplication operator (@), which plays a central role in the transformation process.


class minterpy.core.ABC.operator_abstract.OperatorABC(transformation, transformation_data)[source]#

Abstract base class for transformation operators.

All transformation operators must be derived from this base class.

Properties

array_repr_full

Array representation of the global transformation matrix.

array_repr_sparse

Array representation of the sub-transformation matrix transforming only the active monomials.

Parameters:

transformation (TransformationABC)

abstract __matmul__(other)[source]#

Applies the transformation operator on the input.

This is a placeholder of the ABC, which is overwritten by the concrete implementation.

Parameters:

other (ndarray | OperatorABC)

abstract _get_array_repr()[source]#

Function computing the full array performing the transformation (“transformation matrix”).

Notes

The output should transform the whole basis (not only some active monomials)!

Return type:

ndarray

property array_repr_full: ndarray#

Array representation of the global transformation matrix.

Returns:

the matrix representation of the transformation.

Notes

The output transforms the whole basis (not only the active monomials)!

property array_repr_sparse: ndarray#

Array representation of the sub-transformation matrix transforming only the active monomials.

Returns:

the transformation matrix for the active monomials.

Notes

This is an experimental feature which is part of ongoing work.