#include <sparse_polynom.hpp>
Public Types | |
typedef F | coef_type |
Coefficient type. | |
typedef I | degree_type |
Degree type. | |
Public Member Functions | |
monom () | |
Zero monom. | |
monom (const F &c) | |
Monom with zero degree (i.e. a constant of type F). | |
monom (const F &c, const I &d) | |
Creates monom of common form. | |
template<typename F1, typename I1> | |
monom (const monom< F1, I1 > &x) | |
Initialization with conversion from monom with any other actual template arguments. | |
monom (const char *s) | |
Initialization from a string representation of monom. | |
template<typename F1, typename I1> | |
monom & | operator= (const monom< F1, I1 > &x) |
monom & | operator= (const char *s) |
bool | is_const () const |
Determines if monom is constant. | |
bool | is_null () const |
Determines if monom is zero monom. | |
bool | is_unit () const |
Determines if monom is unit. | |
bool | is_opposite_unit () const |
Determines if monom is minus unit. | |
bool | is_x () const |
Returns true if monom is "x". | |
const coef_type & | coef () const |
Access to the coefficient. Read only. | |
coef_type & | coef () |
Access to the coefficient. | |
const degree_type & | degree () const |
Access to the degree. Read only. | |
degree_type & | degree () |
Access to the degree. | |
template<typename F1, typename I1> | |
bool | can_add (const monom< F1, I1 > &x) const |
Determines if monoms are correct for addition. | |
monom & | opposite () |
Inverts the coefficient to opposite value. | |
monom | operator- () const |
Returns a monom with opposite coefficient. | |
const monom & | operator+ () const |
Returns a reference on this monom. For symmetry with operator- only. | |
monom & | operator++ () |
monom | operator++ (int) |
monom & | operator-- () |
monom | operator-- (int) |
template<typename F1> | |
monom & | operator+= (const F1 &x) |
Adds constant to this monom. | |
template<typename F1> | |
monom & | operator-= (const F1 &x) |
Subtracts constant to this monom. | |
template<typename F1> | |
monom & | operator *= (const F1 &x) |
Multilies this monom by constant. | |
template<typename F1> | |
monom & | operator/= (const F1 &x) |
Divides this monom by constant. | |
template<typename F1> | |
monom & | operator%= (const F1 &x) |
Computes remainder from division this monom by constant. | |
template<typename F1, typename I1> | |
monom & | operator+= (const monom< F1, I1 > &x) |
Adds two monoms. | |
template<typename F1, typename I1> | |
monom & | operator-= (const monom< F1, I1 > &x) |
Subtracts two monoms. | |
template<typename F1, typename I1> | |
monom & | operator *= (const monom< F1, I1 > &x) |
Multilies two monoms. | |
template<typename F1, typename I1> | |
monom & | operator/= (const monom< F1, I1 > &x) |
Divides two monoms. | |
template<typename F1, typename I1> | |
monom & | operator%= (const monom< F1, I1 > &x) |
Computes remainder from division this monom by another monom. | |
template<typename F1, typename I1> | |
void | swap (monom< F1, I1 > &x) |
Swaps two monom values. |
A monom is a pair of coefficient and degree.
F | type of a coefficient | |
I | type of a degree |
Definition at line 70 of file sparse_polynom.hpp.
typedef F Arageli::monom< F, I >::coef_type |
typedef I Arageli::monom< F, I >::degree_type |
Arageli::monom< F, I >::monom | ( | ) | [inline] |
Zero monom.
Creates monom with zero coefficient and zero degree.
Definition at line 82 of file sparse_polynom.hpp.
Arageli::monom< F, I >::monom | ( | const F & | c | ) | [inline] |
Monom with zero degree (i.e. a constant of type F).
Creates monom with zero degree and given coefficient.
c | the coefficient. |
Definition at line 87 of file sparse_polynom.hpp.
Arageli::monom< F, I >::monom | ( | const F & | c, | |
const I & | d | |||
) | [inline] |
Creates monom of common form.
c | the coefficient | |
d | degree |
Definition at line 92 of file sparse_polynom.hpp.
Arageli::monom< F, I >::monom | ( | const monom< F1, I1 > & | x | ) | [inline] |
Initialization with conversion from monom with any other actual template arguments.
Definition at line 96 of file sparse_polynom.hpp.
Arageli::monom< F, I >::monom | ( | const char * | s | ) |
Initialization from a string representation of monom.
Rule for the argument string is the same as for operator>>.
bool Arageli::monom< F, I >::can_add | ( | const monom< F1, I1 > & | x | ) | const [inline] |
Determines if monoms are correct for addition.
Returns true if this monom can add with the argument, i.e. if they have the same degrees.
Definition at line 159 of file sparse_polynom.hpp.
coef_type& Arageli::monom< F, I >::coef | ( | ) | [inline] |
const coef_type& Arageli::monom< F, I >::coef | ( | ) | const [inline] |
degree_type& Arageli::monom< F, I >::degree | ( | ) | [inline] |
const degree_type& Arageli::monom< F, I >::degree | ( | ) | const [inline] |
bool Arageli::monom< F, I >::is_const | ( | ) | const [inline] |
Determines if monom is constant.
Returns true if the degree is zero value.
Definition at line 115 of file sparse_polynom.hpp.
bool Arageli::monom< F, I >::is_null | ( | ) | const [inline] |
Determines if monom is zero monom.
Returns true if the coefficient is zero value. The result does not depend on the degree value.
Definition at line 120 of file sparse_polynom.hpp.
bool Arageli::monom< F, I >::is_opposite_unit | ( | ) | const [inline] |
Determines if monom is minus unit.
Returns true if the coefficient is minus unit and the degree is zero value
Definition at line 131 of file sparse_polynom.hpp.
bool Arageli::monom< F, I >::is_unit | ( | ) | const [inline] |
Determines if monom is unit.
Returns ture if the coefficient is unit and the degree is zero value.
Definition at line 125 of file sparse_polynom.hpp.
bool Arageli::monom< F, I >::is_x | ( | ) | const [inline] |
Returns true if monom is "x".
Returns true if degree = 1 and coefficient = 1.
Definition at line 140 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator *= | ( | const monom< F1, I1 > & | x | ) | [inline] |
Multilies two monoms.
Multilies this monom by the argument x. Returns reference to this monom.
Definition at line 278 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator *= | ( | const F1 & | x | ) | [inline] |
Multilies this monom by constant.
Multilies this monom by the argument x. Returns reference to this monom.
Definition at line 221 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator%= | ( | const monom< F1, I1 > & | x | ) | [inline] |
Computes remainder from division this monom by another monom.
Divides this monom by the argument x and assign the result to this monom object. Returns reference to this monom. Requirement: x is not zero.
Definition at line 312 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator%= | ( | const F1 & | x | ) | [inline] |
Computes remainder from division this monom by constant.
Divides this monom by the argument x and assign the result to this monom object. Returns reference to this monom. Requirement: x is not zero.
Definition at line 244 of file sparse_polynom.hpp.
const monom& Arageli::monom< F, I >::operator+ | ( | ) | const [inline] |
Returns a reference on this monom. For symmetry with operator- only.
Definition at line 174 of file sparse_polynom.hpp.
monom Arageli::monom< F, I >::operator++ | ( | int | ) | [inline] |
Definition at line 183 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator++ | ( | ) | [inline] |
Definition at line 176 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator+= | ( | const monom< F1, I1 > & | x | ) | [inline] |
Adds two monoms.
Adds the argument x to this monom. Returns reference to this monom. Requirement: this->can_add(x).
Definition at line 255 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator+= | ( | const F1 & | x | ) | [inline] |
Adds constant to this monom.
Adds the argument x to this monom. Returns reference to this monom. Requirement: this->is_const().
Definition at line 198 of file sparse_polynom.hpp.
monom Arageli::monom< F, I >::operator- | ( | ) | const [inline] |
monom Arageli::monom< F, I >::operator-- | ( | int | ) | [inline] |
Definition at line 192 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator-- | ( | ) | [inline] |
Definition at line 185 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator-= | ( | const monom< F1, I1 > & | x | ) | [inline] |
Subtracts two monoms.
Subtracts the argument x to this monom. Returns reference to this monom. Requirement: this->can_add(x).
Definition at line 267 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator-= | ( | const F1 & | x | ) | [inline] |
Subtracts constant to this monom.
Subtracts the argument x to this monom. Returns reference to this monom. Requirement: this->is_const().
Definition at line 210 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator/= | ( | const monom< F1, I1 > & | x | ) | [inline] |
Divides two monoms.
Divides this monom by the argument x. Returns reference to this monom.
Definition at line 289 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator/= | ( | const F1 & | x | ) | [inline] |
Divides this monom by constant.
Divides this monom by the argument x. Returns reference to this monom. Requirement: x is not zero.
Definition at line 232 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator= | ( | const char * | s | ) | [inline] |
Definition at line 110 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::operator= | ( | const monom< F1, I1 > & | x | ) | [inline] |
Definition at line 104 of file sparse_polynom.hpp.
monom& Arageli::monom< F, I >::opposite | ( | ) | [inline] |
void Arageli::monom< F, I >::swap | ( | monom< F1, I1 > & | x | ) | [inline] |