linbox
Public Types | Public Member Functions | Protected Attributes
TriangularBlasMatrix< Matrix > Class Template Reference

Triangular BLAS matrix. More...

#include <blas-matrix.h>

Inherits BlasSubmatrix< _Matrix >.

Public Types

typedef Field::Element Element
 Element type.
 
typedef MatrixEltPointer< _Matrix >::pointer pointer
 pointer type to elements
 
typedef MatrixEltPointer< const_Matrix >::pointer const_pointer
 const pointer type to elements
 

Public Member Functions

 TriangularBlasMatrix (Matrix &A, Tag::Shape x=Tag::Shape::Upper, Tag::Diag y=Tag::Diag::NonUnit)
 Constructor from a Matrix (share data from the matrix)
 
Tag::Shape getUpLo () const
 get the shape of the matrix (upper or lower)
 
Tag::Diag getDiag () const
 Is the diagonal implicitly unit ?
 
template<class _AnyMatrix >
Self_tcopy (const _AnyMatrix &A)
 (copying data) -> works only if dimensions are the same
 
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.
 
const Field & field () const
 Get the field of the BlasSubMatrix.
 
pointer getPointer ()
  
 
std::istream & read (std::istream &file)
 Read the matrix from an input stream.
 
std::ostream & write (std::ostream &os, Tag::FileFormat f=Tag::FileFormat::Plain) 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.
 
template<class Vector1 , class Vector2 >
Vector1 & apply (Vector1 &y, const Vector2 &x) const
 
template<class Vector1 , class Vector2 >
Vector1 & applyTranspose (Vector1 &y, const Vector2 &x) const
 

Protected Attributes

Tag::Shape _uplo
 upper or lower triangular
 
Tag::Diag _diag
 unit or non unit diagonal
 
pointer _ptr
 pointer to the first elt of the submatrix
 
size_t _row
 row dimension of Submatrix
 
size_t _col
 col dimension of Submatrix
 
size_t _stride
 stride of the original matrix
 

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

using ColIterator = BlasMatrixIterator< Field, Storage, subVectorType >
 operator[].
 
using ConstColIterator = BlasMatrixIterator< Field, Storage, constSubVectorType >
 operator[].
 
using IndexedIterator = BlasMatrixIndexedIterator< Field, pointer, Element >
 operator[].
 
using ConstIndexedIterator = BlasMatrixIndexedIterator< Field, const_pointer, const Element >
 operator[].
 
ColIterator colBegin ()
 operator[].
 
ConstColIterator colBegin () const
 operator[].
 
ColIterator colEnd ()
 operator[].
 
ConstColIterator colEnd () const
 operator[].
 
Iterator Begin ()
 operator[].
 
ConstIterator Begin () const
 operator[].
 
Iterator End ()
 operator[].
 
ConstIterator End () const
 operator[].
 
IndexedIterator IndexedBegin ()
 operator[].
 
ConstIndexedIterator IndexedBegin () const
 operator[].
 
IndexedIterator IndexedEnd ()
 operator[].
 
ConstIndexedIterator IndexedEnd () const
 operator[].
 
subVectorType operator[] (size_t i)
 operator[].
 
constSubVectorType operator[] (size_t i) const
 operator[].
 

Detailed Description

template<class Matrix>
class LinBox::TriangularBlasMatrix< Matrix >

Triangular BLAS matrix.

Member Typedef Documentation

◆ ColIterator

template<class _Matrix >
using ColIterator = BlasMatrixIterator<Field, Storage, subVectorType>
inherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ ConstColIterator

template<class _Matrix >
using ConstColIterator = BlasMatrixIterator<Field, Storage, constSubVectorType>
inherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ IndexedIterator

template<class _Matrix >
using IndexedIterator = BlasMatrixIndexedIterator<Field, pointer, Element>
inherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ ConstIndexedIterator

template<class _Matrix >
using ConstIndexedIterator = BlasMatrixIndexedIterator<Field, const_pointer, const Element>
inherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

Constructor & Destructor Documentation

◆ TriangularBlasMatrix()

template<class Matrix >
TriangularBlasMatrix ( Matrix A,
Tag::Shape  x = Tag::Shape::Upper,
Tag::Diag  y = Tag::Diag::NonUnit 
)
inline

Constructor from a Matrix (share data from the matrix)

Parameters
Amatrix
y(non)unit diagonal
x(upp/low)er matrix

