ViennaCL - The Vienna Computing Library  1.5.2
Public Types | Public Member Functions
const_sparse_matrix_adapted_iterator< SCALARTYPE, SizeType, is_iterator1, is_forward > Class Template Reference

A const iterator for sparse matrices of type std::vector<std::map<SizeType, SCALARTYPE> > More...

#include <adapter.hpp>

Public Types

typedef self_type iterator1
 
typedef self_type iterator2
 
typedef vcl_size_t size_type
 

Public Member Functions

 const_sparse_matrix_adapted_iterator (std::vector< std::map< SizeType, SCALARTYPE > > const &mat, int i, int j)
 
SCALARTYPE operator* (void) const
 
self_typeoperator++ (void)
 
self_type operator++ (int)
 
self_type operator+= (SizeType offset)
 
bool operator== (self_type const &other) const
 
bool operator!= (self_type const &other) const
 
size_type index1 () const
 
size_type index2 () const
 
const_sparse_matrix_adapted_iterator
< SCALARTYPE, SizeType,!is_iterator1,
true > 
begin () const
 
const_sparse_matrix_adapted_iterator
< SCALARTYPE, SizeType,!is_iterator1,
true > 
end () const
 

Detailed Description

template<typename SCALARTYPE, typename SizeType, bool is_iterator1, bool is_forward>
class viennacl::tools::const_sparse_matrix_adapted_iterator< SCALARTYPE, SizeType, is_iterator1, is_forward >

A const iterator for sparse matrices of type std::vector<std::map<SizeType, SCALARTYPE> >

The iterator behaves like ublas iterators. Attention: Iteration along first columns and then rows via .begin() is untested!

Template Parameters
SCALARTYPEeither float or double
is_iterator1if true, this iterator iterates along increasing row indices, otherwise along increasing column indices
incrementif +1, this is a forward iterator, if -1 we have a reverse iterator

Member Typedef Documentation

Constructor & Destructor Documentation

const_sparse_matrix_adapted_iterator ( std::vector< std::map< SizeType, SCALARTYPE > > const &  mat,
int  i,
int  j 
)
inline

Member Function Documentation

const_sparse_matrix_adapted_iterator<SCALARTYPE, SizeType, !is_iterator1, true> begin ( ) const
inline
const_sparse_matrix_adapted_iterator<SCALARTYPE, SizeType, !is_iterator1, true> end ( ) const
inline
size_type index1 ( ) const
inline
size_type index2 ( ) const
inline
bool operator!= ( self_type const &  other) const
inline
SCALARTYPE operator* ( void  ) const
inline
self_type& operator++ ( void  )
inline
self_type operator++ ( int  )
inline
self_type operator+= ( SizeType  offset)
inline
bool operator== ( self_type const &  other) const
inline

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