A slice of Vector<T> that can be modified.
Definition at line 57 of file Vector.hpp.
#include <Vector.hpp>
Public Member Functions | |
| T & | operator() (size_t i) |
| Returns the modifiable i'th element of the slice. More... | |
| T | operator() (size_t i) const |
| Returns the const i'th element of the slice. More... | |
| template<class V > | |
| VectorSlice & | operator= (const ConstVectorBase< T, V > &x) |
| Assign the elements of this slice from another vector. More... | |
| VectorSlice & | operator= (const std::valarray< T > &x) |
| Assign the elements of this slice from a valarray. More... | |
| VectorSlice & | operator= (const T *x) |
| Assign (*this).size() elements from x to (*this). More... | |
| VectorSlice & | operator= (const T x) |
| Assign all the elements of this slice to x. More... | |
| T & | operator[] (size_t i) |
| Returns the modifiable i'th element of the slice. More... | |
| T | operator[] (size_t i) const |
| Returns the const i'th element of the slice. 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 |
| VectorSlice () | |
| Default constructor. More... | |
| VectorSlice (Vector< T > &vv) | |
| Makes a slice of the whole vector. More... | |
| VectorSlice (Vector< T > &vv, const std::slice &ss) | |
| Makes a slice of the vector with the given std::slice. More... | |
Private Attributes | |
| std::slice | s |
| the slice specification. More... | |
| Vector< T > * | v |
| the vector used as a source for the slice More... | |
|
inline |
Default constructor.
Definition at line 386 of file Vector.hpp.
|
inline |
Makes a slice of the whole vector.
Definition at line 391 of file Vector.hpp.
|
inline |
Makes a slice of the vector with the given std::slice.
Definition at line 396 of file Vector.hpp.
|
inline |
Returns the modifiable i'th element of the slice.
Definition at line 424 of file Vector.hpp.
|
inline |
Returns the const i'th element of the slice.
Definition at line 427 of file Vector.hpp.
|
inline |
Assign the elements of this slice from another vector.
Definition at line 402 of file Vector.hpp.
|
inline |
Assign the elements of this slice from a valarray.
Definition at line 406 of file Vector.hpp.
|
inline |
Assign (*this).size() elements from x to (*this).
Definition at line 414 of file Vector.hpp.
|
inline |
Assign all the elements of this slice to x.
Definition at line 410 of file Vector.hpp.
|
inline |
Returns the modifiable i'th element of the slice.
Definition at line 418 of file Vector.hpp.
|
inline |
Returns the const i'th element of the slice.
Definition at line 421 of file Vector.hpp.
|
inline |
returns the number of elements in the slice
Definition at line 431 of file Vector.hpp.
|
inline |
returns the index in the vector of the first element.
Definition at line 433 of file Vector.hpp.
|
inline |
returns the number of elements to skip between (*this)[i] and (*this)[i+1]
Definition at line 436 of file Vector.hpp.
|
private |
the slice specification.
Definition at line 441 of file Vector.hpp.
|
private |
the vector used as a source for the slice
Definition at line 439 of file Vector.hpp.