![]() |
Hex
1.0
Hydrogen-electron collision solver
|
#include <arrays.h>


Public Types | |
| typedef T | DataType |
| typedef T * | iterator |
| typedef T const * | const_iterator |
Public Member Functions | |
| ArrayView () | |
| ArrayView (size_t n, T *ptr) | |
| ArrayView (ArrayView< T > const &a, size_t i=0, size_t n=0) | |
| ArrayView (Array< T > const &a, size_t i=0, size_t n=0) | |
| ArrayView (NumberArray< T > const &a, size_t i=0, size_t n=0) | |
| ArrayView (const_iterator i, const_iterator j) | |
| ArrayView (ArrayView< T > &&r) | |
| virtual | ~ArrayView () |
| ArrayView< T > & | operator= (const ArrayView< T > v) |
| Assignment operator. More... | |
| T & | operator[] (size_t i) |
| Element-wise access (non-const). More... | |
| T const & | operator[] (size_t i) const |
| Element-wise access (const). More... | |
| size_t | size () const |
| Length of the array (number of elements). More... | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| T & | front (int i=0) |
| T const & | front (int i=0) const |
| T & | back (int i=0) |
| T const & | back (int i=0) const |
| void | fill (T x) |
| Fill the array with a value. More... | |
| bool | empty () const |
| Check whether the size is equal to zero. More... | |
| template<class = typename std::enable_if<is_scalar<T>::value>> | |
| double | norm () const |
| Two-norm (defined only for scalar data type). More... | |
| virtual T * | data () |
| Pointer to the data. More... | |
| virtual T const * | data () const |
Protected Attributes | |
| size_t | N_ |
| Number of elements in the array. More... | |
| T * | array_ |
| Pointer to the array. More... | |
This class holds a shallow copy of an array of items of type T. The view is represented by a pointer to the first item and by the total number of elements. It is offers a comfortable means for work with subarrays. Also, it is a base class for derived data types Array and CLArrayView, that add some advanced functionality to the plain pointer-and-size storage.
ArrayView neither allocates nor deallocates any memory.
| typedef T const* ArrayView< T >::const_iterator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in NumberArray< T, Alloc >, NumberArray< Tout >, Array< T, Alloc >, and Array< Tout, PlainAllocator< Tout > >.
|
inlinevirtual |
Reimplemented in NumberArray< T, Alloc >, NumberArray< Tout >, Array< T, Alloc >, and Array< Tout, PlainAllocator< Tout > >.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
1.8.5