mt2
8bbb7ce09375b7fc0edeb89e1fe1dbb76bbd0555
|
#include <polynomial.hpp>
Public Member Functions | |
Polynomial ()=default | |
Polynomial (const Polynomial &)=default | |
Polynomial & | operator= (const Polynomial &)=default |
Polynomial (Polynomial &&)=default | |
Polynomial & | operator= (Polynomial &&)=default |
~Polynomial ()=default | |
Polynomial (const CoeffType &coeff) | |
Polynomial (const std::vector< CoeffType > &coeffs) | |
void | SetCoefficient (std::size_t degree, CoeffType coefficient) |
CoeffType | GetCoefficient (std::size_t degree) const |
CoeffType | LeadingCoefficient () const |
std::size_t | Degree () const |
void | TruncateToDegree (std::size_t degree) |
bool | IsZero () const |
operator std::vector< CoeffType > () const | |
template<typename ArgType > | |
auto | operator() (const ArgType &x) const -> decltype(CoeffType(0)*x) |
Polynomial & | operator+= (const Polynomial &p) |
Polynomial & | operator-= (const Polynomial &p) |
Polynomial & | operator*= (const Polynomial &p) |
Polynomial & | operator/= (const Polynomial &p) |
Polynomial & | operator%= (const Polynomial &p) |
Polynomial | operator- () const |
Polynomial | operator+ () const |
bool | operator!= (const Polynomial &p) |
bool | operator== (const Polynomial &p) |
Private Member Functions | |
void | Shrink () |
Private Attributes | |
std::vector< CoeffType > | coeffs_ |
Definition at line 27 of file polynomial.hpp.
|
default |
|
default |
|
default |
|
default |
|
inline |
Definition at line 36 of file polynomial.hpp.
References Polynomial< CoeffType >::Shrink().
|
inline |
Definition at line 41 of file polynomial.hpp.
References Polynomial< CoeffType >::Shrink().
|
inline |
Definition at line 67 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
Referenced by Polynomial< CoeffType >::operator%=(), Polynomial< CoeffType >::operator*=(), Polynomial< CoeffType >::operator/=(), operator<<(), SturmSequence(), and Polynomial< CoeffType >::TruncateToDegree().
|
inline |
Definition at line 58 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
|
inline |
Definition at line 78 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
Referenced by Polynomial< CoeffType >::operator%=(), and Polynomial< CoeffType >::operator/=().
|
inline |
Definition at line 63 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
Referenced by Polynomial< CoeffType >::operator%=(), and Polynomial< CoeffType >::operator/=().
|
inline |
Definition at line 82 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
|
inline |
Definition at line 182 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
|
inline |
Definition at line 147 of file polynomial.hpp.
References Polynomial< CoeffType >::Degree(), Polynomial< CoeffType >::IsZero(), Polynomial< CoeffType >::LeadingCoefficient(), Polynomial< CoeffType >::SetCoefficient(), Polynomial< CoeffType >::Shrink(), and Polynomial< CoeffType >::TruncateToDegree().
|
inline |
Definition at line 87 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
|
inline |
Definition at line 118 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_, Polynomial< CoeffType >::Degree(), and Polynomial< CoeffType >::Shrink().
|
inline |
Definition at line 178 of file polynomial.hpp.
|
inline |
Definition at line 96 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_, and Polynomial< CoeffType >::Shrink().
|
inline |
Definition at line 170 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
|
inline |
Definition at line 107 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_, and Polynomial< CoeffType >::Shrink().
|
inline |
Definition at line 130 of file polynomial.hpp.
References Polynomial< CoeffType >::Degree(), Polynomial< CoeffType >::IsZero(), Polynomial< CoeffType >::LeadingCoefficient(), Polynomial< CoeffType >::SetCoefficient(), Polynomial< CoeffType >::Shrink(), and Polynomial< CoeffType >::TruncateToDegree().
|
default |
|
default |
|
inline |
Definition at line 186 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_.
|
inline |
Definition at line 46 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_, and Polynomial< CoeffType >::Shrink().
Referenced by Polynomial< CoeffType >::operator%=(), and Polynomial< CoeffType >::operator/=().
|
inlineprivate |
Definition at line 193 of file polynomial.hpp.
Referenced by Polynomial< CoeffType >::operator%=(), Polynomial< CoeffType >::operator*=(), Polynomial< CoeffType >::operator+=(), Polynomial< CoeffType >::operator-=(), Polynomial< CoeffType >::operator/=(), Polynomial< CoeffType >::Polynomial(), Polynomial< CoeffType >::SetCoefficient(), and Polynomial< CoeffType >::TruncateToDegree().
|
inline |
Definition at line 71 of file polynomial.hpp.
References Polynomial< CoeffType >::coeffs_, Polynomial< CoeffType >::Degree(), and Polynomial< CoeffType >::Shrink().
Referenced by Polynomial< CoeffType >::operator%=(), and Polynomial< CoeffType >::operator/=().
|
private |
Definition at line 191 of file polynomial.hpp.
Referenced by Polynomial< CoeffType >::Degree(), Polynomial< CoeffType >::GetCoefficient(), Polynomial< CoeffType >::IsZero(), Polynomial< CoeffType >::LeadingCoefficient(), Polynomial< CoeffType >::operator std::vector< CoeffType >(), Polynomial< CoeffType >::operator!=(), Polynomial< CoeffType >::operator()(), Polynomial< CoeffType >::operator*=(), Polynomial< CoeffType >::operator+=(), Polynomial< CoeffType >::operator-(), Polynomial< CoeffType >::operator-=(), Polynomial< CoeffType >::operator==(), Polynomial< CoeffType >::SetCoefficient(), and Polynomial< CoeffType >::TruncateToDegree().