Givaro
Public Types | Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
IntRNSsystem< Container, Alloc > Class Template Reference

RNS system class. No doc. More...

#include <givintrns.h>

+ Inheritance diagram for IntRNSsystem< Container, Alloc >:
+ Collaboration diagram for IntRNSsystem< Container, Alloc >:

Public Types

typedef Element external
typedef Container< Element,
Alloc< Element > > 
array
typedef Integer Rep
typedef Rep Element

Public Member Functions

 IntRNSsystem ()
 ~IntRNSsystem ()
 IntRNSsystem (const IntRNSsystem &R)
 IntRNSsystem (const array &primes)
template<class TT >
 IntRNSsystem (const Container< TT, Alloc< TT > > &primes)
template<class TT >
void RnsToMixedRadix (array &mixrad, const Container< TT, Alloc< TT > > &residu)
void MixedRadixToRing (external &res, const array &mixrad) const
void RingToRns (array &residu, const external &a)
void fastRingToRns (array &residu, const external &a) const
template<class TT >
void RnsToRing (external &a, const Container< TT, Alloc< TT > > &residu)
void fastRnsToRing (external &a, const array &residu) const
int NumOfPrimes () const
const array & Primes () const
const Element ith (const size_t i) const
const array & Reciprocals () const
const Element reciprocal (const size_t i) const
const Element product () const
template<class TT >
void RnsToMixedRadix (IntRNSsystem< Container, Alloc >::array &mixrad, const Container< TT, Alloc< TT > > &residu)
int operator== (const IntegerDom &) const
int operator!= (const IntegerDom &) const
Rep & init (Rep &a) const
Rep & init (Rep &a, const Rep &b) const
Rep & read (Rep &a, const long i) const
Rep & read (Rep &a, const unsigned long i) const
Rep & read (Rep &a, const int i) const
Rep & read (Rep &a, const unsigned int i) const
std::istream & read (std::istream &i)
std::istream & read (std::istream &i, Rep &n) const
Rep & convert (Rep &a, const Rep &b) const
template<class XXX >
XXX & convert (XXX &x, const Rep &a) const
Rep & assign (Rep &a, const Rep &b) const
const Rep & access (const Rep &a) const
Rep & mul (Rep &r, const Rep &a, const Rep &b) const
Rep & div (Rep &r, const Rep &a, const Rep &b) const
Rep & mod (Rep &r, const Rep &a, const Rep &b) const
Rep & add (Rep &r, const Rep &a, const Rep &b) const
Rep & sub (Rep &r, const Rep &a, const Rep &b) const
Rep & divmod (Rep &q, Rep &r, const Rep &a, const Rep &b) const
Rep & divexact (Rep &q, const Rep &a, const Rep &b) const
Rep & mulin (Rep &r, const Rep &a) const
Rep & divin (Rep &r, const Rep &a) const
Rep & modin (Rep &r, const Rep &a) const
Rep & addin (Rep &r, const Rep &a) const
Rep & subin (Rep &r, const Rep &a) const
Rep & axpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
Rep & maxpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
Rep & maxpyin (Rep &r, const Rep &a, const Rep &b) const
Rep & axmy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
Rep & axpyin (Rep &r, const Rep &a, const Rep &b) const
Rep & axmyin (Rep &r, const Rep &a, const Rep &b) const
Rep & neg (Rep &r, const Rep &a) const
Rep & negin (Rep &r) const
Rep & gcd (Rep &g, Rep &u, Rep &v, const Rep &a, const Rep &b) const
Rep & gcd (Rep &g, const Rep &a, const Rep &b) const
Rep & lcm (Rep &l, const Rep &a, const Rep &b) const
Rep & lcmin (Rep &l, const Rep &a) const
Rep & inv (Rep &u, const Rep &a, const Rep &b) const
Rep & invin (Rep &u, const Rep &b) const
Rep & pow (Rep &r, const Rep &n, const long l) const
Rep & pow (Rep &r, const Rep &n, const unsigned long l) const
Rep & pow (Rep &r, const Rep &n, const int l) const
Rep & pow (Rep &r, const Rep &n, const unsigned int l) const
Rep & sqrt (Rep &s, const Rep &n) const
Rep & sqrt (Rep &s, Rep &r, const Rep &n) const
long logp (const Rep &a, const Rep &p) const
Rep & powmod (Rep &r, const Rep &n, const long e, const Rep &m) const
Rep & powmod (Rep &r, const Rep &n, const Rep &e, const Rep &m) const
unsigned long length (const Rep &a) const
int sign (const Rep &a) const
bool isZero (const Rep &a) const
bool isOne (const Rep &a) const
bool areEqual (const Rep &a, const Rep &b) const
bool areNEqual (const Rep &a, const Rep &b) const
bool isgeq (const Rep &a, const Rep &b) const
bool isgeq (const long b, const Rep &a) const
bool isgeq (const Rep &a, const long b) const
bool isleq (const Rep &a, const Rep &b) const
bool isleq (const long b, const Rep &a) const
bool isleq (const Rep &a, const long b) const
bool isgt (const Rep &a, const Rep &b) const
bool isgt (const long b, const Rep &a) const
bool isgt (const Rep &a, const long b) const
bool islt (const Rep &a, const Rep &b) const
bool islt (const long b, const Rep &a) const
bool islt (const Rep &a, const long b) const
template<class RandIter >
Rep & random (RandIter &, Rep &r, long s=1) const
template<class RandIter >
Rep & random (RandIter &, Rep &r, const Rep &b) const
template<class RandIter >
Rep & nonzerorandom (RandIter &, Rep &r, long s=1) const
template<class RandIter >
Rep & nonzerorandom (RandIter &, Rep &r, const Rep &b) const
std::ostream & write (std::ostream &o) const
std::ostream & write (std::ostream &o, const Rep &n) const

