Polynomial
Functions
-
template<class T>
Polynomial<T> operator+(const Polynomial<T> &P, const Polynomial<T> &Q)
-
template<class T>
Polynomial<T> operator*(const Polynomial<T> &P, const Polynomial<T> &Q)
-
template<class T>
Polynomial<T> operator*(const T lambda, const Polynomial<T> &P)
-
template<class T>
bool operator==(const Polynomial<T> &P, const Polynomial<T> &Q)
-
template<class T>
std::ostream &operator<<(std::ostream &os, const Polynomial<T> &P)
-
template<class T>
Polynomial<T> lagrangePolynomial(const std::vector<std::pair<T, T>> &points)
-
template<class T>
class Polynomial Public Functions
-
inline Polynomial(const std::vector<T> &coefs = {})
The coefficients must be given lower degree first.
-
inline int degree() const
-
void operator+=(const Polynomial<T> &P)
-
void operator*=(const Polynomial<T> &P)
Private Functions
-
void removeLeadingZeros()
Friends
-
template<class T_>
friend Polynomial<T_> operator+(const Polynomial<T_> &P, const Polynomial<T_> &Q)
-
template<class T_>
friend Polynomial<T_> operator*(const Polynomial<T_> &P, const Polynomial<T_> &Q)
-
template<class T_>
friend Polynomial<T_> operator*(const T_ lambda, const Polynomial<T_> &P)
-
template<class T_>
friend bool operator==(const Polynomial<T_> &P, const Polynomial<T_> &Q)
-
template<class T_>
friend std::ostream &operator<<(std::ostream &os, const Polynomial<T_> &P)
-
inline Polynomial(const std::vector<T> &coefs = {})