linbox
RationalChineseRemainderVarPrec< RatCRABase, RatRecon > Struct Template Reference

Chinese remainder of vector of rationals. More...

#include <rational-cra-var-prec.h>

Public Types

typedef RatCRABase::Domain Domain
 
typedef RatCRABase::DomainElement DomainElement
 

Public Member Functions

template<class Param>
 RationalChineseRemainderVarPrec (const Param &b, const RatRecon &RR=RatRecon())
 
 RationalChineseRemainderVarPrec (RatCRABase b, const RatRecon &RR=RatRecon())
 
template<class Function, class RandPrimeIterator>
Integeroperator() (Integer &num, Integer &den, Function &Iteration, RandPrimeIterator &genprime)
 The Rational CRA loop.
 
template<class Function, class RandPrimeIterator>
bool operator() (const int k, Integer &num, Integer &den, Function &Iteration, RandPrimeIterator &genprime)
 
template<template< class, class > class Vect, template< class > class Alloc, class Function, class RandPrimeIterator>
Vect< Integer, Alloc< Integer > > & operator() (Vect< Integer, Alloc< Integer > > &num, Integer &den, Function &Iteration, RandPrimeIterator &genprime)
 
template<class Function, class RandPrimeIterator>
BlasVector< Givaro::ZRing< Integer > > & operator() (BlasVector< Givaro::ZRing< Integer > > &num, Integer &den, Function &Iteration, RandPrimeIterator &genprime)
 
template<template< class, class > class Vect, template< class > class Alloc, class Function, class RandPrimeIterator>
bool operator() (const int k, Vect< Integer, Alloc< Integer > > &num, Integer &den, Function &Iteration, RandPrimeIterator &genprime)
 
template<class Function, class RandPrimeIterator>
bool operator() (const int k, BlasVector< Givaro::ZRing< Integer > > &num, Integer &den, Function &Iteration, RandPrimeIterator &genprime)
 

Data Fields

int IterCounter
 

Protected Attributes

RatCRABase Builder_
 
RatRecon RR_
 

Detailed Description

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
struct LinBox::RationalChineseRemainderVarPrec< RatCRABase, RatRecon >

Chinese remainder of vector of rationals.

VarPrec: Variable preconditioner = lift random combination of residues

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 Typedef Documentation

◆ Domain

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
typedef RatCRABase::Domain Domain

◆ DomainElement

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
typedef RatCRABase::DomainElement DomainElement

Constructor & Destructor Documentation

◆ RationalChineseRemainderVarPrec() [1/2]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
template<class Param>
RationalChineseRemainderVarPrec ( const Param & b,
const RatRecon & RR = RatRecon() )
inline

◆ RationalChineseRemainderVarPrec() [2/2]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
RationalChineseRemainderVarPrec ( RatCRABase b,
const RatRecon & RR = RatRecon() )
inline

Member Function Documentation

◆ operator()() [1/6]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
template<class Function, class RandPrimeIterator>
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

◆ operator()() [2/6]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
template<class Function, class RandPrimeIterator>
bool operator() ( const int k,
Integer & num,
Integer & den,
Function & Iteration,
RandPrimeIterator & genprime )
inline

◆ operator()() [3/6]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
template<template< class, class > class Vect, template< class > class Alloc, class Function, class RandPrimeIterator>
Vect< Integer, Alloc< Integer > > & operator() ( Vect< Integer, Alloc< Integer > > & num,
Integer & den,
Function & Iteration,
RandPrimeIterator & genprime )
inline

◆ operator()() [4/6]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
template<class Function, class RandPrimeIterator>
BlasVector< Givaro::ZRing< Integer > > & operator() ( BlasVector< Givaro::ZRing< Integer > > & num,
Integer & den,
Function & Iteration,
RandPrimeIterator & genprime )
inline

◆ operator()() [5/6]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
template<template< class, class > class Vect, template< class > class Alloc, class Function, class RandPrimeIterator>
bool operator() ( const int k,
Vect< Integer, Alloc< Integer > > & num,
Integer & den,
Function & Iteration,
RandPrimeIterator & genprime )
inline

◆ operator()() [6/6]

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
template<class Function, class RandPrimeIterator>
bool operator() ( const int k,
BlasVector< Givaro::ZRing< Integer > > & num,
Integer & den,
Function & Iteration,
RandPrimeIterator & genprime )
inline

Field Documentation

◆ Builder_

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
RatCRABase Builder_
protected

◆ RR_

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
RatRecon RR_
protected

◆ IterCounter

template<class RatCRABase, class RatRecon = RReconstruction<Givaro::ZRing<Integer>, ClassicMaxQRationalReconstruction<Givaro::ZRing<Integer> > >>
int IterCounter

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