linbox
Public Member Functions
SubmatrixAdapter< _Matrix > Class Template Reference

Generic submatrix view adapter used internally in the OpenCLMatrixDomain. More...

#include <opencl-domain.h>

Public Member Functions

 SubmatrixAdapter ()
 NULL constructor.
 
 SubmatrixAdapter (const _Matrix &M)
 Constructor from an existing @refMatrix.
 
 SubmatrixAdapter (const _Matrix &M, size_t row, size_t col, size_t Rowdim, size_t Coldim)
 Constructor from an existing Matrix and dimensions.
 
 SubmatrixAdapter (const _Matrix &M, int row, int col, int Rowdim, int Coldim)
 BB constructor to reduce warnings in clang.
 
 SubmatrixAdapter (const SubmatrixAdapter< _Matrix > &SM)
 Constructor from an existing SubmatrixAdapter.
 
 SubmatrixAdapter (const SubmatrixAdapter< _Matrix > &SM, size_t row, size_t col, size_t Rowdim, size_t Coldim)
 Constructor from an existing submatrix and dimensions.
 
 SubmatrixAdapter (const SubmatrixAdapter< _Matrix > &SM, int row, int col, int Rowdim, int Coldim)
 BB constructor to reduce warnings in clang.
 
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 Element & 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)
 Get an entry and store it in the given value.
 
_Matrix & getMatrix ()
 Access the parent matrix.
 

Detailed Description

template<class _Matrix>
class LinBox::SubmatrixAdapter< _Matrix >

Generic submatrix view adapter used internally in the OpenCLMatrixDomain.

Constructor & Destructor Documentation

◆ SubmatrixAdapter() [1/5]

template<class _Matrix >
SubmatrixAdapter ( )
inline

NULL constructor.


◆ SubmatrixAdapter() [2/5]

template<class _Matrix >
SubmatrixAdapter ( const _Matrix &  M)
inline

Constructor from an existing @refMatrix.

Parameters
MPointer to Matrix of which to construct submatrix

◆ SubmatrixAdapter() [3/5]

template<class _Matrix >
SubmatrixAdapter ( const _Matrix &  M,
size_t  row,
size_t  col,
size_t  Rowdim,
size_t  Coldim 
)
inline

Constructor from an existing Matrix and dimensions.

Parameters
MPointer to Matrix of which to construct submatrix
rowStarting row
colStarting column
RowdimRow dimension
ColdimColumn dimension

◆ SubmatrixAdapter() [4/5]

template<class _Matrix >
SubmatrixAdapter ( const SubmatrixAdapter< _Matrix > &  SM)
inline

Constructor from an existing SubmatrixAdapter.

Parameters
SMPointer to SubmatrixAdapter of which to construct submatrix

◆ SubmatrixAdapter() [5/5]

template<class _Matrix >
SubmatrixAdapter ( const SubmatrixAdapter< _Matrix > &  SM,
size_t  row,
size_t  col,
size_t  Rowdim,
size_t  Coldim 
)
inline

Constructor from an existing submatrix and dimensions.

Parameters
SMConstant reference to SubmatrixAdapter from which to construct submatrix
rowbegStarting row
colbegStarting column
RowdimRow dimension
ColdimColumn dimension

Member Function Documentation

◆ rowdim()

template<class _Matrix >
size_t rowdim ( ) const
inline

Get the number of rows in the matrix.

Returns
Number of rows in matrix

◆ coldim()

template<class _Matrix >
size_t coldim ( ) const
inline

Get the number of columns in the matrix.

Returns
Number of columns in matrix

◆ getStride()

template<class _Matrix >
size_t getStride ( ) const
inline

 Get the stride of the matrix.

Returns
stride of submatrix (number of cols of parent matrix)

◆ setEntry()

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

Set the entry at (i, j).

Parameters
iRow index of entry, 0...rowdim() - 1
jColumn index of entry, 0...coldim() - 1
a_ijElement to set

◆ refEntry()

template<class _Matrix >
Element & refEntry ( size_t  i,
size_t  j 
)
inline

Get a writeable reference to an entry in the matrix.

Parameters
iRow index of entry, 0...rowdim() - 1
jColumn index of entry, 0...coldim() - 1
Returns
Reference to matrix entry

◆ getEntry() [1/2]

template<class _Matrix >
const Element & getEntry ( size_t  i,
size_t  j 
) const
inline

Get a read-only individual entry from the matrix.

Parameters
iRow index of entry, 0...rowdim() - 1
jColumn index of entry, 0...coldim() - 1
Returns
Const reference to matrix entry

◆ getEntry() [2/2]

template<class _Matrix >
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
xElement in which to store result
iRow index of entry, 0...rowdim() - 1
jColumn index of entry, 0...coldim() - 1
Returns
Reference to x

◆ getMatrix()

template<class _Matrix >
_Matrix & getMatrix ( )
inline

Access the parent matrix.

Returns
Reference to _Mat

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