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

DenseSubmatrix Class Template Reference
[linbox/matrix]

#include <dense-submatrix.h>

Inheritance diagram for DenseSubmatrix:

BlasMatrix List of all members.

Detailed Description

template<class _Element>
class LinBox::DenseSubmatrix< _Element >

Submatrix of a dense matrix

This matrix type conforms to the same interface as @ref{DenseMatrixBase}, except that you cannot resize it. It represents a submatrix of a dense matrix. Upon construction, one can freely manipulate the entries in the DenseSubmatrix, and the corresponding entries in the underlying DenseMatrixBase will be modified.


Public Types

typedef _Element Element
typedef DenseSubmatrix< _Element > Self_t
typedef DenseMatrixBase< Element
>::RowIterator 
RowIterator
typedef DenseMatrixBase< Element
>::ConstRowIterator 
ConstRowIterator
typedef DenseMatrixBase< Element
>::Row 
Row
typedef DenseMatrixBase< Element
>::ConstRow 
ConstRow
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
typedef const RawIndexedIterator ConstRawIndexedIterator

Public Methods

 DenseSubmatrix ()
 DenseSubmatrix (DenseMatrixBase< Element > &M, size_t row, size_t col, size_t rowdim, size_t coldim)
 DenseSubmatrix (const DenseSubmatrix< Element > &SM, size_t row, size_t col, size_t rowdim, size_t coldim)
 DenseSubmatrix (const DenseSubmatrix< Element > &SM)
DenseSubmatrix & operator= (const DenseSubmatrix< Element > &SM)
size_t rowdim () const
size_t coldim () const
template<class Field> std::istream & read (std::istream &file, const Field &field)
template<class Field> std::ostream & write (std::ostream &os, const Field &field, bool mapleFormat=false) const
void setEntry (size_t i, size_t j, const Element &a_ij)
ElementrefEntry (size_t i, size_t j)
const ElementgetEntry (size_t i, size_t j) const
ElementgetEntry (Element &x, size_t i, size_t j)
RowIterator rowBegin ()
RowIterator rowEnd ()
ConstRowIterator rowBegin () const
ConstRowIterator rowEnd () const
ColIterator colBegin ()
ColIterator colEnd ()
ConstColIterator colBegin () const
ConstColIterator colEnd () const
RawIterator rawBegin ()
RawIterator rawEnd ()
ConstRawIterator rawBegin () const
ConstRawIterator rawEnd () const
RawIndexedIterator rawIndexBegin ()
RawIndexedIterator rawIndexEnd ()
ConstRawIndexedIterator rawIndexBegin () const
ConstRawIndexedIterator rawIndexEnd () const

Protected Attributes

DenseMatrixBase< Element > * _M
size_t _beg_row
size_t _end_row
size_t _beg_col
size_t _end_col


Member Typedef Documentation

typedef DenseMatrixBase<Element>::Col Col
 

typedef DenseMatrixBase<Element>::ColIterator ColIterator
 

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>::Column Column
 

typedef DenseMatrixBase<Element>::ConstCol ConstCol
 

typedef DenseMatrixBase<Element>::ConstColIterator ConstColIterator
 

typedef const RawIndexedIterator ConstRawIndexedIterator
 

typedef DenseMatrixBase<Element>::ConstRow ConstRow
 

typedef DenseMatrixBase<Element>::ConstRowIterator ConstRowIterator
 

typedef _Element Element
 

Reimplemented in BlasBlackbox, Submatrix< DenseMatrix< _Field >, VectorCategories::DenseVectorTag >, BlasMatrix, BlasMatrix< Element >, BlasMatrix< Domain::Element >, and BlasMatrix< _Field::Element >.

typedef DenseMatrixBase<Element>::Row Row
 

typedef DenseMatrixBase<Element>::RowIterator RowIterator
 

The row iterator gives the rows of the matrix in ascending order. Dereferencing the iterator yields a row vector in dense format

typedef DenseSubmatrix<_Element> Self_t
 

Reimplemented in BlasBlackbox.


Constructor & Destructor Documentation

DenseSubmatrix   [inline]
 

DenseSubmatrix DenseMatrixBase< Element > &    M,
size_t    row,
size_t    col,
size_t    rowdim,
size_t    coldim
 

Constructor from an existing @ref{DenseMatrixBase} and dimensions

Parameters:
M  Pointer to @ref{DenseMatrixBase} of which to construct submatrix
row  Starting row
col  Starting column
rowdim  Row dimension
coldim  Column dimension

DenseSubmatrix const DenseSubmatrix< Element > &    SM,
size_t    row,
size_t    col,
size_t    rowdim,
size_t    coldim
 

Constructor from an existing submatrix and dimensions

Parameters:
SM  Constant reference to DenseSubmatrix from which to construct submatrix
row  Starting row
col  Starting column
rowdim  Row dimension
coldim  Column dimension

DenseSubmatrix const DenseSubmatrix< Element > &    SM
 

Copy constructor

Parameters:
_M  Submatrix to copy


Member Function Documentation

ConstColIterator colBegin  
 

ColIterator colBegin  
 

size_t coldim   const [inline]
 

Get the number of columns in the matrix

Returns:
Number of columns in matrix

Reimplemented in BlasBlackbox.

ConstColIterator colEnd  
 

ColIterator colEnd  
 

Element& getEntry Element   x,
size_t    i,
size_t    j
[inline]
 

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:
x  Element in which to store result
i  Row index
j  Column index
Returns:
Reference to x

const Element& getEntry size_t    i,
size_t    j
const [inline]
 

Get a read-only individual entry from the matrix

Parameters:
i  Row index
j  Column index
Returns:
Const reference to matrix entry

DenseSubmatrix& operator= const DenseSubmatrix< Element > &    SM
 

Assignment operator Assign the given submatrix to this one

Parameters:
_M  Submatrix to assign
Returns:
Reference to this submatrix

ConstRawIterator rawBegin  
 

RawIterator rawBegin  
 

ConstRawIterator rawEnd  
 

RawIterator rawEnd  
 

ConstRawIndexedIterator rawIndexBegin  
 

RawIndexedIterator rawIndexBegin  
 

ConstRawIndexedIterator rawIndexEnd  
 

RawIndexedIterator rawIndexEnd  
 

std::istream& read std::istream &    file,
const Field   field
 

Read the matrix from an input stream

Parameters:
file  Input stream from which to read
field 

Element& refEntry size_t    i,
size_t    j
[inline]
 

Get a writeable reference to an entry in the matrix

Parameters:
i  Row index of entry
j  Column index of entry
Returns:
Reference to matrix entry

ConstRowIterator rowBegin  
 

RowIterator rowBegin  
 

size_t rowdim   const [inline]
 

Get the number of rows in the matrix

Returns:
Number of rows in matrix

Reimplemented in BlasBlackbox.

ConstRowIterator rowEnd  
 

RowIterator rowEnd  
 

void setEntry size_t    i,
size_t    j,
const Element   a_ij
[inline]
 

Set the entry at (i, j)

Parameters:
i  Row number, 0...rowdim () - 1
j  Column number 0...coldim () - 1
a_ij  Element to set

std::ostream& write std::ostream &    os,
const Field   field,
bool    mapleFormat = false
const
 

Write the matrix to an output stream

Parameters:
os  Output stream to which to write
field 


Member Data Documentation

size_t _beg_col [protected]
 

size_t _beg_row [protected]
 

size_t _end_col [protected]
 

size_t _end_row [protected]
 

DenseMatrixBase<Element>* _M [protected]
 

Retrieve a reference to a row

Parameters:
i  Row index


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