Member Function Documentation

◆ rowdim()

template<class _Matrix >
size_t rowdim ( ) const
inlineinherited

Get the number of rows in the matrix.

Returns
Number of rows in matrix

◆ coldim()

template<class _Matrix >
size_t coldim ( ) const
inlineinherited

Get the number of columns in the matrix.

Returns
Number of columns in matrix

◆ getStride()

template<class _Matrix >
size_t getStride ( ) const
inlineinherited

Get the stride of the matrix.

Returns
stride of submatrix (number of cols of dense base matrix)

◆ field()

template<class _Matrix >
const Field & field ( ) const
inlineinherited

Get the field of the BlasSubMatrix.

Returns
Const reference to Field

◆ read()

template<class _Matrix >
std::istream & read ( std::istream &  file)
inherited

Read the matrix from an input stream.

Parameters
fileInput stream from which to read
Bug:
reading a submatrix should not be allowed !!

◆ write()

template<class _Matrix >
std::ostream & write ( std::ostream &  os,
Tag::FileFormat  f = Tag::FileFormat::Plain 
) const
inherited

Write the matrix to an output stream.

Parameters
osOutput stream to which to write
fwrite in some format (Tag::FileFormat::Format). Default is MM's.

◆ setEntry()

template<class _Matrix >
void setEntry ( size_t  i,
size_t  j,
const Element &  a_ij 
)
inherited

Set the entry at (i, j).

Parameters
iRow number, 0...rowdim () - 1
jColumn number 0...coldim () - 1
a_ijElement to set

◆ refEntry()

template<class _Matrix >
BlasSubmatrix< _Matrix >::Element & refEntry ( size_t  i,
size_t  j 
)
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

◆ getEntry() [1/2]

template<class _Matrix >
const BlasSubmatrix< _Matrix >::Element & getEntry ( size_t  i,
size_t  j 
) const
inherited

Get a read-only individual entry from the matrix.

Parameters
iRow index
jColumn index
Returns
Const reference to matrix entry

◆ getEntry() [2/2]

template<class _Matrix >
BlasSubmatrix< _Matrix >::Element & getEntry ( Element &  x,
size_t  i,
size_t  j 
) const
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

◆ apply()

template<class _Matrix >
template<class Vector1 , class Vector2 >
Vector1 & apply ( Vector1 &  y,
const Vector2 &  x 
) const
inlineinherited
Bug:
every vector we use here should have a stride/be blas vectors so it's not really templated by Vector1 Vector2 in general

◆ applyTranspose()

template<class _Matrix >
template<class Vector1 , class Vector2 >
Vector1 & applyTranspose ( Vector1 &  y,
const Vector2 &  x 
) const
inlineinherited
Bug:

use Matrix domain

since removal of ApplyDomain this does not handle the case where Field if Givaro::Extension needed for charpoly computation

◆ colBegin() [1/2]

template<class _Matrix >
ColIterator colBegin ( )
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ colBegin() [2/2]

template<class _Matrix >
ConstColIterator colBegin ( ) const
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ colEnd() [1/2]

template<class _Matrix >
ColIterator colEnd ( )
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ colEnd() [2/2]

template<class _Matrix >
ConstColIterator colEnd ( ) const
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ Begin() [1/2]

template<class _Matrix >
Iterator Begin ( )
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ Begin() [2/2]

template<class _Matrix >
ConstIterator Begin ( ) const
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ End() [1/2]

template<class _Matrix >
Iterator End ( )
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ End() [2/2]

template<class _Matrix >
ConstIterator End ( ) const
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ IndexedBegin() [1/2]

template<class _Matrix >
IndexedIterator IndexedBegin ( )
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ IndexedBegin() [2/2]

template<class _Matrix >
ConstIndexedIterator IndexedBegin ( ) const
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ IndexedEnd() [1/2]

template<class _Matrix >
IndexedIterator IndexedEnd ( )
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ IndexedEnd() [2/2]

template<class _Matrix >
ConstIndexedIterator IndexedEnd ( ) const
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ operator[]() [1/2]

template<class _Matrix >
subVectorType operator[] ( size_t  i)
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

◆ operator[]() [2/2]

template<class _Matrix >
constSubVectorType operator[] ( size_t  i) const
inlineinherited

operator[].

Retrieve a reference to a row

Parameters
iRow index

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