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. More...
 
 SubmatrixAdapter (const _Matrix &M)
 Constructor from an existing . More...
 
 SubmatrixAdapter (const _Matrix &M, size_t row, size_t col, size_t Rowdim, size_t Coldim)
 Constructor from an existing Matrix and dimensions. More...
 
 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. More...
 
 SubmatrixAdapter (const SubmatrixAdapter< _Matrix > &SM, size_t row, size_t col, size_t Rowdim, size_t Coldim)
 Constructor from an existing submatrix and dimensions. More...
 
 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. 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...
 
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)
 Get an entry and store it in the given value. More...
 
_Matrix & getMatrix ()
 Access the parent matrix. More...
 

Detailed Description

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

Generic submatrix view adapter used internally in the OpenCLMatrixDomain.

Constructor & Destructor Documentation

SubmatrixAdapter ( )
inline

NULL constructor.

SubmatrixAdapter ( const _Matrix &  M)
inline

Constructor from an existing .

Parameters
MPointer to Matrix of which to construct submatrix
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 ( const SubmatrixAdapter< _Matrix > &  SM)
inline

Constructor from an existing SubmatrixAdapter.

Parameters
SMPointer to SubmatrixAdapter of which to construct submatrix
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

size_t rowdim ( ) const
inline

Get the number of rows in the matrix.

Returns
Number of rows in matrix
size_t coldim ( ) const
inline

Get the number of columns in the matrix.

Returns
Number of columns in matrix
size_t getStride ( ) const
inline

 Get the stride of the matrix.

Returns
stride of submatrix (number of cols of parent matrix)
void 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
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
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
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
_Matrix& getMatrix ( )
inline

Access the parent matrix.

Returns
Reference to _Mat

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