All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType > Class Template Reference

Iterator over the elements of the sparse subvector. More...

#include <SparseSubvector.h>

Public Types

typedef std::forward_iterator_tag IteratorCategory
 The iterator category.
 
typedef SubvectorElement
< VectorType, IteratorType > 
ValueType
 Type of the underlying elements.
 
typedef ValueType PointerType
 Pointer return type.
 
typedef ValueType ReferenceType
 Reference return type.
 
typedef ptrdiff_t DifferenceType
 Difference between two iterators.
 
typedef IteratorCategory iterator_category
 The iterator category.
 
typedef ValueType value_type
 Type of the underlying elements.
 
typedef PointerType pointer
 Pointer return type.
 
typedef ReferenceType reference
 Reference return type.
 
typedef DifferenceType difference_type
 Difference between two iterators.
 

Public Member Functions

 SubvectorIterator ()
 Default constructor for the SubvectorIterator class.
 
 SubvectorIterator (IteratorType pos, size_t offset)
 Constructor for the SubvectorIterator class. More...
 
template<typename VectorType2 , typename IteratorType2 >
 SubvectorIterator (const SubvectorIterator< VectorType2, IteratorType2 > &it)
 Conversion constructor from different SubvectorIterator instances. More...
 
SubvectorIteratoroperator++ ()
 Pre-increment operator. More...
 
const SubvectorIterator operator++ (int)
 Post-increment operator. More...
 
ReferenceType operator* () const
 Direct access to the current sparse subvector element. More...
 
PointerType operator-> () const
 Direct access to the current sparse subvector element. More...
 
template<typename VectorType2 , typename IteratorType2 >
bool operator== (const SubvectorIterator< VectorType2, IteratorType2 > &rhs) const
 Equality comparison between two SubvectorIterator objects. More...
 
template<typename VectorType2 , typename IteratorType2 >
bool operator!= (const SubvectorIterator< VectorType2, IteratorType2 > &rhs) const
 Inequality comparison between two SubvectorIterator objects. More...
 
DifferenceType operator- (const SubvectorIterator &rhs) const
 Calculating the number of elements between two subvector iterators. More...
 

Private Attributes

IteratorType pos_
 Iterator to the current sparse element.
 
size_t offset_
 The offset of the subvector within the sparse vector.
 

Detailed Description

template<typename, bool>
template<typename VectorType, typename IteratorType>
class blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >

Iterator over the elements of the sparse subvector.

Constructor & Destructor Documentation

template<typename , bool >
template<typename VectorType, typename IteratorType>
blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::SubvectorIterator ( IteratorType  pos,
size_t  offset 
)
inline

Constructor for the SubvectorIterator class.

Parameters
posIterator to the current sparse element.
offsetThe offset of the subvector within the sparse vector.
template<typename , bool >
template<typename VectorType, typename IteratorType>
template<typename VectorType2 , typename IteratorType2 >
blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::SubvectorIterator ( const SubvectorIterator< VectorType2, IteratorType2 > &  it)
inline

Conversion constructor from different SubvectorIterator instances.

Parameters
itThe subvector iterator to be copied.

Member Function Documentation

template<typename , bool >
template<typename VectorType, typename IteratorType>
template<typename VectorType2 , typename IteratorType2 >
bool blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::operator!= ( const SubvectorIterator< VectorType2, IteratorType2 > &  rhs) const
inline

Inequality comparison between two SubvectorIterator objects.

Parameters
rhsThe right-hand side subvector iterator.
Returns
true if the iterators don't refer to the same element, false if they do.
template<typename , bool >
template<typename VectorType, typename IteratorType>
ReferenceType blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::operator* ( ) const
inline

Direct access to the current sparse subvector element.

Returns
Reference to the sparse subvector element.
template<typename , bool >
template<typename VectorType, typename IteratorType>
SubvectorIterator& blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::operator++ ( )
inline

Pre-increment operator.

Returns
Reference to the incremented iterator.
template<typename , bool >
template<typename VectorType, typename IteratorType>
const SubvectorIterator blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::operator++ ( int  )
inline

Post-increment operator.

Returns
The previous position of the iterator.
template<typename , bool >
template<typename VectorType, typename IteratorType>
DifferenceType blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::operator- ( const SubvectorIterator< VectorType, IteratorType > &  rhs) const
inline

Calculating the number of elements between two subvector iterators.

Parameters
rhsThe right-hand side subvector iterator.
Returns
The number of elements between the two subvector iterators.
template<typename , bool >
template<typename VectorType, typename IteratorType>
PointerType blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::operator-> ( ) const
inline

Direct access to the current sparse subvector element.

Returns
Pointer to the sparse subvector element.
template<typename , bool >
template<typename VectorType, typename IteratorType>
template<typename VectorType2 , typename IteratorType2 >
bool blaze::SparseSubvector< typename, bool >::SubvectorIterator< VectorType, IteratorType >::operator== ( const SubvectorIterator< VectorType2, IteratorType2 > &  rhs) const
inline

Equality comparison between two SubvectorIterator objects.

Parameters
rhsThe right-hand side subvector iterator.
Returns
true if the iterators refer to the same element, false if not.

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