![]() |
APFEL 4.8.0
A PDF evolution library in C++
|
Class that extends vectors to negative indices. More...
#include <extendedvector.h>
Public Member Functions | |
| ExtendedVector (int const &size=0, T const &value=0, int const &imin=0) | |
| The ExtendedVector constructor. | |
| T & | operator[] (int const &index) |
| Returns the value at the possibly negative given index. | |
| const T & | operator[] (int const &index) const |
| Returns the value at the possibly negative given index. | |
| int | min () const |
| Returns the lower bound. | |
| int | max () const |
| Returns the upper bound. | |
| size_t | size () const |
| Returns the size of the vector. | |
| void | resize (int const &size, T const &value=0, int const &imin=0) |
| Resizes the continer. | |
| std::vector< T >::iterator | begin () |
| Non-constant begin iterator. | |
| std::vector< T >::const_iterator | begin () const |
| Constant begin iterator. | |
| std::vector< T >::iterator | end () |
| Non-constant end iterator. | |
| std::vector< T >::const_iterator | end () const |
| Constant end iterator. | |
Private Attributes | |
| int | _imin |
| The lower bound. | |
| std::vector< T > | _vector |
| The container. | |
Class that extends vectors to negative indices.
|
inline |
The ExtendedVector constructor.
| size | the size of the container (default: 0) |
| value | initialisation value (default: 0) |
| imin | the lowest allowed index (default: 0) |
|
inline |
Non-constant begin iterator.
|
inline |
Constant begin iterator.
|
inline |
Non-constant end iterator.
|
inline |
Constant end iterator.
|
inline |
Returns the upper bound.
|
inline |
Returns the lower bound.
|
inline |
Returns the value at the possibly negative given index.
| index | the position index |
|
inline |
Returns the value at the possibly negative given index.
| index | the position index |
|
inline |
Resizes the continer.
| size | the new size |
| value | the value used to fill in the additional (if any) slots |
| imin | the lowest allowed index (default: 0) |
|
inline |
Returns the size of the vector.
|
private |
The lower bound.
|
private |
The container.