Skip to content

Handle multiplication by scalar polynomial.

Damar Wicaksono requested to merge dev-174 into dev

The implementation of polynomial-polynomial multiplication has been refactored to specifically handle multiplication with a scalar polynomial to be more consistent. In the case of Newton polynomial, transformation from the Lagrange coefficients to the Newton coefficients is not necessary for most typical use case of scalar polynomial because multiplication with scalar polynomial does not alter the underlying grid (and therefore, the Newton monomials).

Additionally:

  • Explicit scalar in-place multiplication has been removed; any in-place multiplication will resort to __mul__() which creates a new instance.
  • Polynomial-polynomial multiplication is now excluded; multiplication will now raise NotImplementedError.
  • The test suite has been updated to verify the latest changes.

This commit should resolve Issue #174 (closed) and part of refactoring and extending the support for arithmetic operations involving polynomial (see Issue #142 (closed)).

Merge request reports

Loading