If I wasn't using Incanter (see Alex Robbin's reply), I'd probably just use
a vector of vectors.  If your matricies 70% dense, it's generally not worth
it to try and use some sort of sparse data structure- the extra overhead of
the sparse data structure will be greater than the savings of not
representing the unpopulated areas.  Vectors are actually a great
trade-off, giving you almost the same access and memory costs arrays do,
but with all the advantages of being immutable (multi-threaded goodness).

On Thu, Dec 22, 2011 at 5:11 AM, Simon Holgate <simon.holg...@gmail.com>wrote:

> Hi,
>
> I'm pretty new to functional languages but really love Clojure.
>
> My work typically involves multi-dimensional arrays of data. I'm an
> oceanographer and typically use things like sea surface height data
> from satellite altimetry on 1/3 degree 2D grids with maybe 800 time
> slices (=O(5E8 data points)). For this I use Fortran and R.
>
> I realise that I can just use Java arrays, but is this the best
> approach? I could implement lists of lists but I'm guessing that the
> performance would be worse?
>
> What other structures could I use? The arrays are typically 30% sparse
> (since only 70% of the planet is ocean). This means arrays are
> wasteful in many ways.
>
> Similar issues must apply in image processing so are there ways of
> handling such data in functional structures?
>
> Thanks for any advice,
>
> Simon
>
> --
> 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
> Note that posts from new members are moderated - please be patient with
> your first post.
> 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

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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