linbox
RationalSolverSN< Ring, NumericSolver > Class Template Reference

#include <rational-solver-sn.h>

Public Types

typedef Ring::Element Int
 
typedef BlasVector< RingIVector
 
typedef ParamFuzzy Field
 
typedef Field::Element Float
 
typedef BlasVector< FieldFVector
 
typedef BlasMatrix< FieldFMatrix
 

Public Member Functions

const Fieldfield () const
 
 RationalSolverSN (const Ring &R=Ring(), const NumericSolver &S=NumericSolver(), bool ea=false)
 
template<class IMatrix, class IVector>
SolverReturnStatus solve (IVector &num, Int &den, const IMatrix &M, const IVector &b)
 IMatrix is matrix of integer type, eg.
 
int zw_shift (NumericSolver &NS_S, size_t n, FVector &r, FVector &x)
 
template<class IMatrix>
int rat_sol (IVector &numx, Int &denx, FVector &xs_int, FVector &xs_frac, IVector &b, IVector &lastb, FVector &r, FVector &lastr, FVector &x, integer &loopBound, IMatrix &IM)
 
void upshift ()
 
void downshift ()
 
void update_xs (FVector &xs_int, FVector &xs_frac, FVector &x)
 
void update_r (FVector &r, FVector &xs_int)
 
template<class IMatrix>
void update_r_exact (IVector &r_exact, FVector &r, FVector &xs_int, IMatrix &IM)
 
IVectorupdate_num (IVector &num, const FVector &d)
 
template<class Vec>
std::ostream & writeVec (Vec &out, const char *tag="", integer bound=0, size_t numEntries=5, std::ostream &os=std::cerr)
 
template<class Vec>
void writeVecFile (Vec &out, const char *file)
 
template<class Matrix>
void dumpData (const Matrix &M, const IVector &b, IVector &numx, integer &denx, integer &denBound)
 

Static Public Member Functions

static int update_r_ll (double *r, int n, const double *M, const double *d, int shift)
 
static size_t nextPower2 (size_t n)
 
static double highAbs (FMatrix M)
 
static double zw_dOOnorm (const double *M, int m, int n)
 
static double zw_dmax (const int N, const double *a, const int inc)
 
static int zw_hbound (integer &b, int m, int n, const double *M)
 

Protected Attributes

Ring _ring
 
VectorDomain< Ring_VDR
 
const Field _field
 
VectorDomain< Field_VDF
 
NumericSolver _numsolver
 

Member Typedef Documentation

◆ Int

template<class Ring, class NumericSolver>
typedef Ring::Element Int

◆ IVector

template<class Ring, class NumericSolver>
typedef BlasVector<Ring> IVector

◆ Field

template<class Ring, class NumericSolver>
typedef ParamFuzzy Field

◆ Float

template<class Ring, class NumericSolver>
typedef Field::Element Float

◆ FVector

template<class Ring, class NumericSolver>
typedef BlasVector<Field> FVector

◆ FMatrix

template<class Ring, class NumericSolver>
typedef BlasMatrix<Field> FMatrix

Constructor & Destructor Documentation

◆ RationalSolverSN()

template<class Ring, class NumericSolver>
RationalSolverSN ( const Ring & R = Ring(),
const NumericSolver & S = NumericSolver(),
bool ea = false )
inline

Member Function Documentation

◆ field()

template<class Ring, class NumericSolver>
const Field & field ( ) const
inline

◆ solve()

template<class Ring, class NumericSolver>
template<class IMatrix, class IVector>
SolverReturnStatus solve ( IVector & num,
Int & den,
const IMatrix & M,
const IVector & b )
inline

IMatrix is matrix of integer type, eg.

BlasMatrix<PID-integer> IVector is linbox Vector of integer, eg. vector<PID-integerElement> M is the matrix, b is rhs. num, den are the output such that M*num = den*b (and den != 0 if successful).

◆ zw_shift()

template<class Ring, class NumericSolver>
int zw_shift ( NumericSolver & NS_S,
size_t n,
FVector & r,
FVector & x )
inline

◆ rat_sol()

template<class Ring, class NumericSolver>
template<class IMatrix>
int rat_sol ( IVector & numx,
Int & denx,
FVector & xs_int,
FVector & xs_frac,
IVector & b,
IVector & lastb,
FVector & r,
FVector & lastr,
FVector & x,
integer & loopBound,
IMatrix & IM )
inline

◆ upshift()

template<class Ring, class NumericSolver>
void upshift ( )
inline

◆ downshift()

template<class Ring, class NumericSolver>
void downshift ( )
inline

◆ update_xs()

template<class Ring, class NumericSolver>
void update_xs ( FVector & xs_int,
FVector & xs_frac,
FVector & x )
inline

◆ update_r()

template<class Ring, class NumericSolver>
void update_r ( FVector & r,
FVector & xs_int )
inline

◆ update_r_exact()

template<class Ring, class NumericSolver>
template<class IMatrix>
void update_r_exact ( IVector & r_exact,
FVector & r,
FVector & xs_int,
IMatrix & IM )
inline

◆ update_num()

template<class Ring, class NumericSolver>
IVector & update_num ( IVector & num,
const FVector & d )
inline

◆ update_r_ll()

template<class Ring, class NumericSolver>
static int update_r_ll ( double * r,
int n,
const double * M,
const double * d,
int shift )
inlinestatic

◆ nextPower2()

template<class Ring, class NumericSolver>
static size_t nextPower2 ( size_t n)
inlinestatic

◆ highAbs()

template<class Ring, class NumericSolver>
static double highAbs ( FMatrix M)
inlinestatic

◆ zw_dOOnorm()

template<class Ring, class NumericSolver>
static double zw_dOOnorm ( const double * M,
int m,
int n )
inlinestatic

◆ zw_dmax()

template<class Ring, class NumericSolver>
static double zw_dmax ( const int N,
const double * a,
const int inc )
inlinestatic

◆ zw_hbound()

template<class Ring, class NumericSolver>
static int zw_hbound ( integer & b,
int m,
int n,
const double * M )
inlinestatic

◆ writeVec()

template<class Ring, class NumericSolver>
template<class Vec>
std::ostream & writeVec ( Vec & out,
const char * tag = "",
integer bound = 0,
size_t numEntries = 5,
std::ostream & os = std::cerr )
inline

◆ writeVecFile()

template<class Ring, class NumericSolver>
template<class Vec>
void writeVecFile ( Vec & out,
const char * file )
inline

◆ dumpData()

template<class Ring, class NumericSolver>
template<class Matrix>
void dumpData ( const Matrix & M,
const IVector & b,
IVector & numx,
integer & denx,
integer & denBound )
inline

Field Documentation

◆ _ring

template<class Ring, class NumericSolver>
Ring _ring
protected

◆ _VDR

template<class Ring, class NumericSolver>
VectorDomain<Ring> _VDR
protected

◆ _field

template<class Ring, class NumericSolver>
const Field _field
protected

◆ _VDF

template<class Ring, class NumericSolver>
VectorDomain<Field> _VDF
protected

◆ _numsolver

template<class Ring, class NumericSolver>
NumericSolver _numsolver
protected

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