Data Fields

const Integer one
const Integer mOne
const Integer zero

Protected Member Functions

void ComputeCk ()
void ComputeProd ()
void ComputeQk ()

Protected Attributes

array _primes
Element _prod
array _ck
size_t _sizek
size_t _log2k
array _qk
array _u

Detailed Description

template<template< class, class > class Container, template< class > class Alloc>
class Givaro::IntRNSsystem< Container, Alloc >

RNS system class. No doc.


Member Typedef Documentation

typedef Element external
typedef Container< Element, Alloc<Element> > array
typedef Integer Rep
inherited
typedef Rep Element
inherited

Constructor & Destructor Documentation

IntRNSsystem ( )
inline
~IntRNSsystem ( )
inline
IntRNSsystem ( const IntRNSsystem< Container, Alloc > &  R)
inline
IntRNSsystem ( const array &  primes)
inline
IntRNSsystem ( const Container< TT, Alloc< TT > > &  primes)
inline

Member Function Documentation

void RnsToMixedRadix ( array &  mixrad,
const Container< TT, Alloc< TT > > &  residu 
)
void MixedRadixToRing ( external &  res,
const array &  mixrad 
) const
inline
void RingToRns ( array &  residu,
const external &  a 
)
inline
void fastRingToRns ( array &  residu,
const external &  a 
) const
void RnsToRing ( external &  a,
const Container< TT, Alloc< TT > > &  residu 
)
inline
void fastRnsToRing ( external &  a,
const array &  residu 
) const
int NumOfPrimes ( ) const
inline
const IntRNSsystem< Container, Alloc >::array & Primes ( ) const
inline
const IntRNSsystem< Container, Alloc >::Element ith ( const size_t  i) const
inline
const IntRNSsystem< Container, Alloc >::array & Reciprocals ( ) const
inline
const IntRNSsystem< Container, Alloc >::Element reciprocal ( const size_t  i) const
inline
const IntRNSsystem< Container, Alloc >::Element product ( ) const
inline
void ComputeCk ( )
inlineprotected
void ComputeProd ( )
inlineprotected
void ComputeQk ( )
protected
void RnsToMixedRadix ( IntRNSsystem< Container, Alloc >::array &  mixrad,
const Container< TT, Alloc< TT > > &  residu 
)
inline
int operator== ( const IntegerDom &  ) const
inlineinherited
int operator!= ( const IntegerDom &  ) const
inlineinherited
Rep& init ( Rep &  a) const
inlineinherited
Rep& init ( Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& read ( Rep &  a,
const long  i 
) const
inlineinherited
Rep& read ( Rep &  a,
const unsigned long  i 
) const
inlineinherited
Rep& read ( Rep &  a,
const int  i 
) const
inlineinherited
Rep& read ( Rep &  a,
const unsigned int  i 
) const
inlineinherited
std::istream& read ( std::istream &  i)
inlineinherited
std::istream& read ( std::istream &  i,
Rep &  n 
) const
inlineinherited
Rep& convert ( Rep &  a,
const Rep &  b 
) const
inlineinherited
XXX& convert ( XXX &  x,
const Rep &  a 
) const
inlineinherited
Rep& assign ( Rep &  a,
const Rep &  b 
) const
inlineinherited
const Rep& access ( const Rep &  a) const
inlineinherited
Rep& mul ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& div ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& mod ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& add ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& sub ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& divmod ( Rep &  q,
Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& divexact ( Rep &  q,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& mulin ( Rep &  r,
const Rep &  a 
) const
inlineinherited
Rep& divin ( Rep &  r,
const Rep &  a 
) const
inlineinherited
Rep& modin ( Rep &  r,
const Rep &  a 
) const
inlineinherited
Rep& addin ( Rep &  r,
const Rep &  a 
) const
inlineinherited
Rep& subin ( Rep &  r,
const Rep &  a 
) const
inlineinherited
Rep& axpy ( Rep &  r,
const Rep &  a,
const Rep &  b,
const Rep &  c 
) const
inlineinherited
Rep& maxpy ( Rep &  r,
const Rep &  a,
const Rep &  b,
const Rep &  c 
) const
inlineinherited
Rep& maxpyin ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& axmy ( Rep &  r,
const Rep &  a,
const Rep &  b,
const Rep &  c 
) const
inlineinherited
Rep& axpyin ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& axmyin ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& neg ( Rep &  r,
const Rep &  a 
) const
inlineinherited
Rep& negin ( Rep &  r) const
inlineinherited
Rep& gcd ( Rep &  g,
Rep &  u,
Rep &  v,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& gcd ( Rep &  g,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& lcm ( Rep &  l,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& lcmin ( Rep &  l,
const Rep &  a 
) const
inlineinherited
Rep& inv ( Rep &  u,
const Rep &  a,
const Rep &  b 
) const
inlineinherited
Rep& invin ( Rep &  u,
const Rep &  b 
) const
inlineinherited
Rep& pow ( Rep &  r,
const Rep &  n,
const long  l 
) const
inlineinherited
Rep& pow ( Rep &  r,
const Rep &  n,
const unsigned long  l 
) const
inlineinherited
Rep& pow ( Rep &  r,
const Rep &  n,
const int  l 
) const
inlineinherited
Rep& pow ( Rep &  r,
const Rep &  n,
const unsigned int  l 
) const
inlineinherited
Rep& sqrt ( Rep &  s,
const Rep &  n 
) const
inlineinherited
Rep& sqrt ( Rep &  s,
Rep &  r,
const Rep &  n 
) const
inlineinherited
long logp ( const Rep &  a,
const Rep &  p 
) const
inlineinherited
Rep& powmod ( Rep &  r,
const Rep &  n,
const long  e,
const Rep &  m 
) const
inlineinherited
Rep& powmod ( Rep &  r,
const Rep &  n,
const Rep &  e,
const Rep &  m 
) const
inlineinherited
unsigned long length ( const Rep &  a) const
inlineinherited
int sign ( const Rep &  a) const
inlineinherited
bool isZero ( const Rep &  a) const
inlineinherited
bool isOne ( const Rep &  a) const
inlineinherited
bool areEqual ( const Rep &  a,
const Rep &  b 
) const
inlineinherited
bool areNEqual ( const Rep &  a,
const Rep &  b 
) const
inlineinherited
bool isgeq ( const Rep &  a,
const Rep &  b 
) const
inlineinherited
bool isgeq ( const long  b,
const Rep &  a 
) const
inlineinherited
bool isgeq ( const Rep &  a,
const long  b 
) const
inlineinherited
bool isleq ( const Rep &  a,
const Rep &  b 
) const
inlineinherited
bool isleq ( const long  b,
const Rep &  a 
) const
inlineinherited
bool isleq ( const Rep &  a,
const long  b 
) const
inlineinherited
bool isgt ( const Rep &  a,
const Rep &  b 
) const
inlineinherited
bool isgt ( const long  b,
const Rep &  a 
) const
inlineinherited
bool isgt ( const Rep &  a,
const long  b 
) const
inlineinherited
bool islt ( const Rep &  a,
const Rep &  b 
) const
inlineinherited
bool islt ( const long  b,
const Rep &  a 
) const
inlineinherited
bool islt ( const Rep &  a,
const long  b 
) const
inlineinherited
Rep& random ( RandIter &  ,
Rep &  r,
long  s = 1 
) const
inlineinherited
Rep& random ( RandIter &  ,
Rep &  r,
const Rep &  b 
) const
inlineinherited
Rep& nonzerorandom ( RandIter &  ,
Rep &  r,
long  s = 1 
) const
inlineinherited
Rep& nonzerorandom ( RandIter &  ,
Rep &  r,
const Rep &  b 
) const
inlineinherited
std::ostream& write ( std::ostream &  o) const
inlineinherited
std::ostream& write ( std::ostream &  o,
const Rep &  n 
) const
inlineinherited

Field Documentation

array _primes
protected
Element _prod
protected
array _ck
protected
size_t _sizek
protected
size_t _log2k
protected
array _qk
protected
array _u
protected
const Integer one
inherited
const Integer mOne
inherited
const Integer zero
inherited

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