Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType > Class Template Reference

Access proxy for a specific element of the sparse submatrix. More...

#include <SparseSubmatrix.h>

Inherits blaze::SparseElement.

Public Types

typedef SET::ValueType ValueType
 The value type of the row element.
 
typedef size_t IndexType
 The index type of the row element.
 
typedef IfTrue< returnConst, CRT, RT >::Type Reference
 Reference return type.
 
typedef CRT ConstReference
 Reference-to-const return type.
 

Public Member Functions

 SubmatrixElement (IteratorType pos, size_t offset)
 Constructor for the SubmatrixElement class. More...
 
template<typename T >
SubmatrixElementoperator= (const T &v)
 Assignment to the accessed sparse submatrix element. More...
 
template<typename T >
SubmatrixElementoperator+= (const T &v)
 Addition assignment to the accessed sparse submatrix element. More...
 
template<typename T >
SubmatrixElementoperator-= (const T &v)
 Subtraction assignment to the accessed sparse submatrix element. More...
 
template<typename T >
SubmatrixElementoperator*= (const T &v)
 Multiplication assignment to the accessed sparse submatrix element. More...
 
template<typename T >
SubmatrixElementoperator/= (const T &v)
 Division assignment to the accessed sparse submatrix element. More...
 
const SubmatrixElementoperator-> () const
 Direct access to the sparse submatrix element at the current iterator position. More...
 
Reference value () const
 Access to the current value of the sparse submatrix element. More...
 
IndexType index () const
 Access to the current index of the sparse element. More...
 

Private Types

enum  { returnConst = IsConst<MatrixType>::value }
 Compilation switch for the return type of the value member function. More...
 
typedef std::iterator_traits< IteratorType >::value_type SET
 Type of the underlying sparse elements.
 
typedef SET::Reference RT
 Reference type of the underlying sparse element.
 
typedef SET::ConstReference CRT
 Reference-to-const type of the underlying sparse element.
 

Private Attributes

IteratorType pos_
 Iterator to the current position within the sparse submatrix.
 
size_t offset_
 Offset within the according row/column of the sparse matrix.
 

Detailed Description

template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType, typename IteratorType>
class blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >

Access proxy for a specific element of the sparse submatrix.

Member Enumeration Documentation

template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
anonymous enum
private

Compilation switch for the return type of the value member function.

The returnConst compile time constant expression represents a compilation switch for the return type of the value member function. In case the given matrix type MatrixType is const qualified, returnConst will be set to 1 and the value member function will return a reference to const. Otherwise returnConst will be set to 0 and the value member function will offer write access to the sparse matrix elements.

Constructor & Destructor Documentation

template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::SubmatrixElement ( IteratorType  pos,
size_t  offset 
)
inline

Constructor for the SubmatrixElement class.

Parameters
posIterator to the current position within the sparse submatrix.
offsetThe offset within the according row/column of the sparse matrix.

Member Function Documentation

template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
IndexType blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::index ( ) const
inline

Access to the current index of the sparse element.

Returns
The current index of the sparse element.
template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
template<typename T >
SubmatrixElement& blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::operator*= ( const T &  v)
inline

Multiplication assignment to the accessed sparse submatrix element.

Parameters
vThe right-hand side value for the multiplication.
Returns
Reference to the sparse submatrix element.
template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
template<typename T >
SubmatrixElement& blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::operator+= ( const T &  v)
inline

Addition assignment to the accessed sparse submatrix element.

Parameters
vThe right-hand side value for the addition.
Returns
Reference to the sparse submatrix element.
template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
template<typename T >
SubmatrixElement& blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::operator-= ( const T &  v)
inline

Subtraction assignment to the accessed sparse submatrix element.

Parameters
vThe right-hand side value for the subtraction.
Returns
Reference to the sparse submatrix element.
template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
const SubmatrixElement* blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::operator-> ( ) const
inline

Direct access to the sparse submatrix element at the current iterator position.

Returns
Reference to the sparse submatrix element at the current iterator position.
template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
template<typename T >
SubmatrixElement& blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::operator/= ( const T &  v)
inline

Division assignment to the accessed sparse submatrix element.

Parameters
vThe right-hand side value for the division.
Returns
Reference to the sparse submatrix element.
template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
template<typename T >
SubmatrixElement& blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::operator= ( const T &  v)
inline

Assignment to the accessed sparse submatrix element.

Parameters
vThe new value of the sparse submatrix element.
Returns
Reference to the sparse submatrix element.
template<typename MT, bool AF = unaligned, bool SO = IsColumnMajorMatrix<MT>::value>
template<typename MatrixType , typename IteratorType >
Reference blaze::SparseSubmatrix< MT, AF, SO >::SubmatrixElement< MatrixType, IteratorType >::value ( ) const
inline

Access to the current value of the sparse submatrix element.

Returns
The current value of the sparse submatrix element.

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