Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
mir.ndslice.mutation
Multidimensional mutation algorithms
This is a submodule of mir.ndslice.
Function Name | Description |
---|
License:
Authors:
Ilya Yaroshenko
- 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
...); - Copies n-dimensional minor.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]]);
- void
reverseInPlace
(Iterator)(Slice!Iteratorslice
); - Reverses data in the 1D slice.Examples:
import mir.ndslice; auto s = 5.iota.slice; s.reverseInPlace; assert([4, 3, 2, 1, 0]);
Copyright © 2016-2022 by Ilya Yaroshenko | Page generated by
Ddoc on Tue Jan 11 06:37:11 2022