linbox
|
special case for the submatrix of a dense matrix More...
#include <submatrix.h>
Public Types | |
typedef Submatrix< DenseMatrix < _Field > , VectorCategories::DenseVectorTag > | Self_t |
Self type. | |
typedef Field::Element | Element |
Element 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 | |
Submatrix (const DenseMatrix< Field > *Mat, size_t row, size_t col, size_t Rowdim, size_t Coldim) | |
Constructor from an existing DenseMatrix and dimensions. | |
Submatrix (const DenseMatrix< Field > &Mat, size_t row, size_t col, size_t Rowdim, size_t Coldim) | |
Constructor from an existing DenseMatrix and dimensions. | |
Submatrix (const Submatrix< DenseMatrix< Field > > *SM, size_t row, size_t col, size_t Rowdim, size_t Coldim) | |
Constructor from an existing submatrix and dimensions. | |
Submatrix (const Submatrix< DenseMatrix< Field > > &SM, size_t row, size_t col, size_t Rowdim, size_t Coldim) | |
Constructor from an existing submatrix and dimensions. | |
template<class Vect1 , class Vect2 > | |
Vect1 & | apply (Vect1 &y, const Vect2 &x) const |
Generic matrix-vector apply y = A * x . | |
template<class Vect1 , class Vect2 > | |
Vect1 & | applyTranspose (Vect1 &y, const Vect2 &x) const |
Generic matrix-vector transpose apply y = A^T * x This version of applyTranspose allows use of arbitrary input and output vector types. | |
size_t | rowdim () const |
Get the number of rows in the matrix. | |
size_t | coldim () const |
Get the number of columns in the matrix. | |
std::istream & | read (std::istream &file, const Field &field) |
Read the matrix from an input stream. | |
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). | |
Element & | refEntry (size_t i, size_t j) |
Get a writeable reference to an entry in the matrix. | |
const Element & | getEntry (size_t i, size_t j) const |
Get a read-only individual entry from the matrix. | |
Element & | getEntry (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< Element > | transpose (DenseMatrixBase< Element > &tM) |
Creates a transposed matrix of *this . | |
DenseSubmatrix< Element > & | transpose (DenseSubmatrix< Element > &tA) |
Creates a transposed matrix of *this . |
special case for the submatrix of a dense matrix
Submatrix | ( | const DenseMatrix< Field > * | Mat, |
size_t | row, | ||
size_t | col, | ||
size_t | Rowdim, | ||
size_t | Coldim | ||
) | [inline] |
Constructor from an existing DenseMatrix and dimensions.
M | Pointer to DenseMatrix of which to construct submatrix |
row | Starting row |
col | Starting column |
Rowdim | Row dimension |
Coldim | Column dimension |
Submatrix | ( | const DenseMatrix< Field > & | Mat, |
size_t | row, | ||
size_t | col, | ||
size_t | Rowdim, | ||
size_t | Coldim | ||
) | [inline] |
Constructor from an existing DenseMatrix and dimensions.
M | reference to DenseMatrix of which to construct submatrix |
row | Starting row |
col | Starting column |
Rowdim | Row dimension |
Coldim | Column dimension |
Submatrix | ( | const Submatrix< DenseMatrix< Field > > * | SM, |
size_t | row, | ||
size_t | col, | ||
size_t | Rowdim, | ||
size_t | Coldim | ||
) | [inline] |
Constructor from an existing submatrix and dimensions.
SM | pointer to Submatrix from which to construct submatrix |
row | Starting row |
col | Starting column |
Rowdim | Row dimension |
Coldim | Column dimension |
Submatrix | ( | const Submatrix< DenseMatrix< Field > > & | SM, |
size_t | row, | ||
size_t | col, | ||
size_t | Rowdim, | ||
size_t | Coldim | ||
) | [inline] |
Constructor from an existing submatrix and dimensions.
SM | reference to Submatrix from which to construct submatrix |
row | Starting row |
col | Starting column |
Rowdim | Row dimension |
Coldim | Column dimension |
Vect1& apply | ( | Vect1 & | y, |
const Vect2 & | x | ||
) | const [inline] |
Generic matrix-vector apply y = A * x
.
This version of apply allows use of arbitrary input and output vector * types.
y | Output vector |
x | Input vector |
Vect1& applyTranspose | ( | Vect1 & | y, |
const Vect2 & | x | ||
) | const [inline] |
Generic matrix-vector transpose apply y = A^T * x
This version of applyTranspose allows use of arbitrary input and output vector types.
y | Output vector |
x | Input vector |
size_t rowdim | ( | ) | const [inline, inherited] |
Get the number of rows in the matrix.
Reimplemented in BlasBlackbox< _Field >.
size_t coldim | ( | ) | const [inline, inherited] |
Get the number of columns in the matrix.
Reimplemented in BlasBlackbox< _Field >.
std::istream& read | ( | std::istream & | file, |
const Field & | field | ||
) | [inherited] |
Read the matrix from an input stream.
file | Input 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.
os | Output stream to which to write |
field | |
mapleFormat | write 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).
os | Output stream to which to write |
mapleFormat | write in Maple(r) format ? |
void setEntry | ( | size_t | i, |
size_t | j, | ||
const Element & | a_ij | ||
) | [inline, inherited] |
Set the entry at (i, j).
i | Row number, 0...rowdim () - 1 |
j | Column number 0...coldim () - 1 |
a_ij | Element to set |
Element& refEntry | ( | size_t | i, |
size_t | j | ||
) | [inline, inherited] |
Get a writeable reference to an entry in the matrix.
i | Row index of entry |
j | Column index of entry |
const Element& getEntry | ( | size_t | i, |
size_t | j | ||
) | const [inline, inherited] |
Get a read-only individual entry from the matrix.
i | Row index |
j | Column index |
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
x | Element in which to store result |
i | Row index |
j | Column index |
DenseSubmatrix<Element> transpose | ( | DenseMatrixBase< Element > & | tM | ) | [inline, inherited] |
Creates a transposed matrix of *this
.
[in] | tM |
DenseSubmatrix<Element>& transpose | ( | DenseSubmatrix< Element > & | tA | ) | [inline, inherited] |
Creates a transposed matrix of *this
.