linbox
1
|
vector of sparse rows. More...
#include <sparse.h>
Public Member Functions | |
SparseMatrix (const Field &F, size_t m=0, size_t n=0) | |
template<class VectStream > | |
SparseMatrix (const Field &F, VectStream &stream) | |
SparseMatrix (MatrixStream< Field > &ms) | |
SparseMatrix (const SparseMatrix< Field, Row > &B) | |
template<class VectorType > | |
SparseMatrix (const SparseMatrix< Field, VectorType > &B) | |
~SparseMatrix () | |
template<class OutVector , class InVector > | |
OutVector & | apply (OutVector &y, const InVector &x) const |
template<class OutVector , class InVector > | |
OutVector & | applyTranspose (OutVector &y, const InVector &x) const |
size_t | rowdim () const |
size_t | coldim () const |
std::istream & | read (std::istream &is, FileFormatTag format=FORMAT_DETECT) |
std::ostream & | write (std::ostream &os, FileFormatTag format=FORMAT_PRETTY) const |
const Field & | field () const |
vector of sparse rows.
This is a generic black box for a sparse matrix. It inherits LinBox::SparseMatrixBase, which implements all of the underlying accessors and iterators.
SparseMatrix | ( | const Field & | F, |
size_t | m = 0 , |
||
size_t | n = 0 |
||
) | [inline] |
Constructor. Builds a zero m x n matrix Note: the copy constructor and operator= will work as intended because of STL's container design
F | Field over which entries exist |
m | Row dimension |
n | Column dimension |
SparseMatrix | ( | const Field & | F, |
VectStream & | stream | ||
) | [inline] |
Constructor from a vector stream
F | Field over which entries exist |
stream | Stream with which to generate row vectors |
SparseMatrix | ( | MatrixStream< Field > & | ms | ) | [inline] |
Constructor from a MatrixStream
ms | A matrix stream properly initialized |
SparseMatrix | ( | const SparseMatrix< Field, Row > & | B | ) | [inline] |
Copy constructor
SparseMatrix | ( | const SparseMatrix< Field, VectorType > & | B | ) | [inline] |
Row type Converter constructor
~SparseMatrix | ( | ) | [inline] |
Destructor.
OutVector& apply | ( | OutVector & | y, |
const InVector & | x | ||
) | const [inline] |
Matrix-vector product y = A x.
x | input vector |
OutVector& applyTranspose | ( | OutVector & | y, |
const InVector & | x | ||
) | const [inline] |
Transpose matrix-vector product y = A^T x.
x | input vector |
size_t rowdim | ( | ) | const [inline] |
Retreive row dimensions of Sparsemat matrix.
Reimplemented from SparseMatrixBase< _Field::Element, _Row >.
size_t coldim | ( | ) | const [inline] |
Retreive column dimensions of Sparsemat matrix.
Reimplemented from SparseMatrixBase< _Field::Element, _Row >.
std::istream& read | ( | std::istream & | is, |
FileFormatTag | format = FORMAT_DETECT |
||
) | [inline] |
Read the matrix from a stream in the given format
is | Input stream from which to read the matrix |
format | Format of input matrix |
Reimplemented from SparseMatrixBase< _Field::Element, _Row >.
std::ostream& write | ( | std::ostream & | os, |
FileFormatTag | format = FORMAT_PRETTY |
||
) | const [inline] |
Write the matrix to a stream in the given format
os | Output stream to which to write the matrix |
format | Format of output |
Reimplemented from SparseMatrixBase< _Field::Element, _Row >.
const Field& field | ( | ) | const [inline] |
Access to the base field