linbox
Public Member Functions | Protected Member Functions
CRABuilderSingleBase< Domain_Type > Struct Template Reference

Abstract base class for CRA builders. More...

#include <cra-builder-single.h>

+ Inheritance diagram for CRABuilderSingleBase< Domain_Type >:

Public Member Functions

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.
 

Protected Member Functions

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...
 

Detailed Description

template<class Domain_Type>
struct LinBox::CRABuilderSingleBase< Domain_Type >

Abstract base class for CRA builders.

Subclasses must implement the termination functionality.

Member Function Documentation

◆ 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
DThe modulus of the new image
eThe 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
DThe modulus of the new image
eThe 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
DThe modulus
eThe 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
DThe modulus
eThe 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: