Boost logo

Boost :

Subject: Re: [boost] Interest in multi-dimensional array class templates.
From: Brian Smith (bjs3141_at_[hidden])
Date: 2011-06-19 16:57:19


On 6/19/11, Mathias Gaunard <mathias.gaunard_at_[hidden]> wrote:
> On 11/06/2011 21:05, Brian Smith wrote:
>> The file maps.zip in the containers directory in Boost's vault
>> contains a library with classes for the development of
>> multi-dimensional array applications. Also included are scalar and
>> fixed-size vector and matrix class templates with an expression
>> template implementation of operators.
>
> Can I look at a N-dimensional array as a M-dimensional array, with M >
> N? With N < M?
>
An M-dimensional array is an N-dimensional array, for all M = N.

> Can I have a view of part of the array? Can I easily linearize or
> reshape it?
>
Yes. If you mean by linearization, can it be allocated with a single
memory request then no. I did write such a type and it was pretty
efficient but I removed it. Reshaping a view is possible though.

> Given another N-dimensional array whose values are positions, can I
> obtain the array of the values accessed at the given positions?
>
With some effort on your behalf yes.

>Can this be a lazy view?
>
Probably depends on how your program is structured.

> How does it integrate with range and iterators?
>
Iterators we're also implemented as separate classes then removed in
favour of the view. The reason being they proved detremental to
performance, maybe an implementation detail, nevertheless for the time
being their gone. Ranges are a part of the view and iterators returned
by classes are good old fashioned pointers that are owned by class
that returns them.

> The standard syntax for those operations is that of Matlab (which is
> also what SciPy uses).
> Do you provide something similar?
>
I'm not familiar with Matlab syntax so can't comment.
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
www.maidsafe.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk