Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

atlas::polynomials Namespace Reference


Classes

class  atlas::polynomials::Polynomial< C >
 Polynomials with coefficients in C, which is expected to be a standard unsigned type. More...

Typedefs

typedef size_t Degree

Functions

template<typename C>
bool compare (const Polynomial< C > &, const Polynomial< C > &)
 Polynomial comparison.
template<typename C>
void safeAdd (C &, C)
 a += b.
template<typename C>
void safeProd (C &, C)
 a *= b.
template<typename C>
void safeSubtract (C &, C)
 a -= b.

Variables

const Degree MinusOne = ~ Degree(0)


Typedef Documentation

typedef size_t atlas::polynomials::Degree
 

Definition at line 25 of file polynomials_fwd.h.

Referenced by atlas::polynomials::Polynomial< KLCoeff >::degree(), atlas::polynomials::Polynomial< C >::safeAdd(), and atlas::polynomials::Polynomial< C >::safeSubtract().


Function Documentation

template<typename C>
bool atlas::polynomials::compare const Polynomial< C > &  p,
const Polynomial< C > &  q
 

Polynomial comparison.

Explanation: p < q if deg(p) < deg(q), or if degrees are equal, and the comparison holds for coefficients, in lex-order starting from the top.

Definition at line 289 of file polynomials_def.h.

References atlas::polynomials::Polynomial< C >::degree(), and atlas::polynomials::Polynomial< C >::isZero().

Referenced by atlas::bitvector::normalize().

template<typename C>
void atlas::polynomials::safeAdd C &  a,
b
 

a += b.

Throws a NumericOverflow exception in case of overflow.

Definition at line 325 of file polynomials_def.h.

Referenced by atlas::polynomials::Polynomial< C >::safeAdd().

template<typename C>
void atlas::polynomials::safeProd C &  a,
b
 

a *= b.

Throws a NumericOverflow exception in case of overflow.

Definition at line 342 of file polynomials_def.h.

Referenced by atlas::polynomials::Polynomial< C >::safeAdd(), and atlas::polynomials::Polynomial< C >::safeSubtract().

template<typename C>
void atlas::polynomials::safeSubtract C &  a,
b
 

a -= b.

Throws a NumericUnderflow exception in case of underflow.

Definition at line 362 of file polynomials_def.h.

Referenced by atlas::polynomials::Polynomial< C >::safeSubtract().


Variable Documentation

const Degree atlas::polynomials::MinusOne = ~ Degree(0)
 

Definition at line 28 of file polynomials.h.


Generated on Wed Mar 26 16:53:00 2008 for atlas by  doxygen 1.3.9.1