The OpenD Programming Language

copyMinor

Copies n-dimensional minor.

void
copyMinor
(
size_t N
IteratorFrom
SliceKind KindFrom
IteratorTo
SliceKind KindTo
IndexIterator
)
(
Slice!(IteratorFrom, N, KindFrom) from
,
Slice!(IteratorTo, N, KindTo) to
,
Slice!IndexIterator[N] indices...
)

Examples

import mir.ndslice;
//  0  1  2  3
//  4  5  6  7
//  8  9 10 11
auto a = iota!int(3, 4);
auto b = slice!int(2, 2);
copyMinor(a, b, [2, 1].sliced, [0, 3].sliced);
assert(b == [[8, 11], [4, 7]]);

Meta