Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
RNSsystem< RING, Domain > Class Template Reference

class RNSsystem. More...

#include <givrns.h>

+ Collaboration diagram for RNSsystem< RING, Domain >:

Public Types

typedef RING ring
typedef Domain::Element modulo
typedef Array0< moduloarray
typedef Array0< Domaindomains

Public Member Functions

 RNSsystem ()
 ~RNSsystem ()
 RNSsystem (const Self_t &R)
 RNSsystem (const domains &primes)
void RnsToMixedRadix (array &mixrad, const array &residu)
RING & MixedRadixToRing (RING &res, const array &mixrad) const
void RingToRns (array &rns, const RING &a) const
RING & RnsToRing (RING &a, const array &rns)
size_t size () const
const domainsPrimes () const
const Domain ith (const size_t i) const
const arrayReciprocals () const
 – Returns an array of the reciprocal $ck = \left(\prod_{j=0..k-1}p_j\right)^{-1} \mod pk$ More...
const modulo reciprocal (const size_t i) const
void setPrimes (const domains &primes)

Protected Member Functions

void ComputeCk ()

Protected Attributes

domains _primes
array _ck

Detailed Description

template<class RING, class Domain>
class Givaro::RNSsystem< RING, Domain >

class RNSsystem.

Structure which manages list of domains in order to convert integer to/from RNS number system using a mixed radix form. This class is parameterized by the type of RING and of Domain. The ring should have:

Member Typedef Documentation

typedef RING ring
typedef Array0<modulo> array
typedef Array0<Domain> domains

Constructor & Destructor Documentation

RNSsystem ( )
~RNSsystem ( )
RNSsystem ( const Self_t R)
RNSsystem ( const domains primes)

Member Function Documentation

void RnsToMixedRadix ( array mixrad,
const array residu 
RING & MixedRadixToRing ( RING &  res,
const array mixrad 
) const
void RingToRns ( array rns,
const RING &  a 
) const
RING & RnsToRing ( RING &  a,
const array rns 
size_t size ( ) const
const RNSsystem< RING, Domain >::domains & Primes ( ) const
const Domain ith ( const size_t  i) const
const RNSsystem< RING, Domain >::array & Reciprocals ( ) const

– Returns an array of the reciprocal $ck = \left(\prod_{j=0..k-1}p_j\right)^{-1} \mod pk$

const RNSsystem< RING, Domain >::modulo reciprocal ( const size_t  i) const
void setPrimes ( const domains primes)
void ComputeCk ( )

Field Documentation

domains _primes
array _ck

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