atlas  0.6
Public Types | Public Member Functions | List of all members
atlas::kl::KLPolEntry Class Reference
Inheritance diagram for atlas::kl::KLPolEntry:
Inheritance graph
Collaboration diagram for atlas::kl::KLPolEntry:
Collaboration graph

Public Types

typedef KLStore Pooltype

Public Member Functions

 KLPolEntry ()
 KLPolEntry (const KLPol &p)
size_t hashCode (size_t modulus) const
 calculate a hash value in [0,modulus[, where modulus is a power of 2 More...
bool operator!= (Pooltype::const_reference e) const
- Public Member Functions inherited from atlas::polynomials::Safe_Poly< C >
 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)
- Public Member Functions inherited from atlas::polynomials::Polynomial< C >
 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
up_remainder (C c, Degree d) const
C & operator[] (Degree j)
Polynomialoperator+= (const Polynomial &q)
Polynomialoperator-= (const Polynomial &q)
Polynomialsubtract_from (const Polynomial &p)
Polynomialoperator*= (C)
Polynomialoperator/= (C)
Polynomial operator* (C c) const
Polynomial operator* (const Polynomial &q) const
Polynomialoperator*= (const Polynomial &q)
Polynomial operator+ (const Polynomial &q) const
Polynomial operator- (const Polynomial &q) const
Polynomial operator- () const
factor_by (C c, Degree d)
std::ostream & print (std::ostream &strm, const char *x) const

Additional Inherited Members

- Protected Member Functions inherited from atlas::polynomials::Polynomial< C >
void resize (Degree d)
void adjustSize ()
 Adjusts the size of d_data so that it corresponds to the degree + 1. More...

Member Typedef Documentation

Constructor & Destructor Documentation

atlas::kl::KLPolEntry::KLPolEntry ( )
atlas::kl::KLPolEntry::KLPolEntry ( const KLPol p)

Member Function Documentation

size_t atlas::kl::KLPolEntry::hashCode ( size_t  modulus) const

calculate a hash value in [0,modulus[, where modulus is a power of 2

The function is in fact evaluation of the polynomial (with coefficients interpreted in Z) at the point 2^21+2^13+2^8+2^5+1=2105633, which can be calculated quickly (without multiplications) and which gives a good spread (which is not the case if 2105633 is replaced by a small number, because the evaluation values will not grow fast enough for low degree polynomials!).

bool atlas::kl::KLPolEntry::operator!= ( Pooltype::const_reference  e) const

The documentation for this class was generated from the following file: