Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

RationalRemainder Struct Template Reference

#include <rational-cra.h>

List of all members.


Detailed Description

template<class Domain>
struct LinBox::RationalRemainder< Domain >

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.


Public Member Functions

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


Member Function Documentation

Integer& operator() Integer &  num,
Integer &  den,
Function &  Iteration,
RandPrime &  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.

F - Function object of two arguments, F(r, p), given prime p it outputs residue(s) r. This loop may be parallelized. F must be reentrant, thread safe. For example, F may be returning the coefficients of the minimal polynomial of a matrix mod p. Warning - we won't detect bad primes.

genprime - RandIter object for generating primes.

Returns:
num - the rational numerator

den - the rational denominator


The documentation for this struct was generated from the following file:
Generated on Thu Feb 8 22:32:57 2007 for linbox by doxygen 1.3.4