Arageli::polynom< F > Class Template Reference

#include <polynom.hpp>

List of all members.

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 > &copy)
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 > &copy)
 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


Detailed Description

template<typename F>
class Arageli::polynom< F >

Implementation of a polynom. An instance of this type is a polynom where the coefficients are of type F with type traits FT.

Definition at line 49 of file polynom.hpp.


Member Typedef Documentation

template<typename F>
typedef F Arageli::polynom< F >::coef_type

coefficients type

Definition at line 53 of file polynom.hpp.

template<typename F>
typedef std::pair<polynom<F>, polynom<F> > Arageli::polynom< F >::div_result_type

type that div operation returns

Definition at line 55 of file polynom.hpp.


Constructor & Destructor Documentation

template<typename F>
Arageli::polynom< F >::polynom (  )  [inline]

Constructs zero polynom (polynom with one zero monom).

template<typename F>
Arageli::polynom< F >::polynom ( const F &  value,
std::size_t  deg = 0 
) [inline]

Constructs polynom with degree deg and high coefficient equal to value

Parameters:
value the value for the high coefficient
deg the degree of the polynom

template<typename F>
Arageli::polynom< F >::polynom ( const polynom< F > &  copy  )  [inline]

Copy constructor

Parameters:
copy the polynom to copy

template<typename F>
Arageli::polynom< F >::polynom ( const std::vector< F > &  coeff,
bool  le = false 
) [inline]

Constructs polynom with requested coefficients

Parameters:
coeff coefficients for the polynom
le the endian in which coefficients are stored

template<typename F>
Arageli::polynom< F >::polynom ( const vector< F > &  coefficients,
bool  le = false 
) [inline]

template<typename F>
Arageli::polynom< F >::polynom ( const F *  coefficients,
std::size_t  count,
bool  le = false 
) [inline]

template<typename F>
Arageli::polynom< F >::~polynom (  )  [inline]

destructor


Member Function Documentation

template<typename F>
static polynom<F> Arageli::polynom< F >::constant ( const F &  value  )  [inline, static]

Definition at line 389 of file polynom.hpp.

template<typename F>
std::size_t Arageli::polynom< F >::deg (  )  const [inline]

degree of the polynom

Definition at line 70 of file polynom.hpp.

template<typename F>
div_result_type Arageli::polynom< F >::div ( const polynom< F > &  a  )  const [inline]

divide operation Divides polynom on the a.

Parameters:
a the polynom to divide on
Returns:
return a pair of polynomials where the first polynom quotient and the second is residue

Definition at line 124 of file polynom.hpp.

template<typename F>
template<typename F>
void Arageli::polynom< F >::fixLeadingZeroes (  )  [inline, protected]

Definition at line 58 of file polynom.hpp.

template<typename F>
const std::vector<F>& Arageli::polynom< F >::getData (  )  const [inline]

Definition at line 114 of file polynom.hpp.

template<typename F>
template<typename F>
polynom<F> Arageli::polynom< F >::operator * ( const polynom< F > &  a  )  const [inline]

Definition at line 245 of file polynom.hpp.

template<typename F>
polynom<F>& Arageli::polynom< F >::operator *= ( const polynom< F > &  a  )  [inline]

Definition at line 291 of file polynom.hpp.

template<typename F>
int Arageli::polynom< F >::operator!= ( const polynom< F > &  a  )  const [inline]

Definition at line 308 of file polynom.hpp.

template<typename F>
template<typename F>
polynom<F> Arageli::polynom< F >::operator% ( const polynom< F > &  a  )  const [inline]

Definition at line 274 of file polynom.hpp.

template<typename F>
template<typename F>
polynom<F> Arageli::polynom< F >::operator+ ( const polynom< F > &  a  )  const [inline]

Definition at line 215 of file polynom.hpp.

template<typename F>
polynom<F>& Arageli::polynom< F >::operator+= ( const polynom< F > &  a  )  [inline]

Definition at line 279 of file polynom.hpp.

template<typename F>
template<typename F>
polynom<F> Arageli::polynom< F >::operator- ( const polynom< F > &  a  )  const [inline]

Definition at line 239 of file polynom.hpp.

template<typename F>
polynom<F> Arageli::polynom< F >::operator- (  )  const [inline]

Definition at line 166 of file polynom.hpp.

template<typename F>
polynom<F>& Arageli::polynom< F >::operator-= ( const polynom< F > &  a  )  [inline]

Definition at line 285 of file polynom.hpp.

template<typename F>
template<typename F>
polynom<F> Arageli::polynom< F >::operator/ ( const polynom< F > &  a  )  const [inline]

Definition at line 268 of file polynom.hpp.

template<typename F>
polynom<F>& Arageli::polynom< F >::operator/= ( const polynom< F > &  a  )  [inline]

Definition at line 297 of file polynom.hpp.

template<typename F>
template<typename F>
bool Arageli::polynom< F >::operator< ( const polynom< F > &  a  )  const [inline]

Definition at line 175 of file polynom.hpp.

template<typename F>
template<typename F>
bool Arageli::polynom< F >::operator<= ( const polynom< F > &  a  )  const [inline]

Definition at line 185 of file polynom.hpp.

template<typename F>
polynom<F>& Arageli::polynom< F >::operator= ( const polynom< F > &  copy  )  [inline]

Definition at line 150 of file polynom.hpp.

template<typename F>
int Arageli::polynom< F >::operator== ( const polynom< F > &  a  )  const [inline]

Definition at line 303 of file polynom.hpp.

template<typename F>
template<typename F>
bool Arageli::polynom< F >::operator> ( const polynom< F > &  a  )  const [inline]

Definition at line 195 of file polynom.hpp.

template<typename F>
template<typename F>
bool Arageli::polynom< F >::operator>= ( const polynom< F > &  a  )  const [inline]

Definition at line 205 of file polynom.hpp.

template<typename F>
const F& Arageli::polynom< F >::operator[] ( std::size_t  i  )  const [inline]

Definition at line 161 of file polynom.hpp.

template<typename F>
F& Arageli::polynom< F >::operator[] ( std::size_t  i  )  [inline]

Definition at line 156 of file polynom.hpp.

template<typename F>
void Arageli::polynom< F >::setBe ( const vector< F > &  coefficients  )  [inline]

Definition at line 103 of file polynom.hpp.

template<typename F>
void Arageli::polynom< F >::setBe ( const std::vector< F > &  coefficients  )  [inline]

Definition at line 92 of file polynom.hpp.

template<typename F>
void Arageli::polynom< F >::setLe ( const vector< F > &  coefficients  )  [inline]

Definition at line 82 of file polynom.hpp.

template<typename F>
void Arageli::polynom< F >::setLe ( const std::vector< F > &  coefficients  )  [inline]

Definition at line 72 of file polynom.hpp.

template<typename F>
std::size_t Arageli::polynom< F >::size (  )  const [inline]

number of the coefficients

Definition at line 68 of file polynom.hpp.


Member Data Documentation

template<typename F>
std::vector<F> Arageli::polynom< F >::c [protected]

Definition at line 314 of file polynom.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Aug 31 17:38:26 2006 for Arageli by  doxygen 1.4.7