#include <polynom.hpp>
Public Types | |
typedef F | coef_type |
coefficients type | |
typedef std::pair< polynom< F >, polynom< F > > | div_result_type |
type that div operation returns | |
Public Member Functions | |
std::size_t | size () const |
number of the coefficients | |
std::size_t | deg () const |
degree of the polynom | |
void | setLe (const std::vector< F > &coefficients) |
void | setLe (const vector< F > &coefficients) |
void | setBe (const std::vector< F > &coefficients) |
void | setBe (const vector< F > &coefficients) |
const std::vector< F > & | getData () const |
div_result_type | div (const polynom< F > &a) const |
polynom< F > & | operator= (const polynom< F > ©) |
F & | operator[] (std::size_t i) |
const F & | operator[] (std::size_t i) const |
polynom< F > | operator- () const |
template<typename F> | |
bool | operator< (const polynom< F > &a) const |
template<typename F> | |
bool | operator<= (const polynom< F > &a) const |
template<typename F> | |
bool | operator> (const polynom< F > &a) const |
template<typename F> | |
bool | operator>= (const polynom< F > &a) const |
template<typename F> | |
polynom< F > | operator+ (const polynom< F > &a) const |
template<typename F> | |
polynom< F > | operator- (const polynom< F > &a) const |
template<typename F> | |
polynom< F > | operator * (const polynom< F > &a) const |
template<typename F> | |
polynom< F > | operator/ (const polynom< F > &a) const |
template<typename F> | |
polynom< F > | operator% (const polynom< F > &a) const |
polynom< F > & | operator+= (const polynom< F > &a) |
polynom< F > & | operator-= (const polynom< F > &a) |
polynom< F > & | operator *= (const polynom< F > &a) |
polynom< F > & | operator/= (const polynom< F > &a) |
int | operator== (const polynom< F > &a) const |
int | operator!= (const polynom< F > &a) const |
polynom () | |
Constructs zero polynom (polynom with one zero monom). | |
polynom (const F &value, std::size_t deg=0) | |
polynom (const polynom< F > ©) | |
polynom (const std::vector< F > &coeff, bool le=false) | |
polynom (const vector< F > &coefficients, bool le=false) | |
polynom (const F *coefficients, std::size_t count, bool le=false) | |
~polynom () | |
destructor | |
Static Public Member Functions | |
static polynom< F > | constant (const F &value) |
Protected Member Functions | |
template<typename F> | |
void | fixLeadingZeroes () |
Protected Attributes | |
std::vector< F > | c |
Definition at line 49 of file polynom.hpp.
typedef F Arageli::polynom< F >::coef_type |
typedef std::pair<polynom<F>, polynom<F> > Arageli::polynom< F >::div_result_type |
Arageli::polynom< F >::polynom | ( | ) | [inline] |
Constructs zero polynom (polynom with one zero monom).
Arageli::polynom< F >::polynom | ( | const F & | value, | |
std::size_t | deg = 0 | |||
) | [inline] |
Constructs polynom with degree deg and high coefficient equal to value
value | the value for the high coefficient | |
deg | the degree of the polynom |
Arageli::polynom< F >::polynom | ( | const polynom< F > & | copy | ) | [inline] |
Copy constructor
copy | the polynom to copy |
Arageli::polynom< F >::polynom | ( | const std::vector< F > & | coeff, | |
bool | le = false | |||
) | [inline] |
Constructs polynom with requested coefficients
coeff | coefficients for the polynom | |
le | the endian in which coefficients are stored |
Arageli::polynom< F >::polynom | ( | const vector< F > & | coefficients, | |
bool | le = false | |||
) | [inline] |
Arageli::polynom< F >::polynom | ( | const F * | coefficients, | |
std::size_t | count, | |||
bool | le = false | |||
) | [inline] |
Arageli::polynom< F >::~polynom | ( | ) | [inline] |
destructor
static polynom<F> Arageli::polynom< F >::constant | ( | const F & | value | ) | [inline, static] |
Definition at line 389 of file polynom.hpp.
std::size_t Arageli::polynom< F >::deg | ( | ) | const [inline] |
div_result_type Arageli::polynom< F >::div | ( | const polynom< F > & | a | ) | const [inline] |
divide operation Divides polynom on the a.
a | the polynom to divide on |
Definition at line 124 of file polynom.hpp.
void Arageli::polynom< F >::fixLeadingZeroes | ( | ) | [inline, protected] |
Definition at line 58 of file polynom.hpp.
const std::vector<F>& Arageli::polynom< F >::getData | ( | ) | const [inline] |
Definition at line 114 of file polynom.hpp.
polynom<F> Arageli::polynom< F >::operator * | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 245 of file polynom.hpp.
polynom<F>& Arageli::polynom< F >::operator *= | ( | const polynom< F > & | a | ) | [inline] |
Definition at line 291 of file polynom.hpp.
int Arageli::polynom< F >::operator!= | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 308 of file polynom.hpp.
polynom<F> Arageli::polynom< F >::operator% | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 274 of file polynom.hpp.
polynom<F> Arageli::polynom< F >::operator+ | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 215 of file polynom.hpp.
polynom<F>& Arageli::polynom< F >::operator+= | ( | const polynom< F > & | a | ) | [inline] |
Definition at line 279 of file polynom.hpp.
polynom<F> Arageli::polynom< F >::operator- | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 239 of file polynom.hpp.
polynom<F> Arageli::polynom< F >::operator- | ( | ) | const [inline] |
Definition at line 166 of file polynom.hpp.
polynom<F>& Arageli::polynom< F >::operator-= | ( | const polynom< F > & | a | ) | [inline] |
Definition at line 285 of file polynom.hpp.
polynom<F> Arageli::polynom< F >::operator/ | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 268 of file polynom.hpp.
polynom<F>& Arageli::polynom< F >::operator/= | ( | const polynom< F > & | a | ) | [inline] |
Definition at line 297 of file polynom.hpp.
bool Arageli::polynom< F >::operator< | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 175 of file polynom.hpp.
bool Arageli::polynom< F >::operator<= | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 185 of file polynom.hpp.
polynom<F>& Arageli::polynom< F >::operator= | ( | const polynom< F > & | copy | ) | [inline] |
Definition at line 150 of file polynom.hpp.
int Arageli::polynom< F >::operator== | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 303 of file polynom.hpp.
bool Arageli::polynom< F >::operator> | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 195 of file polynom.hpp.
bool Arageli::polynom< F >::operator>= | ( | const polynom< F > & | a | ) | const [inline] |
Definition at line 205 of file polynom.hpp.
const F& Arageli::polynom< F >::operator[] | ( | std::size_t | i | ) | const [inline] |
Definition at line 161 of file polynom.hpp.
F& Arageli::polynom< F >::operator[] | ( | std::size_t | i | ) | [inline] |
Definition at line 156 of file polynom.hpp.
void Arageli::polynom< F >::setBe | ( | const vector< F > & | coefficients | ) | [inline] |
Definition at line 103 of file polynom.hpp.
void Arageli::polynom< F >::setBe | ( | const std::vector< F > & | coefficients | ) | [inline] |
Definition at line 92 of file polynom.hpp.
void Arageli::polynom< F >::setLe | ( | const vector< F > & | coefficients | ) | [inline] |
Definition at line 82 of file polynom.hpp.
void Arageli::polynom< F >::setLe | ( | const std::vector< F > & | coefficients | ) | [inline] |
Definition at line 72 of file polynom.hpp.
std::size_t Arageli::polynom< F >::size | ( | ) | const [inline] |
std::vector<F> Arageli::polynom< F >::c [protected] |
Definition at line 314 of file polynom.hpp.