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 24 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 113 of file Stokhos_SparseArray.hpp.
typedef base_type::iterator_category Stokhos::SparseArrayIterator< index_iterator, value_iterator >::iterator_category |
Definition at line 114 of file Stokhos_SparseArray.hpp.
typedef base_type::value_type Stokhos::SparseArrayIterator< index_iterator, value_iterator >::value_type |
Definition at line 115 of file Stokhos_SparseArray.hpp.
typedef base_type::difference_type Stokhos::SparseArrayIterator< index_iterator, value_iterator >::difference_type |
Definition at line 116 of file Stokhos_SparseArray.hpp.
typedef base_type::reference Stokhos::SparseArrayIterator< index_iterator, value_iterator >::reference |
Definition at line 117 of file Stokhos_SparseArray.hpp.
typedef base_type::pointer Stokhos::SparseArrayIterator< index_iterator, value_iterator >::pointer |
Definition at line 118 of file Stokhos_SparseArray.hpp.
typedef std::iterator_traits<value_iterator_type>::reference Stokhos::SparseArrayIterator< index_iterator, value_iterator >::value_reference |
Definition at line 119 of file Stokhos_SparseArray.hpp.
|
inline |
Default constructor.
Definition at line 122 of file Stokhos_SparseArray.hpp.
|
inline |
Constructor.
Definition at line 125 of file Stokhos_SparseArray.hpp.
|
inline |
== operator
Definition at line 130 of file Stokhos_SparseArray.hpp.
|
inline |
!= operator
Definition at line 136 of file Stokhos_SparseArray.hpp.
|
inline |
Definition at line 143 of file Stokhos_SparseArray.hpp.
|
inline |
-> operator
Definition at line 149 of file Stokhos_SparseArray.hpp.
|
inline |
Prefix ++.
Definition at line 154 of file Stokhos_SparseArray.hpp.
|
inline |
Postfix ++.
Definition at line 161 of file Stokhos_SparseArray.hpp.
|
inline |
Prefix –.
Definition at line 168 of file Stokhos_SparseArray.hpp.
|
inline |
Postfix –.
Definition at line 175 of file Stokhos_SparseArray.hpp.
|
inline |
Return true of *this < b.
Definition at line 182 of file Stokhos_SparseArray.hpp.
|
inline |
Return value associated with iterator.
Definition at line 188 of file Stokhos_SparseArray.hpp.
|
protected |
Index iterator.
Definition at line 195 of file Stokhos_SparseArray.hpp.
|
protected |
Value iterator.
Definition at line 198 of file Stokhos_SparseArray.hpp.