Defined in header <scicpp/polynomials.hpp>
Multiply two polynomials.
T
, std::size_t N
, std::size_t M
>polymul
(const std::array<T, N> &P1, const std::array<T, M> &P2)¶Polynomial coefficients are defined as two std::array P1 and P2.
Return the resulting polynomial coefficients in a std::array.
method
, typename T
>polymul
(const std::vector<T> &P1, const std::vector<T> &P2)¶Polynomial coefficients are defined as two std::vector P1 and P2.
Return the resulting polynomial coefficients in a std::vector of size P1.size() + P2.size() - 1
.
The template argument method define the method to use for polynomial
multiplications either using direct convolution (scicpp::polynomial::ConvMethod::DIRECT
, by default)
or using Fast Fourier Transform (scicpp::polynomial::ConvMethod::FFT
).