Guide - Migrating from std.experimental.ndslice to mir-algorithm

Zz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 2 09:08:20 PDT 2017


Hi,

Just tried migrating from std.experimental.ndslice to 
mir-algorithm.

Is there a guide on how migrate old code?

I used the following imports before and using then with ndslice.

import std.experimental.ndslice;
import std.algorithm : each, max, sort;
import std.range : iota, repeat;

simplified example of how it was used.
auto a = cr.iota.sliced(r, c);
auto b = a.reshape(c, r).transposed!1;

auto c = a.reversed!1;
auto d = a.reshape(c, r).transposed!1.reversed!1;

auto f = new int[cr].sliced(r, c);
auto h = f.transposed(1);

how can I do the following in mir-algorithm.

Note: I will be going through the documentation.

Zz





More information about the Digitalmars-d-learn mailing list