|
linbox
|
No doc. More...
#include <cra-domain-sequential.h>
Inheritance diagram for ChineseRemainderSequential< CRABase >:Data Structures | |
| struct | PrimeSampler |
| Helper class to sample unique primes. More... | |
| struct | PrimeSampler< PrimeIterator, true > |
| Helper class to sample unique primes. More... | |
Public Types | |
| typedef CRABase::Domain | Domain |
| typedef CRABase::DomainElement | DomainElement |
Public Member Functions | |
| template<typename... Args> | |
| ChineseRemainderSequential (Args &&... args) | |
| Pass-through constructor to create the underlying builder. | |
| int | iterCount () const |
| How many iterations have been performed so far. | |
| template<class ResultType, class Function, class PrimeIterator> | |
| ResultType & | operator() (ResultType &res, Function &Iteration, PrimeIterator &primeiter) |
| The Chinese Remaindering Algorithm loop. | |
| template<class ResultType, class Function, class PrimeIterator> | |
| bool | operator() (int k, ResultType &res, Function &Iteration, PrimeIterator &primeiter) |
| Run the CRA loop a certain number of times. | |
| template<class Param> | |
| bool | changeFactor (const Param &p) |
| template<class Param> | |
| Param & | getFactor (Param &p) |
| bool | changePreconditioner (const Integer &f, const Integer &m=Integer(1)) |
| Integer & | getModulus (Integer &m) |
| Integer & | getResidue (Integer &m) |
| Integer & | result (Integer &m) |
| template<class Int, template< class, class > class Vect, template< class > class Alloc> | |
| Vect< Int, Alloc< Int > > & | result (Vect< Int, Alloc< Int > > &m) |
Data Fields | |
| const int | MAXSKIP = 1000 |
| const int | MAXNONCOPRIME = 1000 |
Protected Member Functions | |
| void | doskip () |
| Call this when a bad prime is skipped. | |
| template<class PrimeIterator> | |
| auto | get_coprime (PrimeIterator &primeiter) const -> decltype(*primeiter) |
| Gets a prime from the iterator that is coprime to the curent modulus. | |
Protected Attributes | |
| CRABase | Builder_ |
| int | ngood_ = 0 |
| int | nbad_ = 0 |
| int | nskip_ = 0 |
No doc.
| typedef CRABase::Domain Domain |
| typedef CRABase::DomainElement DomainElement |
|
inline |
Pass-through constructor to create the underlying builder.
|
inlineprotected |
Call this when a bad prime is skipped.
|
inlineprotected |
Gets a prime from the iterator that is coprime to the curent modulus.
|
inline |
How many iterations have been performed so far.
(This used to be stored in the public field IterCounter.)
|
inline |
The Chinese Remaindering Algorithm loop.
Given a function to generate residues mod a single prime, this loop produces the residues resulting from the Chinese remainder process on sufficiently many primes to meet the termination condition.
| [out] | res | an integer |
| Iteration | Function object of two arguments, Iteration(r, F), given prime field F it sets r to the residue(s) and returns an IterationResult to indicate how to incorporate the new residue. This loop may be parallelized. Iteration must be reentrant, thread safe. For example, Iteration may be returning the coefficients of the minimal polynomial of a matrix mod F. | |
| primeiter | iterator for generating primes. |
|
inline |
Run the CRA loop a certain number of times.
This runs the CRA loop up to k times, or until termination if k is negative.
| k | maximum number of iterations, or run until termination if k is negative. | |
| [out] | res | an integer |
| Iteration | Function object of two arguments, Iteration(r, F), given prime field F it sets r to the residue(s) and returns an IterationResult to indicate how to incorporate the new residue. This loop may be parallelized. Iteration must be reentrant, thread safe. For example, Iteration may be returning the coefficients of the minimal polynomial of a matrix mod F. | |
| primeiter | iterator for generating primes. |
|
inline |
|
inline |
|
inline |
|
inline |
| const int MAXSKIP = 1000 |
| const int MAXNONCOPRIME = 1000 |
|
protected |
|
protected |
|
protected |
|
protected |