osgEarth 2.1.1
|
Public Types | |
typedef Reference< ElementType, Store, N > | super_type |
typedef super_type::simple_reference | simple_reference |
Public Member Functions | |
multi_array_ref (Store &store, unsigned dimension, int base=0) | |
multi_array_ref (Store &store, int *strides, int *shape, int base) | |
multi_array_ref (const multi_array_ref &rhs) | |
simple_reference | operator[] (int index) |
int | shape (int n) const |
int | indexBase (int n) const |
int | stride (int n) const |
Protected Attributes | |
Store & | _store |
int | _shape [N] |
int | _indexBase [N] |
int | _strides [N] |
Definition at line 138 of file MultiArray.
typedef super_type::simple_reference seamless::multi_array_ref< ElementType, Store, N >::simple_reference |
Reimplemented from seamless::Reference< ElementType, Store, N >.
Definition at line 142 of file MultiArray.
typedef Reference<ElementType, Store, N> seamless::multi_array_ref< ElementType, Store, N >::super_type |
Reimplemented in seamless::vector_ref< ElementType, Store >.
Definition at line 141 of file MultiArray.
seamless::multi_array_ref< ElementType, Store, N >::multi_array_ref | ( | Store & | store, |
unsigned | dimension, | ||
int | base = 0 |
||
) | [inline] |
Definition at line 143 of file MultiArray.
: _store(store), super_type(base) { std::fill_n(&_shape[0], N, dimension); std::fill_n(&_indexBase[0], N, 0); _strides[N - 1] = 1; for (int i = N - 2; i >= 0; --i) { _strides[i] = dimension * _strides[i + 1]; } }
seamless::multi_array_ref< ElementType, Store, N >::multi_array_ref | ( | Store & | store, |
int * | strides, | ||
int * | shape, | ||
int | base | ||
) | [inline] |
Definition at line 155 of file MultiArray.
: _store(store), super_type(base) { std::copy(&shape[0], &shape[N], &_shape[0]); std::fill_n(&_indexBase[0], N, 0); std::copy(&strides[0], &strides[N], &_strides[0]); }
seamless::multi_array_ref< ElementType, Store, N >::multi_array_ref | ( | const multi_array_ref< ElementType, Store, N > & | rhs | ) | [inline] |
Definition at line 164 of file MultiArray.
: super_type(rhs), _store(rhs._store) { std::copy(&rhs._shape[0], &rhs._shape[N], &_shape[0]); std::copy(&rhs._indexBase[0], &rhs._indexBase[N], &_indexBase[0]); std::copy(&rhs._strides[0], &rhs._strides[N], &_strides[0]); }
int seamless::multi_array_ref< ElementType, Store, N >::indexBase | ( | int | n | ) | const [inline] |
Definition at line 178 of file MultiArray.
{ return _indexBase[n]; }
simple_reference seamless::multi_array_ref< ElementType, Store, N >::operator[] | ( | int | index | ) | [inline] |
Definition at line 172 of file MultiArray.
{ return super_type::access(index, _store, _strides); }
int seamless::multi_array_ref< ElementType, Store, N >::shape | ( | int | n | ) | const [inline] |
Definition at line 177 of file MultiArray.
{ return _shape[n]; }
int seamless::multi_array_ref< ElementType, Store, N >::stride | ( | int | n | ) | const [inline] |
Definition at line 179 of file MultiArray.
{ return _strides[n]; }
int seamless::multi_array_ref< ElementType, Store, N >::_indexBase[N] [protected] |
Definition at line 183 of file MultiArray.
int seamless::multi_array_ref< ElementType, Store, N >::_shape[N] [protected] |
Definition at line 182 of file MultiArray.
Store& seamless::multi_array_ref< ElementType, Store, N >::_store [protected] |
Definition at line 181 of file MultiArray.
int seamless::multi_array_ref< ElementType, Store, N >::_strides[N] [protected] |
Definition at line 184 of file MultiArray.