This transform, when applied to an array of dimension N, returns a reference array of dimension N-1 by fixing the index at dimension dim_. More...
#include <array.hpp>
Public Member Functions | |
| LITE_INLINE | plane (int index=0) |
| Creates a plane that fixes the index at dimension dim_ to index. | |
| LITE_INLINE | plane (const plane &other) |
| LITE_INLINE plane & | operator= (const plane &other) |
Public Attributes | |
| int | index |
| The index at dimension dim_. | |
This transform, when applied to an array of dimension N, returns a reference array of dimension N-1 by fixing the index at dimension dim_.
Note that dimensions are numbered starting from 0.
array<float[3][4][5]> a; // a 3x4x5 array a[plane<1>(2)] = -1; // left hand side is a 3x5 reference array // the above line is equivalent to: for (int i=0; i<a.size().i0; i++) for (int k=0; k<a.size().i2; k++) a(i, 2, k) = -1;
1.6.0