Abstract base class for CRA builders.
More...
#include <cra-builder-single.h>
|
void | initialize (const Integer &D, const Integer &e) |
| Initialize the CRA with the first residue. More...
|
|
void | initialize (const Domain &D, const DomainElement &e) |
| Initialize the CRA with the first residue. More...
|
|
Integer & | result (Integer &d) |
| Gets the result recovered so far. More...
|
|
Integer & | getResidue (Integer &r) |
| Gets the result recovered so far.
|
|
Integer & | getModulus (Integer &m) |
| Gets the modulus of the result recovered so far.
|
|
bool | noncoprime (const Integer &i) const |
| Checks whether i is co-prime to the modulus so far. More...
|
|
decltype(Integer().bitsize()) | modbits () const |
| Returns a lower bound on the number of bits in the modulus.
|
|
|
bool | progress_check (const Integer &D, const Integer &e) |
| Update the residue and check whether it changed. More...
|
|
bool | progress_check (const Domain &D, const DomainElement &e) |
| Update the residue and check whether it changed. More...
|
|
template<class Domain_Type>
struct LinBox::CRABuilderSingleBase< Domain_Type >
Abstract base class for CRA builders.
Subclasses must implement the termination functionality.
◆ progress_check() [1/2]
bool progress_check |
( |
const Integer & |
D, |
|
|
const Integer & |
e |
|
) |
| |
|
inlineprotected |
Update the residue and check whether it changed.
The eventually-recovered number will be congruent to e modulo D.
The initialize function should be called at least once before calling this one.
- Parameters
-
D | The modulus of the new image |
e | The residue modulo D |
- Returns
- true iff the residue changed with this update
◆ progress_check() [2/2]
bool progress_check |
( |
const Domain & |
D, |
|
|
const DomainElement & |
e |
|
) |
| |
|
inlineprotected |
Update the residue and check whether it changed.
The eventually-recovered number will be congruent to e modulo D.
The initialize function should be called at least once before calling this one.
- Parameters
-
D | The modulus of the new image |
e | The residue modulo D |
- Returns
- true iff the residue changed with this update
◆ initialize() [1/2]
void initialize |
( |
const Integer & |
D, |
|
|
const Integer & |
e |
|
) |
| |
|
inline |
Initialize the CRA with the first residue.
The eventually-recovered number will be congruent to e modulo D. This function must be called just once. Subsequent calls should be made to the progress() function.
- Parameters
-
D | The modulus |
e | The residue |
◆ initialize() [2/2]
void initialize |
( |
const Domain & |
D, |
|
|
const DomainElement & |
e |
|
) |
| |
|
inline |
Initialize the CRA with the first residue.
The eventually-recovered number will be congruent to e modulo D. This function must be called just once. Subsequent calls should be made to the progress() function.
- Parameters
-
D | The modulus |
e | The residue |
◆ result()
Integer& result |
( |
Integer & |
d | ) |
|
|
inline |
Gets the result recovered so far.
(This is the same as getResidue.)
◆ noncoprime()
bool noncoprime |
( |
const Integer & |
i | ) |
const |
|
inline |
Checks whether i is co-prime to the modulus so far.
- Returns
- true iff i shares a common factor with the modulus
The documentation for this struct was generated from the following file: