linbox
Public Member Functions
RationalChineseRemainder< RatCRABase > Struct Template Reference

Chinese remainder of rationals. More...

#include <rational-cra.h>

Public Member Functions

template<class Function , class RandPrimeIterator >
Integer & operator() (Integer &num, Integer &den, Function &Iteration, RandPrimeIterator &genprime)
 The Rational CRA loop. More...
 

Detailed Description

template<class RatCRABase>
struct LinBox::RationalChineseRemainder< RatCRABase >

Chinese remainder of rationals.

Compute the reconstruction of rational numbers Either by Early Termination see [Dumas, Saunder, Villard, JSC 32 (1/2), pp 71-99, 2001], Or via a bound on the size of the integers.

Member Function Documentation

◆ operator()()

Integer& operator() ( Integer &  num,
Integer &  den,
Function &  Iteration,
RandPrimeIterator &  genprime 
)
inline

The Rational CRA 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.

Parameters
IterationFunction object of two arguments, Iteration(r, p), given prime p it outputs residue(s) r. 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 p.
Warning
we won't detect bad primes.
Parameters
genprimeRandIter object for generating primes.
[out]numthe rational numerator
[out]denthe rational denominator

The documentation for this struct was generated from the following file: