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

DiophantineSolver Class Template Reference

#include <diophantine-solver.h>

List of all members.


Detailed Description

template<class QSolver>
class LinBox::DiophantineSolver< QSolver >

DiophantineSolver<QSolver> creates a diophantine solver using a QSolver to generate rational solutions @doc Methods solve, randomSolve just expose functions from underlying rational solver. Method diophantineSolve creates a solution with minimal denominator, and can also create a certificate of minimality (described in 'Certified Dense Linear System Solving' by Mulders+Storjohann) which will be left in the public field lastCertificate.


Public Methods

 DiophantineSolver (QSolver &rs)
template<class IMatrix, class Vector1, class Vector2> SolverReturnStatus solve (Vector1 &x, Integer &den, const IMatrix &A, const Vector2 &b, const int maxPrimes=DEFAULT_MAXPRIMES, const SolverLevel level=SL_DEFAULT)
template<class IMatrix, class Vector1, class Vector2> SolverReturnStatus randomSolve (Vector1 &x, Integer &den, const IMatrix &A, const Vector2 &b, const int maxPrimes=DEFAULT_MAXPRIMES, const SolverLevel level=SL_DEFAULT)
template<class IMatrix, class Vector1, class Vector2> SolverReturnStatus diophantineSolve (Vector1 &x, Integer &den, const IMatrix &A, const Vector2 &b, const int maxPrimes=DEFAULT_MAXPRIMES, const SolverLevel level=SL_DEFAULT)

Public Attributes

int numSolutionsNeeded
int numFailedCallsToSolver
int numRevelantSolutions
VectorFraction< RinglastCertificate

Protected Types

typedef QSolver::RingType Ring
typedef Ring::Element Integer

Protected Attributes

QSolver & _rationalSolver
Ring _R
Integer _rone


Member Typedef Documentation

typedef Ring::Element Integer [protected]
 

typedef QSolver::RingType Ring [protected]
 


Constructor & Destructor Documentation

DiophantineSolver QSolver &    rs [inline]
 


Member Function Documentation

SolverReturnStatus diophantineSolve Vector1 &    x,
Integer   den,
const IMatrix &    A,
const Vector2 &    b,
const int    maxPrimes = DEFAULT_MAXPRIMES,
const SolverLevel    level = SL_DEFAULT
 

Find a solution of the linear system Ax=b whose denominator (when written as an integer vector over a single denom) is minimal.

Parameters:
A , Matrix  of linear system
x , Vector  in which to store solution
b , Right-hand  side of system
maxPrimes, maximum  number of moduli to try
level , level  of certification to be used
Returns:
status of solution. if (return != SS_FAILED) and (level >= SL_LASVEGAS), solution is guaranteed correct if (return == SS_OK) and (level >= SL_LASVEGAS), solution is guaranteed minimal. SS_FAILED - all primes used were bad SS_OK - solution found. certificate of minimality is in lastCertificate if (level >= SL_CERTIFIED) SS_INCONSISTENT - system appreared inconsistent. certificate of inconsistency is in lastCertificate if (level >= SL_CERTIFIED)
Returns:
status of solution - OK, FAILED, SINGULAR, INCONSISTENT, BAD_PRECONDITIONER

SolverReturnStatus randomSolve Vector1 &    x,
Integer   den,
const IMatrix &    A,
const Vector2 &    b,
const int    maxPrimes = DEFAULT_MAXPRIMES,
const SolverLevel    level = SL_DEFAULT
 

Find a random solution of the general linear system Ax=b over quotient field of a ring.

Parameters:
A , Matrix  of linear system
x , Vector  in which to store solution
b , Right-hand  side of system
maxPrimes, maximum  number of moduli to try
level , level  of certification to be used
Returns:
status of solution. if (return != SS_FAILED), and (level >= SL_LASVEGAS), solution is guaranteed correct. SS_FAILED - all primes used were bad SS_OK - solution found. SS_INCONSISTENT - system appreared inconsistent. certificate is in lastCertificate if (level >= SL_CERTIFIED)

SolverReturnStatus solve Vector1 &    x,
Integer   den,
const IMatrix &    A,
const Vector2 &    b,
const int    maxPrimes = DEFAULT_MAXPRIMES,
const SolverLevel    level = SL_DEFAULT
 

Solve a linear system Ax=b over quotient field of a ring

Parameters:
A , Matrix  of linear system
x , Vector  in which to store solution
b , Right-hand  side of system
maxPrimes, maximum  number of moduli to try
level , level  of certification to be used
Returns:
status of solution. if (return != SS_FAILED), and (level >= SL_LASVEGAS), solution is guaranteed correct. SS_FAILED - all primes used were bad SS_OK - solution found. SS_INCONSISTENT - system appreared inconsistent. certificate is in lastCertificate if (level >= SL_CERTIFIED)


Member Data Documentation

Ring _R [protected]
 

QSolver& _rationalSolver [protected]
 

Integer _rone [protected]
 

VectorFraction<Ring> lastCertificate
 

int numFailedCallsToSolver
 

int numRevelantSolutions
 

int numSolutionsNeeded
 


Generated on Mon Jun 20 09:16:57 2005 for linbox by doxygen1.2.18