|
| Safe_Poly () |
|
| Safe_Poly (Degree d, C c) |
|
void | safeAdd (const Safe_Poly &p, Degree d, C c) |
| Adds x^d.c.q, to *this, watching for overflow, assuming |c>0|. More...
|
|
void | safeAdd (const Safe_Poly &p, Degree d=0) |
|
void | safeDivide (C c) |
| Divides polynomial by scalar c, throwing an error is division is inexact. More...
|
|
void | safeQuotient (Degree d=0) |
|
void | safeSubtract (const Safe_Poly &p, Degree d, C c) |
| Subtracts x^d.c.q from *this, watching for underflow, assuming |c>0|. More...
|
|
void | safeSubtract (const Safe_Poly &p, Degree d=0) |
|
| Polynomial () |
|
| Polynomial (C c) |
|
| Polynomial (Degree d, C c) |
| Constructs cX^d. More...
|
|
| Polynomial (Degree d, const Polynomial &Q) |
|
template<typename U > |
| Polynomial (const Polynomial< U > &src) |
|
void | swap (Polynomial &other) |
|
const C & | operator[] (Degree i) const |
|
const C | coef (Degree i) const |
|
bool | operator== (const Polynomial &q) const |
|
bool | operator!= (const Polynomial &q) const |
|
bool | operator< (const Polynomial &q) const |
| Operator < is the default from the standard library < on vector. More...
|
|
std::vector< C >::const_iterator | begin () const |
|
std::vector< C >::const_iterator | end () const |
|
Degree | degree () const |
|
Degree | size () const |
|
bool | isZero () const |
|
bool | multi_term () const |
|
C | up_remainder (C c, Degree d) const |
|
C & | operator[] (Degree j) |
|
Polynomial & | operator+= (const Polynomial &q) |
|
Polynomial & | operator-= (const Polynomial &q) |
|
Polynomial & | subtract_from (const Polynomial &p) |
|
Polynomial & | operator*= (C) |
|
Polynomial & | operator/= (C) |
|
Polynomial | operator* (C c) const |
|
Polynomial | operator* (const Polynomial &q) const |
|
Polynomial & | operator*= (const Polynomial &q) |
|
Polynomial | operator+ (const Polynomial &q) const |
|
Polynomial | operator- (const Polynomial &q) const |
|
Polynomial | operator- () const |
|
C | factor_by (C c, Degree d) |
|
std::ostream & | print (std::ostream &strm, const char *x) const |
|
Adds x^d.c.q, to *this, watching for overflow, assuming |c>0|.
NOTE: may forward a NumericOverflow exception.
NOTE: we need to be careful in the case where q = *this, but we can avoid making a copy, by doing the addition top-to-bottom.