MultidimArray.opApply

Implements by-element iteration with inidces starting from the top dimension.

struct MultidimArray(T, size_t n)
int
opApply
(
int delegate
(
RepeatTuple!(n, size_t)
,
ref T
)
dg
)
if (
n >= 1
)

Examples

auto matrix = multidimArray!int(2, 3, 4);
foreach(z, y, x, ref el; matrices)
	el = z * 100 + y * 10 + x;

Meta