Re: [eigen] Multi Dimensional Arrays |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Multi Dimensional Arrays*From*: Jim Bosch <talljimbo@xxxxxxxxx>*Date*: Wed, 09 Feb 2011 12:22:08 -0800*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=i1hTKuwPnuo1P6wq+9B+Llnwad2GPES5vB0MoXjzi6M=; b=R+04/yzNKeLRk+cNuc8x+4AqdZ0m118+E6ud5dShvaZ9HIF3Quoz4l1ooENvBjHxaj 5pEK4A3iWtEC9Zgb8glJOYZs9dnu0aQIUgum5nukTOzpQ/6+ezrqj8YIrC7KQ45F3N5G OGC86URONuFq2ySOzMqPEm0veOBJ2/eBinMtw=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=BIQYIDZN5s8dCSzbfBWoK+A5gvr0rHrZ34f9Eq+a0eP4ySQWGIJ/jtA0LdTWiETHj0 CSesh46SoQCLvs5ut3r7diDfaZsUg5RjCVv/10CNhfQzBFz6YhwuLgeIFlQ0xlWrovdt 3XEoIXS9ox2oOcxCKJMu0NYVBajCcp841Z5jQ=

On 02/09/2011 08:36 AM, Rhys Ulerich wrote:

I feel your pain, and I've been working on a multidimensional array library that's designed to let Eigen do all the matrix math: http://code.google.com/p/ndarray/Jim, you're my hero for the following reasons: 1) Indexes and shape information have the same sign-edness. It drives me crazy that MultiArray requires for (index i = 0; i< (index) bar.shape()[0]; ++i) {} to avoid hitting compiler warnings. And that doing The Right Thing (TM) for generic MultiArray routines where non-zero-indexed directions are a possibility gets seriously ugly seriously fast. 2) You maintain some storage ordering information in the type. I've rolled this (badly) atop MultiArray using MPL and absolutely hate my approach. Any chance you could extend Array<T,N,C>'s C semantics so that C< 0 implies a column-major contiguous ordering? With some clever use of transpose() you could probably pick up a lot of things for free.

3) You make it easy to create data which is non-contiguous in some directions. This is hackable atop MultiArray but requires using some protected functionality from multi_array_ref. I've been forced to go this way to pad multidimensional arrays where I'm performing real-to-complex FFTs on the final dimension.

I'm sure I'll find more reasons in the near future. Ronald Garcia's mentioned once or twice that he's interested in rolling a rewrite of MultiArray that handles deep vs shallow semantics better. You might try interesting him in hacking on what you've got.

Jim

**References**:**[eigen] ordering of eigenvalues of EigenSolver***From:*Susanne Suter

**Re: [eigen] ordering of eigenvalues of EigenSolver***From:*Milian Wolff

**Re: [eigen] ordering of eigenvalues of EigenSolver***From:*FMDSPAM

**Re: [eigen] ordering of eigenvalues of EigenSolver***From:*Jose Luis Blanco

**[eigen] Multi Dimensional Arrays***From:*Andy Somogyi

**Re: [eigen] Multi Dimensional Arrays***From:*Jim Bosch

**Re: [eigen] Multi Dimensional Arrays***From:*Rhys Ulerich

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Re: Scheduling beta3 on sunday february 6 ?** - Next by Date:
**[eigen] Transform: did I miss something** - Previous by thread:
**Re: [eigen] Multi Dimensional Arrays** - Next by thread:
**Re: [eigen] ordering of eigenvalues of EigenSolver**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |