BarycentricDictOperator#

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

Bases: BarycentricOperator

Concrete implementation of the BarycentricOperator given by the edge case given by decomposition to the 1D atomic sub-problems.

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(leaf_positions)

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

transformation_fct(coeffs_out, trafo_dict, ...)

Transformation using a dictionary encoding (= a triangular array piece for every leaf node combination).

Parameters:

transformation (TransformationABC)

transformation_fct(coeffs_out, trafo_dict, leaf_positions)#

Transformation using a dictionary encoding (= a triangular array piece for every leaf node combination).

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

  • coeffs_out (ndarray) – a placeholder for the output coefficients

  • trafo_dict (Dict[Tuple[int, int], ndarray]) – dictionary with matrix pieces

  • leaf_positions (ndarray) – starting positions in the input and output coeffs arrays

Return type:

None

Notes

Depending on the problem size it might be more performant to use a different implementation of this transformation! (e.g. regular DDS or leaf level DDS (factorised format)

Transforms and sums up the respective parts (slices) of the coefficients.

merging_fct(leaf_positions)#

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

Parameters:
Returns:

reconstructed transformation matrix

Return type:

ndarray

__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.