Chinese Remaindering Algorithm for multiple residues.
More...
#include <cra-builder-full-multip-fixed.h>
|
| CRABuilderFullMultipFixed (const std::pair< size_t, double > &p) |
| Constructor. More...
|
|
template<class Iterator > |
void | initialize (const Domain &D, Iterator &e) |
| Intialize to the first residue/prime. More...
|
|
template<class Iterator > |
void | progress (const Domain &D, Iterator &e) |
| Add a new residue (ie take into account a new prime). More...
|
|
template<class Iterator > |
void | result (Iterator &d) const |
| Compute the result. More...
|
|
template<typename ModType , class Vect > |
void | initialize (const ModType &D, const Vect &e) |
| init
|
|
const std::vector< Integer > & | result (bool normalized=true) const |
| result
|
|
|
void | collapse () const |
| Collapses all shelves by combining residues. More...
|
|
void | normalize () const |
| Collapses (if necessary) the top shelf and normalizes the result into the symmetric modulus range.
|
|
|
static size_t | getShelf (double logmod) |
| Returns the index where the shelf (with specified natural log of modulus) belongs.
|
|
static const integer & | mod_to_integer (const Integer &D) |
| Returns a reference to D. More...
|
|
template<class Domain > |
static integer | mod_to_integer (const Domain &D) |
| Returns the characteristic of D.
|
|
static void | combineShelves (Shelf &dest, const Shelf &src) |
| Incorporates the residue in src into dest and updates the modulus.
|
|
static void | ensureShelf (size_t index, std::vector< Shelf > &shelves, size_t dim) |
| Expands the shelves as necessary so that the given index exists in the array.
|
|
template<class Domain_Type>
struct LinBox::CRABuilderFullMultipFixed< Domain_Type >
Chinese Remaindering Algorithm for multiple residues.
An upper bound is given on the size of the data to reconstruct.
◆ CRABuilderFullMultipFixed()
Constructor.
- Parameters
-
p | is a pair such that
p.first is the size of a residue (ie. it would be 1 for "FullSingle")
p.second is the theoretical upperbound (log2) on the size of the integers to reconstruct.
|
◆ initialize()
void initialize |
( |
const Domain & |
D, |
|
|
Iterator & |
e |
|
) |
| |
|
inline |
Intialize to the first residue/prime.
- Parameters
-
D | domain |
e | iterator on the first residue |
- Precondition
- any CRA should first call
initialize
before progress
◆ progress()
void progress |
( |
const Domain & |
D, |
|
|
Iterator & |
e |
|
) |
| |
|
inline |
Add a new residue (ie take into account a new prime).
- Parameters
-
D | domain |
e | iterator for the new residue, for instance, a std::vector<T>::iterator . |
◆ result()
void result |
( |
Iterator & |
d | ) |
const |
|
inline |
Compute the result.
moves low occupied shelves up.
- Parameters
-
[out] | d | an iterator for the result. |
◆ mod_to_integer()
static const integer& mod_to_integer |
( |
const Integer & |
D | ) |
|
|
inlinestaticprotectedinherited |
Returns a reference to D.
This is needed to automatically handle whether D is a Domain or an actual integer.
◆ collapse()
Collapses all shelves by combining residues.
After this, there will be a single (top) shelf containing the current full residue.
The documentation for this struct was generated from the following file: