November 22, 2015 Re: Wanted: Review manager for std.experimental.range.ndslice | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrea Fontana | On Monday, 16 November 2015 at 09:56:57 UTC, Andrea Fontana wrote: > On Monday, 16 November 2015 at 03:05:03 UTC, Ilya Yaroshenko wrote: >> Hello, >> Review manager for N-dimensional ranges is wanted >> >> Docs (see PR for latest version): http://dtest.thecybershadow.net/artifact/website-7a646fdea76569e009844cdee5c93edab10980ca-cdcb694c40ec47acf88b0aa878e1623e/web/phobos-prerelease/std_experimental_range_ndslice.html >> >> PR: https://github.com/D-Programming-Language/phobos/pull/3397 >> >> DUB: http://code.dlang.org/packages/dip80-ndslice >> >> Best Regards, >> Ilya > > Nice work! > If I have a matrix like > > 1 2 > 3 4 > > iota(4).sliced(2,2); > > Is there a way to transform it to: > > 1 1 1 2 2 2 > 1 1 1 2 2 2 > 1 1 1 2 2 2 > 3 3 3 4 4 4 > 3 3 3 4 4 4 > 3 3 3 4 4 4 > > or > > 0 0 0 0 0 0 > 0 1 0 0 2 0 > 0 0 0 0 0 0 > 0 0 0 0 0 0 > 0 3 0 0 4 0 > 0 0 0 0 0 0 > > ? > > Of course the inverse operation seems quite easier to do using slices. `blocks` slice was added, so operation is very fast and simple now =) See examples : http://dtest.thecybershadow.net/artifact/website-20b34f54aaeb876b545bac1d34b954db15f0a237-e8aacc785f55c4af7d87a092c861d1cb/web/phobos-prerelease/std_experimental_ndslice_selection.html#.blocks |
November 22, 2015 Re: Wanted: Review manager for std.experimental.range.ndslice | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Yaroshenko | On Sunday, 22 November 2015 at 04:39:31 UTC, Ilya Yaroshenko wrote:
> `blocks` slice was added, so operation is very fast and simple now =)
> See examples :
> http://dtest.thecybershadow.net/artifact/website-20b34f54aaeb876b545bac1d34b954db15f0a237-e8aacc785f55c4af7d87a092c861d1cb/web/phobos-prerelease/std_experimental_ndslice_selection.html#.blocks
Interesting. IMHO you should write some "real-life" examples. I think a good idea could be to use your library to implement some tests/operations/algorithms on images using netpbm format that is easy and doesn't require any extra library.
|
Copyright © 1999-2021 by the D Language Foundation