linbox
Data Structures | Public Types | Public Member Functions
BlasMatrix< _Element > Class Template Reference

BlasMatrix. More...

#include <blas-matrix.h>

Inheritance diagram for BlasMatrix< _Element >:

Data Structures

struct  rebind
 Rebind operator. More...

Public Types

typedef _Element Element
 Element type.
typedef BlasMatrix< ElementSelf_t
 Self type.
typedef'd Row Iterators.

The row iterator gives the rows of the matrix in ascending order.

Dereferencing the iterator yields a row vector in dense format

typedef DenseMatrixBase
< Element >::RowIterator 
RowIterator
typedef DenseMatrixBase
< Element >::ConstRowIterator 
ConstRowIterator
typedef DenseMatrixBase
< Element >::Row 
Row
typedef DenseMatrixBase
< Element >::ConstRow 
ConstRow
typedef'd Column Iterators.

The columns iterator gives the columns of the matrix in ascending order.

Dereferencing the iterator yields a column vector in dense format

typedef DenseMatrixBase
< Element >::ColIterator 
ColIterator
typedef DenseMatrixBase
< Element >::ConstColIterator 
ConstColIterator
typedef DenseMatrixBase
< Element >::Col 
Col
typedef DenseMatrixBase
< Element >::Column 
Column
typedef DenseMatrixBase
< Element >::ConstCol 
ConstCol

Public Member Functions

 BlasMatrix ()
 Allocates a new $ 0 \times 0$ matrix.
 BlasMatrix (int m, int n)
 Allocates a new $ m \times n$ matrix.
 BlasMatrix (size_t m, size_t n)
 Allocates a new $ m \times n$ matrix.
template<class Field >
 BlasMatrix (MatrixStream< Field > &ms)
 Constructor from a matrix stream.
template<class Matrix >
 BlasMatrix (const Matrix &A)
 Generic copy constructor from either a blackbox or a matrix container.
template<class Matrix >
 BlasMatrix (const Matrix &A, const size_t i0, const size_t j0, const size_t m, const size_t n)
 Generic copy constructor from either a blackbox or a matrix container (allow submatrix).
template<class _Matrix , class _Field >
 BlasMatrix (const _Matrix &A, const _Field &F)
 Constructor.
 BlasMatrix (DenseMatrixBase< Element > &A)
 Constructor from matrix (no copy).
 BlasMatrix (DenseMatrixBase< Element > &A, const size_t i0, const size_t j0, const size_t m, const size_t n)
 Constructor from matrix (no copy).
 BlasMatrix (const BlasMatrix< Element > &A)
 Copy Constructor of a matrix (copying data).
 BlasMatrix (BlasMatrix< Element > &A)
 Copy Contructor of a matrix (no copy is done, just through pointer)
 BlasMatrix (BlasMatrix< Element > &A, const size_t i, const size_t j, const size_t m, const size_t n)
 Copy Contructor of a submatrix (no copy is done, just through pointer)
 ~BlasMatrix ()
 Destructor.
BlasMatrix< Element > & operator= (const BlasMatrix< Element > &A)
 operator = (copying data)
pointer getPointer () const
  .
pointer & getWritePointer ()
  .
size_t getStride () const
  .
size_t & getWriteStride ()
  .
size_t rowdim () const
 Get the number of rows in the matrix.
size_t coldim () const
 Get the number of columns in the matrix.
template<class Field >
std::istream & read (std::istream &file, const Field &field)
 Read the matrix from an input stream.
template<class Field >
std::ostream & write (std::ostream &os, const Field &field, bool mapleFormat=false) const
 Write the matrix to an output stream.
std::ostream & write (std::ostream &os, bool mapleFormat=false) const
 Write the matrix to an output stream.
void setEntry (size_t i, size_t j, const Element &a_ij)
 Set the entry at (i, j).
ElementrefEntry (size_t i, size_t j)
 Get a writeable reference to an entry in the matrix.
const ElementgetEntry (size_t i, size_t j) const
 Get a read-only individual entry from the matrix.
ElementgetEntry (Element &x, size_t i, size_t j) const
 Get an entry and store it in the given value.
RowIterator rowBegin ()
 iterator to the begining of a row
ConstRowIterator rowBegin () const
 const iterator to the begining of a row
RowIterator rowEnd ()
 iterator to the end of a row
ConstRowIterator rowEnd () const
 const iterator to the end of a row
DenseSubmatrix< Elementtranspose (DenseMatrixBase< Element > &tM)
 Creates a transposed matrix of *this.
DenseSubmatrix< Element > & transpose (DenseSubmatrix< Element > &tA)
 Creates a transposed matrix of *this.

Detailed Description

template<class _Element>
class LinBox::BlasMatrix< _Element >

BlasMatrix.

Limited docs so far.

Examples:

examples/checksolve.C, and examples/echelon.C.


