linbox
Public Member Functions
RNS< Unsigned > Class Template Reference

RNS. More...

#include <rns.h>

Public Member Functions

 RNS (unsigned long l, unsigned long ps=21)
 Create a RNS able to recover any integer of at most l bits.
 
void initCRA ()
 Inits cra.
 
void cra (integer &result, const std::vector< double > &residues)
 Computes result corresponding to the residues.
 
void cra (std::vector< integer > &result, const std::vector< std::vector< double > > &residues)
 Computes result corresponding to the residues.
 
template<typename Iteration >
void cra (Ivect &result, Iteration &iter)
 Computes result corresponding to the iteration.
 

Detailed Description

template<bool Unsigned>
class LinBox::RNS< Unsigned >

RNS.

  Creates a RNS than can recover any number between \c 0 and \c q-1 if
  \c Unsigned=true or \c -q+1 and \c q-1 otherwise (where \c q=2<up>\c
  _bits_</up>).
Todo:
template by field and ring

Constructor & Destructor Documentation

RNS ( unsigned long  l,
unsigned long  ps = 21 
)

Create a RNS able to recover any integer of at most l bits.

      Builds \c ceil(l/ps) different primes for the RNS
Parameters
lmax recoverable bits
psbitsize of the primes (defaulting to 21 because...)
Todo:
if log2(maxint/curint)<ps use smaller genprime.

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