[eigen] cwise / array |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: [eigen] cwise / array*From*: Benoît Jacob <jacob@xxxxxxxxxxxxxxx>*Date*: Thu, 3 Jul 2008 09:06:52 +0200

Hi, I'd like to harmonize a bit the API for coefficient-wise operations. Currently we have * matrixbase.cwiseSomeMethod() * MatrixBase::cwise(SomeFunctor) * MatrixBase::create(SomeNullaryFunctor) * matrixbase.array().someMethod() I propose to do: * rename cwise(functor) to fromUnary(functor) and fromBinary(functor) * rename create(functor) to fromNullary(functor) * rename array() to cwise() * move all the cwiseSomeMethod() to cwise() so that instead of doing matrixbase.cwiseSomeMethod() one always does matrixbase.cwise().someMethod() * move the Cwise (formerly Array) proxy class to the Core module, but leave most of the methods in Array module -- just like the MatrixBase class is in Core but has methods in other modules. * it then becomes possible to use more operator notation e.g. matrixbase.cwiseProduct(other) becomes matrixbase.cwise() * other. I also plan to add square() and cube() functors. square() is the same as abs2 () in the real case but has a nicer name when it's what's really meant (like in mandelbrot) and is different in the complex case. cube() is useful at least in the VDW example so it wouldn't be needed anymore to write a 12-th power functor, one could just do: m.cwise().square() .cwise().square() .cwise().cube() What do you think? Benoit

**Attachment:
signature.asc**

**Follow-Ups**:**Re: [eigen] cwise / array***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] vectorization and ABI** - Next by Date:
**Re: [eigen] vectorization and ABI** - Previous by thread:
**Re: [eigen] vectorization and ABI** - Next by thread:
**Re: [eigen] cwise / array**

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