On Tuesday, 18 August 2020 at 13:07:56 UTC, Arredondo wrote:
On Tuesday, 18 August 2020 at 04:07:56 UTC, 9il wrote:
To reorder the columns data according to precomputed index:
auto index = a.byDim!1.map!sum.slice;
Hello Ilya, thanks for the answer!
Unfortunately I can't use it because I don't
On Tuesday, 18 August 2020 at 13:07:56 UTC, Arredondo wrote:
On Tuesday, 18 August 2020 at 04:07:56 UTC, 9il wrote:
To reorder the columns data according to precomputed index:
auto index = a.byDim!1.map!sum.slice;
Hello Ilya, thanks for the answer!
Unfortunately I can't use it because I don't
On Tuesday, 18 August 2020 at 04:07:56 UTC, 9il wrote:
To reorder the columns data according to precomputed index:
auto index = a.byDim!1.map!sum.slice;
Hello Ilya, thanks for the answer!
Unfortunately I can't use it because I don't have (and can't
define) a sorting index for my columns. I on
The following code just sorts each row:
--
/+dub.sdl:
dependency "mir-algorithm" version="~>3.9.24"
+/
import mir.ndslice;
import mir.ndslice.sorting;
import mir.algorithm.iteration: each;
void main() {
// fuse, not sliced if you use an array of arrays for argument
auto a = [[1,
I want to sort a two-dimensional ndslice by its columns according
to some predefined predicate.
What I mean is _not_ sorting the contents of each column
individually, but instead to reorder the entire columns of the
matrix so that they are sorted according to some "greater than"
function.
H