[Issue 11306] New: ordering for std.algorithm.cartesianProduct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 20 08:18:35 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11306
Summary: ordering for std.algorithm.cartesianProduct
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: john.loughran.colvin at gmail.com
--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2013-10-20 16:18:34 BST ---
It would be nice to be able to ask for a particular ordering for
cartesianProduct.
e.g. last range iterating faster,
(0,0) (0,1) (0,2) (0,3) (0,4) (1,0) (1,1) (1,2) (1,3) (1,4) (2,0) ...
first range fastest,
(0,0) (1,0) (2,0) (3,0) (4,0) (0,1) (1,1) (2,1) (3,1) (4,1) (0,2) ...
expanding N-dimensional surface containing all covered so far
(0,0) (1,0) (1,1) (0,1) (2,0) (2,1) (2,2) (1,2) (0,2) (3,0) (3,1) ...
by n_0 x n_1 x n_2 x ... x n_N chunk
e.g. for a 2 x 2 chunk on a 4x4 set, using first index fastest for chunk
ordering
(0,0) (1,0) (0,1) (1,1) (2,0) (3,0) (2,1) (3,1) (0,2) (1,2) (0,3) (1,3) (2,2)
(3,2) (2,3) (3,3)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list