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

SparseMatrix Class Template Reference
[linbox/blackbox]

#include <sparse.h>

Inheritance diagram for SparseMatrix:

BlackboxInterface SparseMatrixBase< _Field::Element, _Row > SparseIntegerMatrix List of all members.

Detailed Description

template<class _Field, class _Row = typename LinBox::Vector<_Field>::Sparse>
class LinBox::SparseMatrix< _Field, _Row >

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.


Public Types

typedef _Field Field
typedef Field::Element Element
typedef SparseMatrixBase<
typename Field::Element,
_Row >::Row 
Row
typedef SparseMatrix< _Field,
_Row > 
Self_t
typedef SparseMatrixBase<
typename Field::Element,
_Row >::RawIterator 
RawIterator
typedef SparseMatrixBase<
typename Field::Element,
_Row >::RawIndexedIterator 
RawIndexedIterator

Public Methods

 SparseMatrix (const Field &F, size_t m=0, size_t n=0)
template<class VectStream>  SparseMatrix (const Field &F, VectStream &stream)
 SparseMatrix (const SparseMatrix< Field, Row > &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 Fieldfield () const

Public Attributes

FileFormatTag Format


Member Typedef Documentation

typedef Field::Element Element
 

Reimplemented from SparseMatrixBase< _Field::Element, _Row >.

typedef _Field Field
 

Reimplemented in SparseIntegerMatrix.

typedef SparseMatrixBase<typename Field::Element, _Row>::RawIndexedIterator RawIndexedIterator
 

typedef SparseMatrixBase<typename Field::Element, _Row>::RawIterator RawIterator
 

typedef SparseMatrixBase<typename Field::Element, _Row>::Row Row
 

Reimplemented from SparseMatrixBase< _Field::Element, _Row >.

Reimplemented in SparseIntegerMatrix.

typedef SparseMatrix<_Field, _Row> Self_t
 


Constructor & Destructor Documentation

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

Parameters:
F  Field over which entries exist
m  Row dimension
n  Column dimension

SparseMatrix const Field   F,
VectStream &    stream
[inline]
 

Constructor from a vector stream

Parameters:
F  Field over which entries exist
stream  Stream with which to generate row vectors

SparseMatrix const SparseMatrix< Field, Row > &    B [inline]
 

Copy constructor

~SparseMatrix   [inline]
 

Destructor.


Member Function Documentation

OutVector& apply OutVector &    y,
const InVector &    x
const [inline]
 

Matrix-vector product y = A x.

Returns:
reference to output vector y
Parameters:
x  input vector

OutVector& applyTranspose OutVector &    y,
const InVector &    x
const [inline]
 

Transpose matrix-vector product y = A^T x.

Returns:
reference to output vector y
Parameters:
x  input vector

size_t coldim   const [inline]
 

Retreive column dimensions of Sparsemat matrix.

Returns:
integer number of columns of SparseMatrix0Base matrix.

Reimplemented from SparseMatrixBase< _Field::Element, _Row >.

const Field& field   const [inline]
 

Access to the base field

std::istream& read std::istream &    is,
FileFormatTag    format = FORMAT_DETECT
[inline]
 

Read the matrix from a stream in the given format

Parameters:
is  Input stream from which to read the matrix
format  Format of input matrix
Returns:
Reference to input stream

Reimplemented from SparseMatrixBase< _Field::Element, _Row >.

size_t rowdim   const [inline]
 

Retreive row dimensions of Sparsemat matrix.

Returns:
integer number of rows of SparseMatrix0Base 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

Parameters:
os  Output stream to which to write the matrix
format  Format of output
Returns:
Reference to output stream

Reimplemented from SparseMatrixBase< _Field::Element, _Row >.


Member Data Documentation

FileFormatTag Format
 


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