BarycentricPiecewiseOperator#

class minterpy.schemes.barycentric.operators.BarycentricPiecewiseOperator(transformation, transformation_data)[source]#

Bases: BarycentricOperator

Concrete implementation of the BarycentricOperator used to make comparisons with the global matrix possible by zooming into corresponding submatrix.

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.

array_representation

Reconstructs the global transformation matrix.

Methods

merging_fct(start_positions_in, ...)

Reconstructing the global transformation matrix from the precomputed transformation in piecewise format.

transformation_fct(coeffs_out, ...)

Transformation based on piecewise format.

Parameters:

transformation (TransformationABC)

transformation_fct(coeffs_out, matrix_pieces, start_positions_in, start_positions_out)#

Transformation based on piecewise format.

Parameters:
  • coeffs_in (ndarray) – the coefficients to be transformed.

  • coeffs_out_placeholder – a placeholder for the output coefficients.

  • matrix_pieces (List) – sub transformation matrices.

  • start_positions_in (ndarray) – start position for the slice in coefficients to be transformed.

  • start_positions_out (ndarray) – start position for the slice in output coefficients.

  • coeffs_out (ndarray)

Return type:

None

merging_fct(start_positions_in, start_positions_out)#

Reconstructing the global transformation matrix from the precomputed transformation in piecewise format.

Parameters:
  • matrix_pieces (List)

  • start_positions_in (ndarray)

  • start_positions_out (ndarray)

Returns:

Return type:

ndarray

Notes

This is only used for testing the equality of the transformation matrices of both global and barycentric transformation.

__init__(transformation, transformation_data)#
Parameters:

transformation (TransformationABC)

__matmul__(other)#

Applies the transformation operator on the input.

Parameters:

other (OperatorABC | ndarray)

Return type:

MatrixOperator | ndarray

__weakref__#

list of weak references to the object (if defined)

_get_array_repr()#

Reconstructs the global transformation matrix.

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.

property array_representation: ndarray#

Reconstructs the global transformation matrix.