www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Wanted: Review manager for std.experimental.range.ndslice

reply Ilya Yaroshenko <ilyayaroshenko gmail.com> writes:
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
Nov 15 2015
next sibling parent reply Andrea Fontana <nospam example.com> writes:
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.
Nov 16 2015
next sibling parent reply Ilya Yaroshenko <ilyayaroshenko gmail.com> writes:
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.
``` import std.algorithm, std.range, std.stdio; auto m = iota(1, 5).sliced(2, 2); "%(%(%s %)\n%)\n".writefln(m); auto w = createSlice!int(6, 6); w[1..$, 1..$].strided!0(3).strided!1(3)[] = m; "%(%(%s %)\n%)\n".writefln(w); foreach(i; 0..3) foreach(j; 0..3) w[i..$, j..$].strided!0(3).strided!1(3)[] = m; "%(%(%s %)\n%)\n".writefln(w); ``` Prints: 1 2 3 4 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 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 --Ilya
Nov 16 2015
parent reply Andrea Fontana <nospam example.com> writes:
On Monday, 16 November 2015 at 19:17:34 UTC, Ilya Yaroshenko 
wrote:
 w[1..$, 1..$].strided!0(3).strided!1(3)[] = m;
Impressive :)
Nov 17 2015
parent reply Ilya <ilyayaroshenko gmail.com> writes:
On Tuesday, 17 November 2015 at 13:45:38 UTC, Andrea Fontana 
wrote:
 On Monday, 16 November 2015 at 19:17:34 UTC, Ilya Yaroshenko 
 wrote:
 w[1..$, 1..$].strided!0(3).strided!1(3)[] = m;
Impressive :)
Another way: w[1..2, 1..2] = m; --Ilya
Nov 17 2015
parent Ilya Yaroshenko <ilyayaroshenko gmail.com> writes:
On Tuesday, 17 November 2015 at 20:05:26 UTC, Ilya wrote:
 On Tuesday, 17 November 2015 at 13:45:38 UTC, Andrea Fontana 
 wrote:
 On Monday, 16 November 2015 at 19:17:34 UTC, Ilya Yaroshenko 
 wrote:
 w[1..$, 1..$].strided!0(3).strided!1(3)[] = m;
Impressive :)
Another way: w[1..2, 1..2] = m; --Ilya
Oh, the last one is wrong :/
Nov 17 2015
prev sibling parent reply Ilya Yaroshenko <ilyayaroshenko gmail.com> writes:
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 :
Nov 21 2015
parent Andrea Fontana <nospam example.com> writes:
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 :

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.
Nov 22 2015
prev sibling parent reply Jack Stouffer <jack jackstouffer.com> writes:
On Monday, 16 November 2015 at 03:05:03 UTC, Ilya Yaroshenko 
wrote:
 Hello,
 Review manager for N-dimensional ranges is wanted
What does the job entail?
Nov 16 2015
parent reply Ilya <ilyayaroshenko gmail.com> writes:
On Monday, 16 November 2015 at 19:56:01 UTC, Jack Stouffer wrote:
 On Monday, 16 November 2015 at 03:05:03 UTC, Ilya Yaroshenko 
 wrote:
 Hello,
 Review manager for N-dimensional ranges is wanted
What does the job entail?
It is very close draft: http://wiki.dlang.org/Review/Process
Nov 16 2015
parent reply Jack Stouffer <jack jackstouffer.com> writes:
On Monday, 16 November 2015 at 20:12:37 UTC, Ilya wrote:
 It is very close draft:
 http://wiki.dlang.org/Review/Process
I volunteer then, if you'll have me.
Nov 16 2015
parent Ilya Yaroshenko <ilyayaroshenko gmail.com> writes:
On Monday, 16 November 2015 at 21:01:03 UTC, Jack Stouffer wrote:
 On Monday, 16 November 2015 at 20:12:37 UTC, Ilya wrote:
 It is very close draft:
 http://wiki.dlang.org/Review/Process
I volunteer then, if you'll have me.
Great! Thank you :)
Nov 16 2015