Refactor Polynomial-Polynomial Multiplication in the Newton Basis
Following recent changes in the MultiIndexSet
(see Issue #99 (closed)) and Grid
(see Issue #135) classes, the implementation of polynomial-polynomial multiplication in the Newton basis shall be refactored.
The logic behind the multiplication is as follows: Given two polynomials in the Newton 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 Newton coefficients.
- Create a new instance of polynomial with the new
Grid
instance, coefficients, and (when applicable)MultiIndexSet
instance.
This issue is part of extending the support for arithmetic operations involving polynomial (see Issue #142 (closed)).