Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType > Class Template Reference

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

#include <SparseSubvector.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

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

Private Types

enum  { returnConst = IsConst<VectorType>::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 subvector.
 
size_t offset_
 Offset within the according sparse vector.
 

Detailed Description

template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType, typename IteratorType>
class blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >

Access proxy for a specific element of the sparse subvector.

Member Enumeration Documentation

template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , 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 vector type VectorType 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 vector elements.

Constructor & Destructor Documentation

template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::SubvectorElement ( IteratorType  pos,
size_t  offset 
)
inline

Constructor for the SubvectorElement class.

Parameters
posIterator to the current position within the sparse subvector.
offsetThe offset within the according sparse vector.

Member Function Documentation

template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
IndexType blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::index ( ) const
inline

Access to the current index of the sparse element.

Returns
The current index of the sparse element.
template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::operator*= ( const T &  v)
inline

Multiplication assignment to the accessed sparse subvector element.

Parameters
vThe right-hand side value for the multiplication.
Returns
Reference to the sparse subvector element.
template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::operator+= ( const T &  v)
inline

Addition assignment to the accessed sparse subvector element.

Parameters
vThe right-hand side value for the addition.
Returns
Reference to the sparse subvector element.
template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::operator-= ( const T &  v)
inline

Subtraction assignment to the accessed sparse subvector element.

Parameters
vThe right-hand side value for the subtraction.
Returns
Reference to the sparse subvector element.
template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
const SubvectorElement* blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::operator-> ( ) const
inline

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

Returns
Reference to the sparse subvector element at the current iterator position.
template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::operator/= ( const T &  v)
inline

Division assignment to the accessed sparse subvector element.

Parameters
vThe right-hand side value for the division.
Returns
Reference to the sparse subvector element.
template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::operator= ( const T &  v)
inline

Assignment to the accessed sparse subvector element.

Parameters
vThe new value of the sparse subvector element.
Returns
Reference to the sparse subvector element.
template<typename VT, bool AF = unaligned, bool TF = IsRowVector<VT>::value>
template<typename VectorType , typename IteratorType >
Reference blaze::SparseSubvector< VT, AF, TF >::SubvectorElement< VectorType, IteratorType >::value ( ) const
inline

Access to the current value of the sparse subvector element.

Returns
The current value of the sparse subvector element.

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