Constructor & Destructor Documentation

BlasMatrix ( int  m,
int  n 
) [inline]

Allocates a new $ m \times n$ matrix.

Parameters:
mrows
ncols
BlasMatrix ( size_t  m,
size_t  n 
) [inline]

Allocates a new $ m \times n$ matrix.

Parameters:
mrows
ncols
BlasMatrix ( MatrixStream< Field > &  ms) [inline]

Constructor from a matrix stream.

Parameters:
msmatrix stream.
BlasMatrix ( const Matrix A) [inline]

Generic copy constructor from either a blackbox or a matrix container.

Parameters:
Amatrix to be copied
BlasMatrix ( const Matrix A,
const size_t  i0,
const size_t  j0,
const size_t  m,
const size_t  n 
) [inline]

Generic copy constructor from either a blackbox or a matrix container (allow submatrix).

Parameters:
Amatrix to be copied
i0
j0
mrows
ncolumns
BlasMatrix ( const _Matrix &  A,
const _Field &  F 
) [inline]

Constructor.

Parameters:
Amatrix to be copied
F?
BlasMatrix ( DenseMatrixBase< Element > &  A) [inline]

Constructor from matrix (no copy).

Parameters:
ADenseMatrixBase
BlasMatrix ( DenseMatrixBase< Element > &  A,
const size_t  i0,
const size_t  j0,
const size_t  m,
const size_t  n 
) [inline]

Constructor from matrix (no copy).

Parameters:
ADenseMatrixBase
i0
j0
mrows
ncolumns
BlasMatrix ( const BlasMatrix< Element > &  A) [inline]

Copy Constructor of a matrix (copying data).

Parameters:
Amatrix to be copied.
BlasMatrix ( BlasMatrix< Element > &  A) [inline]

Copy Contructor of a matrix (no copy is done, just through pointer)

Parameters:
ABlasMatrix to be copied
BlasMatrix ( BlasMatrix< Element > &  A,
const size_t  i,
const size_t  j,
const size_t  m,
const size_t  n 
) [inline]

Copy Contructor of a submatrix (no copy is done, just through pointer)

Parameters:
ABlasMatrix to be copied
i0
j0
mrows
ncolumns

Member Function Documentation

size_t rowdim ( ) const [inline, inherited]

Get the number of rows in the matrix.

Returns:
Number of rows in matrix

Reimplemented in BlasBlackbox< _Field >, BlasBlackbox< Modular< double > >, and BlasBlackbox< Domain >.

size_t coldim ( ) const [inline, inherited]

Get the number of columns in the matrix.

Returns:
Number of columns in matrix

Reimplemented in BlasBlackbox< _Field >, BlasBlackbox< Modular< double > >, and BlasBlackbox< Domain >.

std::istream & read ( std::istream &  file,
const Field &  field 
) [inherited]

Read the matrix from an input stream.

Parameters:
fileInput stream from which to read
field
std::ostream & write ( std::ostream &  os,
const Field &  field,
bool  mapleFormat = false 
) const [inherited]

Write the matrix to an output stream.

Parameters:
osOutput stream to which to write
field
mapleFormatwrite in Maple(r) format ?
std::ostream & write ( std::ostream &  os,
bool  mapleFormat = false 
) const [inherited]

Write the matrix to an output stream.

This a raw version of write(os,F) (no field is given).

Parameters:
osOutput stream to which to write
mapleFormatwrite in Maple(r) format ?
void setEntry ( size_t  i,
size_t  j,
const Element a_ij 
) [inline, inherited]

Set the entry at (i, j).

Parameters:
iRow number, 0...rowdim () - 1
jColumn number 0...coldim () - 1
a_ijElement to set
Element& refEntry ( size_t  i,
size_t  j 
) [inline, inherited]

Get a writeable reference to an entry in the matrix.

Parameters:
iRow index of entry
jColumn index of entry
Returns:
Reference to matrix entry
const Element& getEntry ( size_t  i,
size_t  j 
) const [inline, inherited]

Get a read-only individual entry from the matrix.

Parameters:
iRow index
jColumn index
Returns:
Const reference to matrix entry
Element& getEntry ( Element x,
size_t  i,
size_t  j 
) const [inline, inherited]

Get an entry and store it in the given value.

This form is more in the Linbox style and is provided for interface compatibility with other parts of the library

Parameters:
xElement in which to store result
iRow index
jColumn index
Returns:
Reference to x
DenseSubmatrix<Element> transpose ( DenseMatrixBase< Element > &  tM) [inline, inherited]

Creates a transposed matrix of *this.

Parameters:
[in]tM
Returns:
the transposed matrix of this.
DenseSubmatrix<Element>& transpose ( DenseSubmatrix< Element > &  tA) [inline, inherited]

Creates a transposed matrix of *this.

Returns:
the transposed matrix of this.

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