Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-23 Thread Rock
Pardon, in the example above we have a 3 x 3 x 3 nested vector, not a 3 x 3 matrix! On Jan 23, 2:45 pm, Rock wrote: > I have a working function to slice multidimensional nested vectors a > la MATLAB (actually more like NumPy). > > I'm using Konrad Hinsen's multi-array library (keep up the great w

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-23 Thread Rock
I have a working function to slice multidimensional nested vectors a la MATLAB (actually more like NumPy). I'm using Konrad Hinsen's multi-array library (keep up the great work Konrad!). Here's the code (I'm sure it can be greatly improved and optimized): (defn nv-subvec [x & ind] (loop [v x

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 10 Jan 2010, at 21:39, extrackc wrote: Have you looked into Incanter project? I just found out about it recently. "Incanter is a Clojure-based, R-like platform for statistical computing and graphics." http://incanter.org/ Incanter uses ParallelColt as its underlying matrix library. While

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread extrackc
Have you looked into Incanter project? I just found out about it recently. "Incanter is a Clojure-based, R-like platform for statistical computing and graphics." http://incanter.org/ In particular, maybe this is useful: http://liebke.github.com/incanter/core-api.html#incanter.core/sel Carson

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 10.01.2010, at 13:55, Rock wrote: As for the Java libraries, have you had a look at JScience? From what I've seen, it's not at all bad. It's an interesting library, but it lives clearly in the Java universe of strict typing. Moreover, it doesn't really have arrays, just vectors and matr

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Rock
An ambitious project indeed! As for the Java libraries, have you had a look at JScience? From what I've seen, it's not at all bad. However, I do believe that, as far as Clojure is concerned, it should have its own scientific libraries and infrastructure. So I'm really glad that you've started this

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 10.01.2010, at 10:35, Rock wrote: I hadn't thought about. I'm so happy that you are working on this as well. I think Clojure has immense potential for scientific and mathematical computing, but this aspect has been somewhat neglected until now for some reason. Let's hope for a big change in

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Rock
Great Konrad! Thank you. My code is similar to yours. I think I will put what you've just shown me to good use. There are a few good points I hadn't thought about. I'm so happy that you are working on this as well. I think Clojure has immense potential for scientific and mathematical computing, bu

Re: slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-10 Thread Konrad Hinsen
On 09.01.2010, at 21:22, Rock wrote: I'm working on implementing a solution for extracting slices of multidimensional vectors, in the sense of vectors of vectors. I'm taking the recursive route. I have some code for working with nested vectors here: http://code.google.com/p/clj-multi

slicing multidimensional vectors (vectors of vectors of vectors ...)

2010-01-09 Thread Rock
Hi all. I'm working on implementing a solution for extracting slices of multidimensional vectors, in the sense of vectors of vectors. I'm taking the recursive route. I'm almost there, just have to work out a few things. But I was wondering, this being a rather straightforward need, perhaps it's al