|
linbox
|
Dense Submatrix representation. More...
#include <blas-matrix.h>
Inheritance diagram for BlasSubmatrix< _Field >:Data Structures | |
| class | ConstIndexedIterator |
| Raw Indexed Iterator (const version). More... | |
| class | ConstIterator |
| Raw Iterators (const version). More... | |
| class | IndexedIterator |
| Raw Indexed Iterator. More... | |
| class | Iterator |
| Raw Iterators. More... | |
Public Types | |
| typedef Field::Element | Element |
| Element type. | |
| typedef BlasSubmatrix< _Field > | Self_t |
| Self type. | |
| typedef RawVector< Element >::Dense | Rep |
Actually a std::vector<Element> (or alike.) | |
| typedef Rep::pointer | pointer |
| pointer type to elements | |
| typedef const pointer | const_pointer |
| const pointer 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 BlasMatrix< _Field > ::RowIterator | RowIterator |
|
typedef BlasMatrix< _Field > ::ConstRowIterator | ConstRowIterator |
| typedef BlasMatrix< _Field >::Row | Row |
|
typedef BlasMatrix< _Field > ::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 BlasMatrix< _Field > ::ColIterator | ColIterator |
|
typedef BlasMatrix< _Field > ::ConstColIterator | ConstColIterator |
| typedef BlasMatrix< _Field >::Col | Col |
|
typedef BlasMatrix< _Field > ::Column | Column |
|
typedef BlasMatrix< _Field > ::ConstCol | ConstCol |
Public Member Functions | |
| BlasSubmatrix () | |
| NULL constructor. More... | |
| BlasSubmatrix (const BlasMatrix< _Field > &M, size_t rowbeg, size_t colbeg, size_t Rowdim, size_t Coldim) | |
| Constructor from an existing BlasMatrix and dimensions. More... | |
| BlasSubmatrix (const BlasMatrix< _Field > &M) | |
| Constructor from an existing BlasMatrix. More... | |
| BlasSubmatrix (const BlasSubmatrix< _Field > &SM, size_t rowbeg, size_t colbeg, size_t Rowdim, size_t Coldim) | |
| Constructor from an existing submatrix and dimensions. More... | |
| BlasSubmatrix (const BlasSubmatrix< _Field > &SM) | |
| Copy constructor. More... | |
| BlasSubmatrix & | operator= (const BlasSubmatrix< _Field > &SM) |
| Assignment operator. More... | |
| size_t | rowdim () const |
| Get the number of rows in the matrix. More... | |
| size_t | coldim () const |
| Get the number of columns in the matrix. More... | |
| size_t | getStride () const |
| Get the stride of the matrix. More... | |
| std::istream & | read (std::istream &file) |
| Read the matrix from an input stream. More... | |
| std::ostream & | write (std::ostream &os, enum LinBoxTag::Format f=LinBoxTag::FormatMaple) const |
| Write the matrix to an output stream. More... | |
| std::ostream & | write (std::ostream &os, bool mapleFormat) const |
| pointer | getPointer () const |
| . | |
| pointer & | getWritePointer () |
| . | |
| void | setEntry (size_t i, size_t j, const Element &a_ij) |
| Set the entry at (i, j). More... | |
| Element & | refEntry (size_t i, size_t j) |
| Get a writeable reference to an entry in the matrix. More... | |
| const Element & | getEntry (size_t i, size_t j) const |
| Get a read-only individual entry from the matrix. More... | |
| Element & | getEntry (Element &x, size_t i, size_t j) const |
| Get an entry and store it in the given value. More... | |
| RowIterator | rowBegin () |
| iterator to the begining of a row | |
| RowIterator | rowEnd () |
| iterator to the end of a row | |
| ConstRowIterator | rowBegin () const |
| const iterator to the begining of a row | |
| ConstRowIterator | rowEnd () const |
| const iterator to the end of a row | |
| Row | operator[] (size_t i) |
| operator[]. More... | |
| template<class Vector1 , class Vector2 > | |
| Vector1 & | apply (Vector1 &y, const Vector2 &x) const |
Protected Attributes | |
| BlasMatrix< _Field > * | _Mat |
| Parent BlasMatrix (ie raw vector) | |
| size_t | _row |
| row dimension of Submatrix | |
| size_t | _col |
| col dimension of Submatrix | |
| size_t | _r0 |
upper left corner row of Submatrix in _Mat | |
| size_t | _c0 |
upper left corner row of Submatrix in _Mat | |
| size_t | _stride |
number of columns in _Mat (or stride of _Mat) | |
Dense Submatrix representation.
A BlasSubmatrix is a matrix of _Field::Element, with the structure of BLAS matrices. It is basically a read/write view on a vector of _Field::Element. In the Mother model, a BlasSubmatrix is not allocated.
This matrix type conforms to the same interface as BlasMatrix, 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 BlasMatrix will be modified.
| BlasSubmatrix | ( | ) |
NULL constructor.
| BlasSubmatrix | ( | const BlasMatrix< _Field > & | M, |
| size_t | rowbeg, | ||
| size_t | colbeg, | ||
| size_t | Rowdim, | ||
| size_t | Coldim | ||
| ) |
Constructor from an existing BlasMatrix and dimensions.
| M | Pointer to BlasMatrix of which to construct submatrix |
| rowbeg | Starting row |
| colbeg | Starting column |
| Rowdim | Row dimension |
| Coldim | Column dimension |
| BlasSubmatrix | ( | const BlasMatrix< _Field > & | M | ) |
Constructor from an existing BlasMatrix.
| M | Pointer to BlasMatrix of which to construct submatrix |
| BlasSubmatrix | ( | const BlasSubmatrix< _Field > & | SM, |
| size_t | rowbeg, | ||
| size_t | colbeg, | ||
| size_t | Rowdim, | ||
| size_t | Coldim | ||
| ) |
Constructor from an existing submatrix and dimensions.
| SM | Constant reference to BlasSubmatrix from which to construct submatrix |
| rowbeg | Starting row |
| colbeg | Starting column |
| Rowdim | Row dimension |
| Coldim | Column dimension |
| BlasSubmatrix | ( | const BlasSubmatrix< _Field > & | SM | ) |
Copy constructor.
| SM | Submatrix to copy |
| BlasSubmatrix< _Field > & operator= | ( | const BlasSubmatrix< _Field > & | SM | ) |
Assignment operator.
Assign the given submatrix to this one This is only renaming ! There is no copy because BlasSubmatrix owns nothing.
| SM | Submatrix to assign |
| size_t rowdim | ( | ) | const |
Get the number of rows in the matrix.
| size_t coldim | ( | ) | const |
Get the number of columns in the matrix.
| size_t getStride | ( | ) | const |
Get the stride of the matrix.
| std::istream & read | ( | std::istream & | file | ) |
Read the matrix from an input stream.
| file | Input stream from which to read |
| std::ostream & write | ( | std::ostream & | os, |
| enum LinBoxTag::Format | f = LinBoxTag::FormatMaple |
||
| ) | const |
Write the matrix to an output stream.
| os | Output stream to which to write |
| f | write in some format (LinBoxTag::Format). Default is Maple's. |
|
inline |
| void setEntry | ( | size_t | i, |
| size_t | j, | ||
| const Element & | a_ij | ||
| ) |
Set the entry at (i, j).
| i | Row number, 0...rowdim () - 1 |
| j | Column number 0...coldim () - 1 |
| a_ij | Element to set |
| _Field::Element & refEntry | ( | size_t | i, |
| size_t | j | ||
| ) |
Get a writeable reference to an entry in the matrix.
| i | Row index of entry |
| j | Column index of entry |
| const _Field::Element & getEntry | ( | size_t | i, |
| size_t | j | ||
| ) | const |
Get a read-only individual entry from the matrix.
| i | Row index |
| j | Column index |
| _Field::Element & getEntry | ( | Element & | x, |
| size_t | i, | ||
| size_t | j | ||
| ) | const |
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 |
| BlasSubmatrix< _Field >::Row operator[] | ( | size_t | i | ) |
operator[].
Retrieve a reference to a row
| i | Row index |
|
inline |
1.8.6