BEM++
2.0
|
Lightweight encapsulation of a 1D slice of a 4d array. More...
#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/fiber/_4d_array.hpp>
Public Member Functions | |
_1dSliceOf4dArray (_4dArray< T > &array, size_t index1, size_t index2, size_t index3) | |
Construct a slice consisting of the elements array(:,index1,index2,index3) | |
_1dSliceOf4dArray & | self () |
Returns a reference to self. More... | |
const T & | operator() (size_t index0) const |
T & | operator() (size_t index0) |
size_t | extent (size_t dimension) const |
Private Member Functions | |
void | check_dimension (size_t dimension) const |
Private Attributes | |
_4dArray< T > & | m_array |
size_t | m_index1 |
size_t | m_index2 |
size_t | m_index3 |
Lightweight encapsulation of a 1D slice of a 4d array.
|
inline |
Returns a reference to self.
Useful to make a temporary _1dSliceOf4dArray<T> an rvalue and pass it to a function accepting a reference to a non-const _2dSliceOf4dArray<T>.
Once we switch to C++11, this function can be removed because of the new support for rvalue references.