linbox
Public Types | Public Member Functions | Data Fields
MatrixRank< _Ring, _Field, _RandomPrime > Class Template Reference

Compute the rank of an integer matrix in place over a finite field by Gaussian elimination. More...

#include <matrix-rank.h>

Public Types

typedef _Ring Ring
 Ring ?
 
typedef _Field Field
 Field ?
 

Public Member Functions

 MatrixRank (const Ring &_r=Ring(), const _RandomPrime &_rp=_RandomPrime())
 Constructor. More...
 
template<class IMatrix >
long rank (const IMatrix &A) const
 compute the integer matrix A by modulo a random prime, Monto-Carlo. More...
 
template<class IRing >
long rank (const BlasMatrix< IRing > &A) const
 Specialisation for BlasMatrix. More...
 
template<class Row >
long rank (const SparseMatrix< Ring, Row > &A) const
 Specialisation for SparseMatrix Computation done by mapping to a random modular matrix. More...
 
long rankIn (BlasMatrix< Field > &Ap) const
 Specialisation for BlasMatrix (in place). More...
 
template<class Field , class Row >
long rankIn (SparseMatrix< Field, Row > &A) const
 Specialisation for SparseMatrix, in place. More...
 

Data Fields

Ring r
 Ring ?
 
_RandomPrime rp
 Holds the random prime for Monte-Carlo rank.
 

Detailed Description

template<class _Ring, class _Field, class _RandomPrime = RandomPrimeIterator>
class LinBox::MatrixRank< _Ring, _Field, _RandomPrime >

Compute the rank of an integer matrix in place over a finite field by Gaussian elimination.

Bug:
there is no generic rankIn method.

Constructor & Destructor Documentation

MatrixRank ( const Ring _r = Ring(),
const _RandomPrime &  _rp = _RandomPrime() 
)
inline

Constructor.

Parameters
_rring (default is Ring)
_rprandom prime generator (default is template provided)

Member Function Documentation

long rank ( const IMatrix &  A) const
inline

compute the integer matrix A by modulo a random prime, Monto-Carlo.

This is the generic method (mapping to a random modular matrix).

Parameters
AAny matrix
Returns
the rank of A.
long rank ( const BlasMatrix< IRing > &  A) const
inline

Specialisation for BlasMatrix.

Computation done by mapping to a random modular matrix.

Parameters
AAny dense matrix
Returns
the rank of A.
Bug:
we suppose we can map IRing to Field...

bug the following should work :

long rank ( const SparseMatrix< Ring, Row > &  A) const
inline

Specialisation for SparseMatrix Computation done by mapping to a random modular matrix.

Parameters
AAny sparse matrix
Returns
the rank of A.
Bug:
we suppose we can map IRing to Field...
long rankIn ( BlasMatrix< Field > &  Ap) const
inline

Specialisation for BlasMatrix (in place).

Generic (slow) elimination code.

Parameters
Aa dense matrix
Returns
its rank
Warning
The matrix is on the Field !!!!!!!
long rankIn ( SparseMatrix< Field, Row > &  A) const
inline

Specialisation for SparseMatrix, in place.

solution rank is called. (is Elimination guaranteed as the doc says above ?)

Parameters
Aa sparse matrix
Returns
its rank

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