Hi Konrad,

In writing these functions, I was trying to blend the worlds of lispy
data structure building and more familiar matrix indexing.

I wanted to be able to treat matrices like elements of a list that
could be consed/conjed together to build up data abstractions. This is
necessary to keep in spirit with clojure's other data structures.

Say that you're dealing with a structure of x dimensions.  In this
frame, imagine that you have a list of x-1 dimensional objects in a
list that is as long as the xth dimension.  You can cons up these
things that are n-1 in dimensionality and use nth as a linear index
for these n-1 dimensional structures.  In other words, nth should be
used when operating on the outer-most/last dimension, whereas the
index method is intended to be used when you're treating the data
structure as a whole.  Let me know if my explanation isn't clear.

> -> #<PersistentMatrix
> [[1, 2]
> [3, 4]
> [5, 6]]>

Also, the printing isn't correct yet.  The rows should be switched
with the columns, but that didn't seem trivial, so I have postponed it
for a while.

> (.index m (int-array [1]))
> -> 2

This shouldn't happen.  This should actually raise an exception.  I
intended index only to be used when you specify an index for all of
the dimensions.

I have a project push well into june, but after that I will be
developing the library more actively.

Please, keep the questions/comments coming!

-Adler
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to