(Thanks Konrad; a nice summary.)
On Thursday, March 7, 2013 7:28:57 AM UTC, Konrad Hinsen wrote:
>
> My latest article in "Computing in Science and Engineering", with example
> code in Clojure, in free access for a while:
>
>A Glimpse of the Future of Scientific Programming
>http://bit.
On 29.10.2009, at 13:48, John Harrop wrote:
> One issue with using multimethods is the resolution overhead. I
> don't think the JIT can optimize this to the extent it can optimize
> a normal polymorphic Java call.
That's worth exploring - while keeping in mind that the JIT improves
all the
On 29.10.2009, at 14:01, Rock wrote:
>>> Suppose we're dealing with rank n objects. Do you think it
>>> would be an easy task to figure all that out dealing with nested
>>> vectors?
>>
>> If you can assume the array is well-formed, it is rather easy.
>> Otherwise it isn't.
>
> Can you give an exa
> I didn't address such issues because there is no point in discussing
> them before making the fundamental decision whether to use an abstract
> or an exposed data type for array data. That choice dictates the
> priorities for everything that follows.
Yes, I agree.
> > Suppose we're deal
On Thu, Oct 29, 2009 at 4:49 AM, Konrad Hinsen
wrote:
> On 28 Oct 2009, at 22:21, Rock wrote:
> > I honestly prefer your first case scenario. Seems much more efficient,
> > less resource-consuming, and just straightforward. But I really would
> > like to know what your preference is. If you had to
On 28 Oct 2009, at 22:21, Rock wrote:
> Your analysis is crystal clear and very helpful Konrad. But you
> haven't addressed the issue of dealing with useful information
> regarding the data structure itself. What if, for example, a function
> wanted to know the rank and dimensions of a multidimen
maps could also be an option.
you can use vectors of ints as keys. (and you can stick dimensions and
such in there with keywords)
i'm not sure how that compares to nested vectors for perforance. you
have the overhead of the hash function, but you don't have any
nesting.
it's also pretty handy if
Your analysis is crystal clear and very helpful Konrad. But you
haven't addressed the issue of dealing with useful information
regarding the data structure itself. What if, for example, a function
wanted to know the rank and dimensions of a multidimensional array it
was being passed, and that arra
On 27.10.2009, at 18:07, Rock wrote:
> these things. Why? Because they're just that: nested vectors. They're
> not truly multidimensional vectors, and the more I think about them,
> the more they really suck from that point of view. For instance, first
> of all they're not that safe to use (for t
Good question.
Let's see. Now, nested vectors ... I don't like them too much for
these things. Why? Because they're just that: nested vectors. They're
not truly multidimensional vectors, and the more I think about them,
the more they really suck from that point of view. For instance, first
of all
On 27.10.2009, at 17:46, Rock wrote:
> What if we created a structmap (a sort of class), where we have a
> flattened out one-dimensional clojure vector containing all the data
> of our potentially multidimensional (rank n) array, together with its
> dimensions and possibly other info? I believe t
But then again ...
Thinking this over, one idea that comes to mind:
What if we created a structmap (a sort of class), where we have a
flattened out one-dimensional clojure vector containing all the data
of our potentially multidimensional (rank n) array, together with its
dimensions and possibly
I agree, use Clojure vectors whenever it's feasible. Even within
Incanter, which uses Parallel Colt extensively, I try never to convert
Clojure vectors into Colt vectors/matrices unless it's absolutely
necessary.
David
On Oct 26, 2:23 pm, Konrad Hinsen wrote:
> On 26 Oct 2009, at 17:14, Rock
On 26 Oct 2009, at 17:14, Rock wrote:
> Just one more thing. It's still not really clear to me if I am better
> off using Java arrays (make-array ...) or clojure vectors especially
> when dealing with multidimensional arrays. I know that if use Java
> libraries such as Colt, I have no choice. But
I imagine you'll be better off with the flexibility and ease of nested
vectors unless you have very specific performance needs (e.g. you need to
pass the arrays frequently to third-party libraries that accept Java arrays,
or for performance reasons you want to mutate them in place using amap
etc.)
Just one more thing. It's still not really clear to me if I am better
off using Java arrays (make-array ...) or clojure vectors especially
when dealing with multidimensional arrays. I know that if use Java
libraries such as Colt, I have no choice. But in general? What do you
think?
On Oct 25, 5:3
> If all you need is a statistical or array-processing language like MATLAB,
> my frank view is you're best off staying in R, or Mathematica, or MATLAB, or
> Octave, or whatever... they're mature and great at what they do (Mathematica
> most of all ;-) ). The reason you might want to use Clojurati
Thanks for your replies. You've been very helpful.
On Oct 24, 1:36 pm, Konrad Hinsen wrote:
> On 23 Oct 2009, at 22:00, Konrad Hinsen wrote:
>
> > For matrix computations and linear algebra, your best choice is
> > probably
> > the Colt library developed at CERN, or the somewhat parallelized
On 23 Oct 2009, at 22:00, Konrad Hinsen wrote:
> For matrix computations and linear algebra, your best choice is
> probably
> the Colt library developed at CERN, or the somewhat parallelized
> version called Parallel Colt. Colt has arrays up to three dimensions
> for
> a couple of data types
Hi Rock,
Clojure isn't designed as an array processing language, so it doesn't have
multidimensional array-slicing or matrix algebra tools built in. That's just
not what Clojure's trying to be, and you're right, immutable data structures
might get in the way. There's probably nothing stopping you
Rock a écrit :
> What if I wanted to use Clojure for scientific computing, and in
> particular for doing linear algebra and matrix computations a la
> MATLAB?
>
> What would my options be for representing matrices, not to mention,
> especially, MULTIDIMENSIONAL ARRAYS?
>
> Would java arrays be
21 matches
Mail list logo