LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Iterator to the sparse vector values. More...
#include "sparse_vector.h"
Public Types | |
typedef const_iterator::reference | reference |
typedef const_iterator::const_reference | const_reference |
typedef const_iterator::special | special |
typedef std::forward_iterator_tag | iterator_category |
typedef container_t::value_type | value_type |
typedef container_t::difference_type | difference_type |
typedef container_t::pointer | pointer |
Public Member Functions | |
iterator () | |
Default constructor, does not iterate anywhere. More... | |
iterator (container_t &c, size_type offset=0) | |
Constructor from a container and an offset. More... | |
iterator (const container_t &c, const typename special::begin _) | |
Special constructor: initializes at the beginning of the container. More... | |
iterator (const container_t &c, const typename special::end _) | |
Special constructor: initializes at the end of the container. More... | |
reference | operator[] (size_type offset) const |
Random access. More... | |
reference | operator* () const |
Dereferenciation operator (can't write non-empty elements!) More... | |
difference_type | operator- (const const_iterator &iter) const |
Distance operator. More... | |
range_const_iterator | get_current_range () const |
Returns the current range internal value; use it at your own risk!! More... | |
iterator & | operator++ () |
Increment and decrement operators. More... | |
iterator | operator++ (int _) |
Increment and decrement operators. More... | |
iterator & | operator+= (difference_type delta) |
Increment and decrement operators. More... | |
iterator & | operator-= (difference_type delta) |
Increment and decrement operators. More... | |
iterator | operator+ (difference_type delta) const |
Increment and decrement operators. More... | |
iterator | operator- (difference_type delta) const |
Increment and decrement operators. More... | |
bool | operator== (const const_iterator &as) const |
Iterator comparisons. More... | |
bool | operator!= (const const_iterator &as) const |
Iterator comparisons. More... | |
bool | operator< (const const_iterator &than) const |
Iterator comparisons. More... | |
bool | operator> (const const_iterator &than) const |
Iterator comparisons. More... | |
bool | operator<= (const const_iterator &than) const |
Iterator comparisons. More... | |
bool | operator>= (const const_iterator &than) const |
Iterator comparisons. More... | |
Protected Types | |
typedef container_t::size_type | size_type |
typedef container_t::range_list_t::const_iterator | ranges_const_iterator |
Protected Member Functions | |
iterator (const_iterator from) | |
void | refresh_state () |
Reassigns the internal state according to the index. More... | |
Protected Attributes | |
const container_t * | cont |
pointer to the container More... | |
size_type | index |
pointer to the current value, as absolute index More... | |
ranges_const_iterator | currentRange |
pointer to the current (or next) range More... | |
Private Types | |
typedef const_iterator::container_t | container_t |
Iterator to the sparse vector values.
This iterator respects the traits of an immutable forward iterator, EXCEPT that the iterator can be non-dereferenciable even when it's a "past the end" iterator. That is due to the fact that currently dereferencing (and assigning) to a cell which is not in a range already is not supported yet (it can be done with some complicate mechanism).
Definition at line 1621 of file sparse_vector.h.
typedef const_iterator::const_reference lar::sparse_vector< T >::iterator::const_reference |
Definition at line 1627 of file sparse_vector.h.
|
private |
Definition at line 1622 of file sparse_vector.h.
|
inherited |
Definition at line 1484 of file sparse_vector.h.
|
inherited |
Definition at line 1474 of file sparse_vector.h.
|
inherited |
Definition at line 1485 of file sparse_vector.h.
|
protectedinherited |
Definition at line 1469 of file sparse_vector.h.
typedef const_iterator::reference lar::sparse_vector< T >::iterator::reference |
Definition at line 1626 of file sparse_vector.h.
|
protectedinherited |
Definition at line 1468 of file sparse_vector.h.
typedef const_iterator::special lar::sparse_vector< T >::iterator::special |
Definition at line 1628 of file sparse_vector.h.
|
inherited |
Definition at line 1483 of file sparse_vector.h.
|
inline |
Default constructor, does not iterate anywhere.
Definition at line 1631 of file sparse_vector.h.
|
inline |
Constructor from a container and an offset.
Definition at line 1634 of file sparse_vector.h.
|
inline |
Special constructor: initializes at the beginning of the container.
Definition at line 1637 of file sparse_vector.h.
|
inline |
Special constructor: initializes at the end of the container.
Definition at line 1640 of file sparse_vector.h.
|
inlineprotected |
Definition at line 1683 of file sparse_vector.h.
|
inlineinherited |
Returns the current range internal value; use it at your own risk!!
Definition at line 1568 of file sparse_vector.h.
Referenced by lar::sparse_vector< T >::make_void().
|
inlineinherited |
Iterator comparisons.
Definition at line 1545 of file sparse_vector.h.
References lar::sparse_vector< T >::const_iterator::cont, and lar::sparse_vector< T >::const_iterator::index.
|
inline |
Dereferenciation operator (can't write non-empty elements!)
Definition at line 1675 of file sparse_vector.h.
|
inline |
Increment and decrement operators.
Definition at line 1670 of file sparse_vector.h.
References operator+().
|
inline |
Increment and decrement operators.
Definition at line 1650 of file sparse_vector.h.
|
inline |
Increment and decrement operators.
Definition at line 1655 of file sparse_vector.h.
References shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator++(), and lar::dump::operator+=().
|
inline |
Increment and decrement operators.
Definition at line 1660 of file sparse_vector.h.
|
inlineinherited |
Distance operator.
distance operator
Definition at line 2478 of file sparse_vector.h.
References lar::sparse_vector< T >::const_iterator::cont, and lar::sparse_vector< T >::const_iterator::index.
|
inline |
Increment and decrement operators.
Definition at line 1671 of file sparse_vector.h.
References operator-().
|
inline |
Increment and decrement operators.
Definition at line 1665 of file sparse_vector.h.
References lar::dump::operator+=().
|
inlineinherited |
Iterator comparisons.
Definition at line 1549 of file sparse_vector.h.
References lar::sparse_vector< T >::const_iterator::cont, and lar::sparse_vector< T >::const_iterator::index.
|
inlineinherited |
Iterator comparisons.
Definition at line 1557 of file sparse_vector.h.
References lar::sparse_vector< T >::const_iterator::cont, and lar::sparse_vector< T >::const_iterator::index.
|
inlineinherited |
Iterator comparisons.
Definition at line 1541 of file sparse_vector.h.
|
inlineinherited |
Iterator comparisons.
Definition at line 1553 of file sparse_vector.h.
References lar::sparse_vector< T >::const_iterator::cont, and lar::sparse_vector< T >::const_iterator::index.
|
inlineinherited |
Iterator comparisons.
Definition at line 1561 of file sparse_vector.h.
References lar::sparse_vector< T >::const_iterator::cont, and lar::sparse_vector< T >::const_iterator::index.
|
inline |
Random access.
Definition at line 1643 of file sparse_vector.h.
References shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator++().
|
protectedinherited |
Reassigns the internal state according to the index.
Definition at line 2488 of file sparse_vector.h.
|
protectedinherited |
pointer to the container
Definition at line 1601 of file sparse_vector.h.
Referenced by lar::sparse_vector< T >::make_void(), lar::sparse_vector< T >::const_iterator::operator!=(), lar::sparse_vector< T >::const_iterator::operator++(), lar::sparse_vector< T >::const_iterator::operator-(), lar::sparse_vector< T >::const_iterator::operator<(), lar::sparse_vector< T >::const_iterator::operator<=(), lar::sparse_vector< T >::const_iterator::operator>(), and lar::sparse_vector< T >::const_iterator::operator>=().
|
protectedinherited |
pointer to the current (or next) range
Definition at line 1603 of file sparse_vector.h.
|
protectedinherited |
pointer to the current value, as absolute index
Definition at line 1602 of file sparse_vector.h.
Referenced by lar::sparse_vector< T >::make_void(), lar::sparse_vector< T >::const_iterator::operator!=(), lar::sparse_vector< T >::const_iterator::operator+(), lar::sparse_vector< T >::const_iterator::operator++(), lar::sparse_vector< T >::const_iterator::operator-(), lar::sparse_vector< T >::const_iterator::operator<(), lar::sparse_vector< T >::const_iterator::operator<=(), lar::sparse_vector< T >::const_iterator::operator>(), and lar::sparse_vector< T >::const_iterator::operator>=().