All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
blaze::SparseSubvector< typename, bool, bool >::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 SelectType
< returnConst, const
ElementType &, ElementType & >
::Type 
ReferenceType
 Return type of the value member function.
 

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...
 
ReferenceType value () const
 Access to the current value of the sparse subvector element. More...
 
size_t 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...
 

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, bool, bool>
template<typename VectorType, typename IteratorType>
class blaze::SparseSubvector< typename, bool, bool >::SubvectorElement< VectorType, IteratorType >

Access proxy for a specific element of the sparse subvector.

Member Enumeration Documentation

template<typename , bool , bool >
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 , bool , bool >
template<typename VectorType , typename IteratorType >
blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
size_t blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
const SubvectorElement* blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
template<typename T >
SubvectorElement& blaze::SparseSubvector< typename, bool, bool >::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 , bool , bool >
template<typename VectorType , typename IteratorType >
ReferenceType blaze::SparseSubvector< typename, bool, bool >::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: