On Oct 12, 7:08 am, Rich Hickey <[EMAIL PROTECTED]> wrote:
> As this discussion highlights, Clojure doesn't have a proper notion of
> multidimensional arrays or vectors. I saw a presentation on IBM's X10
> [1] and was impressed by their point-indexed arrays. I think there are
> some good ideas in
On Oct 12, 1:33 am, "Mark H." <[EMAIL PROTECTED]> wrote:
> 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 secon
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 r
On Oct 10, 10:56 am, Martin DeMello <[EMAIL PROTECTED]> wrote:
> On Oct 9, 12:29 pm, "Mark H." <[EMAIL PROTECTED]> wrote:
>
> > a mapping. However, if you find yourself doing this a lot, you might
> > want to think about a more Clojure-like idiom that doesn't require
> > destructive updates and m
On Oct 9, 12:29 pm, "Mark H." <[EMAIL PROTECTED]> wrote:
> a mapping. However, if you find yourself doing this a lot, you might
> want to think about a more Clojure-like idiom that doesn't require
> destructive updates and minimizes consing for local changes (e.g., a
> quadtree).
Interesting ide
On Oct 8, 9:54 am, Martin DeMello <[EMAIL PROTECTED]> wrote:
> That was my first thought, but I was hoping there was a library for
> this already. It seems to be a surprisingly uncommon use case (not
> just in clojure, I've ended up implementing something like that in
> several languages) - I'd ha
> just in clojure, I've ended up implementing something like that in
> several languages) - I'd have thought 2d rectangular arrays were a lot
> more popular a data structure than that
ja, it has always boggled my mind that such things are generally
lacking standardization in languages.
--~--~---
On Oct 8, 8:06 am, "Mark H." <[EMAIL PROTECTED]> wrote:
>
> If you don't like vector-of-vectors or maps, you could write some
> syntactic sugar for mapping two-dimensional indexing onto a one-
> dimensionally-indexed vector, e.g., for an n x n array with Fortran-
> style indexing:
>
> (i, j) -> i
On Oct 7, 6:30 pm, Martin DeMello <[EMAIL PROTECTED]> wrote:
> How do you make a two-dimensional array of a given size? (e.g. (make-
> array '(i j)) in common lisp)
>
> I want to do stuff like, e.g., representing a chessboard, where I can
> index into cells and update them.
If you don't like vect
On Tue, Oct 7, 2008 at 9:30 PM, Martin DeMello <[EMAIL PROTECTED]> wrote:
>
> How do you make a two-dimensional array of a given size? (e.g. (make-
> array '(i j)) in common lisp)
>
> I want to do stuff like, e.g., representing a chessboard, where I can
> index into cells and update them.
For som
How do you make a two-dimensional array of a given size? (e.g. (make-
array '(i j)) in common lisp)
I want to do stuff like, e.g., representing a chessboard, where I can
index into cells and update them.
martin
--~--~-~--~~~---~--~~
You received this message beca
11 matches
Mail list logo