linbox
RationalReconstruction< _LiftingContainer, RatRecon > Class Template Reference

Limited doc so far. More...

#include <rational-reconstruction.h>

Public Types

typedef _LiftingContainer LiftingContainer
 
typedef LiftingContainer::Ring Ring
 
typedef Ring::Element myInteger
 
typedef LiftingContainer::IVector Vector
 
typedef LiftingContainer::Field Field
 
typedef Field::Element Element
 

Public Member Functions

 RationalReconstruction (const LiftingContainer &lcontainer, const Ring &r=Ring(), int THRESHOLD=50)
 Constructor.
 
const LiftingContainergetContainer () const
 Get the LiftingContainer.
 
template<class Vector>
bool getRational (Vector &num, Integer &den, int switcher) const
 Handler to switch between different rational reconstruction strategy.
 
template<class Vector>
bool getRational (Vector &num, Integer &den) const
 no doc.
 
template<class InVect1, class InVect2>
Integerdot (Integer &d, const InVect1 &v1, const InVect2 &v2) const
 No doc.
 
template<class Vector>
bool getRational1 (Vector &num, Integer &den) const
 Reconstruct a vector of rational numbers from p-adic digit vector sequence.
 
template<class Vector>
bool getRational2 (Vector &num, Integer &den) const
 Reconstruct a vector of rational numbers from p-adic digit vector sequence.
 
template<class ConstIterator>
void PolEval (Vector &y, ConstIterator &Pol, size_t deg, Integer &x) const
 NO DOC.
 
template<class Vector1>
bool getRational3 (Vector1 &num, Integer &den) const
 Reconstruct a vector of rational numbers from p-adic digit vector sequence.
 
template<class Vector1>
bool getRationalET (Vector1 &num, Integer &den, const Integer &den_app=1) const
 early terminated analog of getRational3.
 

Data Fields

RatRecon RR
 

Protected Attributes

const LiftingContainer_lcontainer
 
Ring _r
 
int _threshold
 

Detailed Description

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
class LinBox::RationalReconstruction< _LiftingContainer, RatRecon >

Limited doc so far.

Used, for instance, after LiftingContainer.

Member Typedef Documentation

◆ LiftingContainer

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
typedef _LiftingContainer LiftingContainer

◆ Ring

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
typedef LiftingContainer::Ring Ring

◆ myInteger

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
typedef Ring::Element myInteger

◆ Vector

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
typedef LiftingContainer::IVector Vector

◆ Field

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
typedef LiftingContainer::Field Field

◆ Element

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
typedef Field::Element Element

Constructor & Destructor Documentation

◆ RationalReconstruction()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
RationalReconstruction ( const LiftingContainer & lcontainer,
const Ring & r = Ring(),
int THRESHOLD = 50 )
inline

Constructor.

Todo
maybe use different ring than the ring in lcontainer
Parameters
lcontainerNO DOC
rNO DOC
THRESHOLDNO DOC

Member Function Documentation

◆ getContainer()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
const LiftingContainer & getContainer ( ) const
inline

Get the LiftingContainer.

◆ getRational() [1/2]

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class Vector>
bool getRational ( Vector & num,
Integer & den,
int switcher ) const
inline

Handler to switch between different rational reconstruction strategy.

Allow early termination and direct fast method Switch is made by using a threshold as the third argument (default is set to that of constructor THRESHOLD

  • \(0\) -> direct method
  • \(>0\) -> early termination with

◆ getRational() [2/2]

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class Vector>
bool getRational ( Vector & num,
Integer & den ) const
inline

no doc.

◆ dot()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class InVect1, class InVect2>
Integer & dot ( Integer & d,
const InVect1 & v1,
const InVect2 & v2 ) const
inline

No doc.

Todo
WHY a dot product here ?

◆ getRational1()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class Vector>
bool getRational1 ( Vector & num,
Integer & den ) const
inline

Reconstruct a vector of rational numbers from p-adic digit vector sequence.

An early termination technique is used. Answer is a pair (numerator, common denominator) The trick to reconstruct the rational solution (V. Pan) is implemented. Implement the certificate idea, preprint submitted to ISSAC'05

◆ getRational2()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class Vector>
bool getRational2 ( Vector & num,
Integer & den ) const
inline

Reconstruct a vector of rational numbers from p-adic digit vector sequence.

An early termination technique is used. Answer is a vector of pair (num, den)

Note
this may fail: generically, the probability of failure should be 1/p^n where n is the number of elements being constructed since p is usually quite large this should be ok.

◆ PolEval()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class ConstIterator>
void PolEval ( Vector & y,
ConstIterator & Pol,
size_t deg,
Integer & x ) const
inline

NO DOC.

Parameters
y?
Pol?
deg?
x?

◆ getRational3()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class Vector1>
bool getRational3 ( Vector1 & num,
Integer & den ) const
inline

Reconstruct a vector of rational numbers from p-adic digit vector sequence.

compute all digits and reconstruct rationals only once Result is a vector of numerators and one common denominator

◆ getRationalET()

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
template<class Vector1>
bool getRationalET ( Vector1 & num,
Integer & den,
const Integer & den_app = 1 ) const
inline

early terminated analog of getRational3.

Field Documentation

◆ _lcontainer

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
const LiftingContainer& _lcontainer
protected

◆ _r

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
Ring _r
protected

◆ _threshold

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
int _threshold
protected

◆ RR

template<class _LiftingContainer, class RatRecon = RReconstruction<typename _LiftingContainer::Ring, ClassicMaxQRationalReconstruction<typename _LiftingContainer::Ring> >>
RatRecon RR

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