On Oct 11, 10:23 pm, "Mark H." <[EMAIL PROTECTED]> wrote: > Some people might want to take slices of matrices -- e.g., the following > (in Matlab notation): > > A( 1:2:end, 1:3:end ) > > which is a matrix containing every second row and every third column > of A.
Speaking of which, what's the right idiom to take a 2-D slice of a 2-D array in Clojure? It's not really a seq because the slice implements the same interface as an array (with random access to elements). Also, a seq of seqs would constrain iteration either to a rowwise or columnwise direction, whereas the user might want to iterate both ways over the same slice (e.g., for the matrix-matrix multiplication C <- A * A, one might iterate rowwise over the left A and columnwise over the right A). mfh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
