Transformation Utility Functions#

Utility functions for computing matrices for transformation between canonical, lagrange, and newton basis.

minterpy.transformations.utils.build_lagrange_to_newton_operator(transformation)[source]#

Construct the Lagrange-to-Newton transformation operator.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of LagrangePolynomial) and the target type (NewtonPolynomial).

Returns:

The Lagrange-to-Newton transformation operator.

Return type:

OperatorABC

Notes

  • The barycentric transformation operator is employed if the multi-indices are downward-closed.

  • The naive transformation operator is inefficient due to the following inversion: inv(nwt2lag_matrix).

minterpy.transformations.utils.build_lagrange_to_canonical_operator(transformation)[source]#

Construct the Lagrange-to-Canonical transformation operator.

The transformation is the chain: Lagrange-to-Newton then Newton-to-Canonical.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of LagrangePolynomial) and the target type (CanonicalPolynomial).

Returns:

The Lagrange-to-Canonical transformation operator.

Return type:

OperatorABC

Notes

  • Barycentric transformation operator is employed if the multi-indices are downward-closed.

minterpy.transformations.utils.build_lagrange_to_chebyshev_operator(transformation)[source]#

Compute the Lagrange-to-Chebyshev transformation.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of LagrangePolynomial) and the target type (ChebyshevPolynomial).

Returns:

The Lagrange-to-Chebyshev transformation operator.

Return type:

OperatorABC

Notes

  • The transformation is carried out by inverting the evaluation at the unisolvent nodes; this is not a sparse transformation operator.

minterpy.transformations.utils.build_newton_to_lagrange_operator(transformation)[source]#

Construct the Newton-to-Lagrange transformation operator.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of NewtonPolynomial) and the target type (LagrangePolynomial).

Returns:

The Newton-to-Lagrange transformation operator.

Return type:

OperatorABC

Notes

  • The barycentric transformation operator is employed if the multi-indices are downward-closed.

minterpy.transformations.utils.build_newton_to_canonical_operator(transformation)[source]#

Construct the Newton-to-Canonical transformation operator.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of NewtonPolynomial) and the target type (CanonicalPolynomial).

Returns:

The Newton-to-Canonical transformation operator.

Return type:

OperatorABC

minterpy.transformations.utils.build_newton_to_chebyshev_operator(transformation)[source]#

Construct the Newton-to-Chebyshev transformation operator.

The transformation is the chain: Newton-to-Lagrange then Lagrange-to-Chebyshev.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of NewtonPolynomial) and the target type (ChebyshevPolynomial).

Returns:

The Newton-to-Chebyshev transformation operator.

Return type:

OperatorABC

minterpy.transformations.utils.build_canonical_to_newton_operator(transformation)[source]#

Construct the Canonical-to-Newton transformation operator.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of CanonicalPolynomial) and the target type (NewtonPolynomial).

Returns:

The Canonical-to-Newton transformation operator.

Return type:

OperatorABC

minterpy.transformations.utils.build_canonical_to_lagrange_operator(transformation)[source]#

Construct the Canonical-to-Lagrange transformation operator.

The transformation is the chain: Canonical-to-Newton then Newton-to-Lagrange.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of CanonicalPolynomial) and the target type (LagrangePolynomial).

Returns:

The Canonical-to-Lagrange transformation operator.

Return type:

OperatorABC

minterpy.transformations.utils.build_canonical_to_chebyshev_operator(transformation)[source]#

Construct the Canonical-to-Chebyshev transformation operator.

The transformation is the chain: Canonical-to-Newton then Newton-to-Lagrange then Lagrange-to-Chebyshev.

The Canonical-to-Lagrange operator is implemented as a single operator.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of CanonicalPolynomial) and the target type (ChebyshevPolynomial).

Returns:

The canonical-to-Chebyshev transformation operator.

Return type:

OperatorABC

minterpy.transformations.utils.build_chebyshev_to_lagrange_operator(transformation)[source]#

Construct the Chebyshev to Lagrange transformation operator.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of ChebyshevPolynomial) and the target type (LagrangePolynomial).

Returns:

The Chebyshev-to-Lagrange transformation operator.

Return type:

OperatorABC

Notes

  • The transformation is carried out by evaluation at the unisolvent nodes; this is not a sparse transformation operator.

minterpy.transformations.utils.build_chebyshev_to_newton_operator(transformation)[source]#

Construct the Chebyshev-to-Newton transformation operator.

The transformation is the chain: Chebyshev-to-Lagrange then Lagrange-to-Newton.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of ChebyshevPolynomial) and the target type (NewtonPolynomial).

Returns:

The Chebyshev-to-Newton transformation operator.

Return type:

OperatorABC

minterpy.transformations.utils.build_chebyshev_to_canonical_operator(transformation)[source]#

Construct the Chebyshev-to-Canonical transformation operator.

The transformation is the chain: Chebyshev-to-Lagrange then Lagrange-to-Newton then Newton-to-Canonical.

The Lagrange-to-Canonical is implemented as a single operator.

Parameters:

transformation (TransformationABC) – The transformer instance with information about the origin polynomial (an instance of ChebyshevPolynomial) and the target type (NewtonPolynomial).

Returns:

The Chebyshev-to-Newton transformation operator.

Return type:

OperatorABC