Add Support for Polynomial-Polynomial Multiplication in the Chebyshev Basis
Currently, Minterpy does not yet support multiplication operation between polynomials in the Chebyshev basis (for addition/subtraction see Issue #164 (closed)). While the Chebyshev basis currently only exists for verification purposes (i.e., because ChebFun uses such basis), it may not be the preferred basis in Minterpy, but for completeness and a better features parity, the multiplication shall be supported.
The logic behind the multiplication is as follows: Given two polynomials in the Chebyshev basis
- Check if the polynomials have a matching domain
- Multiply the underlying
Grid
instances (rely on the method of creating a product of twoGrid
instances; see Issue #154 (closed)) - Multiply the underlying
MultiIndexSet
instances if they are not the same as the one attached to the respective instances (this is related to the notion "separate indices"). Creating a product of twoMultiIndexSet
instances rely on the__mul__()
method (see Issue #125 (closed)) - Process the coefficients; compute the values of the two polynomial operands at the unisolvent nodes associated with the product grid, multiply them to obtain the Lagrange coefficients of the product polynomial, and transform these coefficients into the Chebyshev coefficients.
- Create a new instance of polynomial with the new
Grid
instance, coefficients, and (when applicable)MultiIndexSet
instance.
This approach shall follow the recent changes in the MultiIndexSet
(see Issue #99 (closed)) and Grid
(see Issue #135) classes.
This issue is part of extending the support for arithmetic operations involving polynomial (see Issue #142 (closed)).