A Vector<T> slice that doesn't allow modification.
Definition at line 448 of file Vector.hpp.
#include <Vector.hpp>
Public Member Functions | |
ConstVectorSlice () | |
default constructor More... | |
ConstVectorSlice (const Vector< T > &vv) | |
Makes a slice of the whole vector. More... | |
ConstVectorSlice (const Vector< T > &vv, const std::slice &ss) | |
Uses the given slice and vector. More... | |
T | operator() (size_t i) const |
Returns a const version of the i'th slice element. More... | |
T | operator[] (size_t i) const |
Returns a const version of the i'th slice element. More... | |
size_t | size () const |
returns the number of elements in the slice More... | |
size_t | start () const |
returns the index in the vector of the first element. More... | |
size_t | stride () const |
![]() | |
ConstVectorSliceBase () | |
![]() | |
size_t | size () const |
the number of elements in the slice. More... | |
size_t | start () const |
the start index in the BaseClass vector for this slice. More... | |
size_t | stride () const |
VectorSliceBase () | |
constructor More... | |
![]() | |
ConstVectorBase () | |
Constructor. More... | |
T | operator() (size_t i) const |
returns the element at index i More... | |
T | operator[] (size_t i) const |
returns the element at index i More... | |
size_t | size () const |
Returns the size of the base class. More... | |
Private Attributes | |
std::slice | s |
the slice specification. More... | |
const Vector< T > * | v |
Vectortor used as a source for this slice. More... | |
Additional Inherited Members | |
![]() | |
void | vecSliceCheck (size_t sourceSize) const |
![]() | |
T | constVectorRef (size_t i) const |
|
inline |
default constructor
Definition at line 452 of file Vector.hpp.
|
inline |
Makes a slice of the whole vector.
Definition at line 457 of file Vector.hpp.
|
inline |
Uses the given slice and vector.
Definition at line 462 of file Vector.hpp.
|
inline |
Returns a const version of the i'th slice element.
Definition at line 470 of file Vector.hpp.
|
inline |
Returns a const version of the i'th slice element.
Definition at line 467 of file Vector.hpp.
|
inline |
returns the number of elements in the slice
Definition at line 474 of file Vector.hpp.
|
inline |
returns the index in the vector of the first element.
Definition at line 476 of file Vector.hpp.
|
inline |
returns the number of elements to skip between (*this)[i] and (*this)[i+1]
Definition at line 479 of file Vector.hpp.
|
private |
the slice specification.
Definition at line 485 of file Vector.hpp.
|
private |
Vectortor used as a source for this slice.
Definition at line 483 of file Vector.hpp.