Boost logo

Glas :

Re: [glas] multi-dimensional arrays?

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2007-11-29 03:20:27


Dear Neal,

I think we could add multi-dimensional arrays to glas. Could you make a
list of desired functionaties?

As a coincidence I attended a seminar yesterday on higher order tensors.
The notation and concepts from this community could help.

Best,

Karl

Neal Becker wrote:

>On Wednesday 28 November 2007, Evgenii Rudnyi wrote:
>
>
>> >I'm enthusiastically following mtl4 and glas developments.
>> >One thing that
>> >neither seems to address is arrays of dimension >2. Is this true?
>>
>>NumPy supports multidimensional arrays:
>>
>>http://www.scipy.org/NumPy
>>
>>
>>
>
>Yes it does. Unfortunately, it doesn't have a nice c++ interface, AFAIK.
>
>What I'd like is to be able to write generic algorithms in c++ that can use
>various multi-dimensional containers, and then expose them to python.
>
>So far, what I've done is expose various container types to python (ublas,
>blitz++) using boost::python. Then, instantiate algorithms using these
>containers to expose to python.
>
>Each lib has it's own issues. ublas, for example, doesn't conform to all of
>container concept (lacks constructor taking a pair of iterators), but that's
>pretty easy to work around.
>
>blitz takes a little work, because it lacks proper iterators. I have built
>boost::iterator adapters that handle that (perhaps not efficiently, though).
>
>I don't know how to use numpy to get a nice generic interface on the c++ side.
>_______________________________________________
>glas mailing list
>glas_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/glas
>
>