Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
Bi-directional iterator for traversing a sparse array. More...
#include <Stokhos_SparseArray.hpp>
Inherits iterator< std::bidirectional_iterator_tag, std::iterator_traits< index_iterator_type >::value_type, std::iterator_traits< index_iterator_type >::difference_type, std::iterator_traits< index_iterator_type >::pointer, std::iterator_traits< index_iterator_type >::reference >.
Public Types | |
typedef std::iterator < std::bidirectional_iterator_tag, typename std::iterator_traits < index_iterator_type > ::value_type, typename std::iterator_traits < index_iterator_type > ::difference_type, typename std::iterator_traits < index_iterator_type > ::pointer, typename std::iterator_traits < index_iterator_type > ::reference > | base_type |
typedef base_type::iterator_category | iterator_category |
typedef base_type::value_type | value_type |
typedef base_type::difference_type | difference_type |
typedef base_type::reference | reference |
typedef base_type::pointer | pointer |
typedef std::iterator_traits < value_iterator_type > ::reference | value_reference |
Public Member Functions | |
SparseArrayIterator () | |
Default constructor. More... | |
SparseArrayIterator (index_iterator_type index_it, value_iterator_type value_it) | |
Constructor. More... | |
bool | operator== (const SparseArrayIterator &it) const |
== operator More... | |
bool | operator!= (const SparseArrayIterator &it) const |
!= operator More... | |
reference | operator* () const |
pointer | operator-> () const |
-> operator More... | |
SparseArrayIterator & | operator++ () |
Prefix ++. More... | |
SparseArrayIterator | operator++ (int) |
Postfix ++. More... | |
SparseArrayIterator & | operator-- () |
Prefix –. More... | |
SparseArrayIterator | operator-- (int) |
Postfix –. More... | |
bool | operator< (const SparseArrayIterator &b) const |
Return true of *this < b. More... | |
value_reference | value () const |
Return value associated with iterator. More... | |
Protected Attributes | |
index_iterator_type | index_iterator |
Index iterator. More... | |
value_iterator_type | value_iterator |
Value iterator. More... | |
Bi-directional iterator for traversing a sparse array.
The "value" of the iterator is the index, which is what you get from dereferencing the iterator (* or ->). There is also a method called value() that gives you the value of the sparse array pointed at by the iterator.
This could easily be a random access iterator. I just haven't implemented those methods.
Definition at line 56 of file Stokhos_SparseArray.hpp.
typedef std::iterator< std::bidirectional_iterator_tag, typename std::iterator_traits<index_iterator_type>::value_type, typename std::iterator_traits<index_iterator_type>::difference_type, typename std::iterator_traits<index_iterator_type>::pointer, typename std::iterator_traits<index_iterator_type>::reference > Stokhos::SparseArrayIterator< index_iterator, value_iterator >::base_type |
Definition at line 145 of file Stokhos_SparseArray.hpp.
typedef base_type::iterator_category Stokhos::SparseArrayIterator< index_iterator, value_iterator >::iterator_category |
Definition at line 146 of file Stokhos_SparseArray.hpp.
typedef base_type::value_type Stokhos::SparseArrayIterator< index_iterator, value_iterator >::value_type |
Definition at line 147 of file Stokhos_SparseArray.hpp.
typedef base_type::difference_type Stokhos::SparseArrayIterator< index_iterator, value_iterator >::difference_type |
Definition at line 148 of file Stokhos_SparseArray.hpp.
typedef base_type::reference Stokhos::SparseArrayIterator< index_iterator, value_iterator >::reference |
Definition at line 149 of file Stokhos_SparseArray.hpp.
typedef base_type::pointer Stokhos::SparseArrayIterator< index_iterator, value_iterator >::pointer |
Definition at line 150 of file Stokhos_SparseArray.hpp.
typedef std::iterator_traits<value_iterator_type>::reference Stokhos::SparseArrayIterator< index_iterator, value_iterator >::value_reference |
Definition at line 151 of file Stokhos_SparseArray.hpp.
|
inline |
Default constructor.
Definition at line 154 of file Stokhos_SparseArray.hpp.
|
inline |
Constructor.
Definition at line 157 of file Stokhos_SparseArray.hpp.
|
inline |
== operator
Definition at line 162 of file Stokhos_SparseArray.hpp.
|
inline |
!= operator
Definition at line 168 of file Stokhos_SparseArray.hpp.
|
inline |
Definition at line 175 of file Stokhos_SparseArray.hpp.
|
inline |
-> operator
Definition at line 181 of file Stokhos_SparseArray.hpp.
|
inline |
Prefix ++.
Definition at line 186 of file Stokhos_SparseArray.hpp.
|
inline |
Postfix ++.
Definition at line 193 of file Stokhos_SparseArray.hpp.
|
inline |
Prefix –.
Definition at line 200 of file Stokhos_SparseArray.hpp.
|
inline |
Postfix –.
Definition at line 207 of file Stokhos_SparseArray.hpp.
|
inline |
Return true of *this < b.
Definition at line 214 of file Stokhos_SparseArray.hpp.
|
inline |
Return value associated with iterator.
Definition at line 220 of file Stokhos_SparseArray.hpp.
|
protected |
Index iterator.
Definition at line 227 of file Stokhos_SparseArray.hpp.
|
protected |
Value iterator.
Definition at line 230 of file Stokhos_SparseArray.hpp.