Re: [eigen] refactoring fork: some news |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] refactoring fork: some news*From*: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>*Date*: Sun, 20 Dec 2009 10:56:03 -0500*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=C8ciriQb1ykdnlp1TdVWgiTjsoyhlUOoMUg7+rCReO4=; b=gNtwWaVFHOPOHDhip5ZBK11B8Y+spWOdozrbQpDXeEvNtlC6Nh+bvLaDdCaISLL6h+ Wfebj1mCBpvFIPqgGrd/7dZ9Wfn7OxBtCQnpH63M6rAFrBOGW1oVmA7gioj0wiMBivwU eQ6XsEP/ukylSlLVrsuUIL3lqErcZw167Y83g=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Sxs8Hx3WtKFpVTlhye6Hs/+xW7ri9jNblWYLhDVRuLPRGFLPaexbYHau3A1+DyClgj TK753OjT2x8IOZssVdysLL1lRnwgXmJ86XGE75RseYDA2oSpIaSfOgPA3vjHxpyJub7t +3GAwPFr3SoR81KrahYymxAL8uRPlkG7Z3twg=

2009/12/20 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>: > On Fri, Dec 18, 2009 at 10:53 AM, Gael Guennebaud > <gael.guennebaud@xxxxxxxxx> wrote: >> >> Still about Array, let me recall that we agreed upon removing .cwise() in >> favor of a few cwiseXXX function for Matrix objects (e.g., >> mat.cwiseProduct(mat), mat.abs()), plus a MatrixBase::array() function >> allowing to see a matrix as an Array, e.g.: >> >> (mat.array().abs()>10).select(A,B); > > The array() notation is beautiful - I am just wondering whether we really > need cwiseProduct(...) & co. If I am reading Benoit's e-mail correctly, he > is also assuming that the majority will go for array(). There are cases where .cwiseProduct returning a matrix xpr is still quite more concise, e.g. (m1.array() * m2.array()).matrix().someMatrixSpecificMethod(); or, if you prefer, m1.array().operator*(m2.array()).matrix().someMatrixSpecificMethod(); versus m1.cwiseProduct(m2).someMatrixSpecificMethod(); ..array() / .matrix() convert permanently between the two worlds, so if you only wanted one array operation in the middle of a chained matrix computation, it's a bit cumbersome, so we thought we could add a few methods like cwiseProduct for some common use cases. Though it must be said that in many cases you wouldn't have to convert back to matrix(), because many methods like the above example, select(), also work on arrays. Benoit > > - Hauke >

**Follow-Ups**:**Re: [eigen] refactoring fork: some news***From:*Manuel Yguel

**References**:**[eigen] refactoring fork: some news***From:*Gael Guennebaud

**Re: [eigen] refactoring fork: some news***From:*Hauke Heibel

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] MSVC debug tools** - Next by Date:
**Re: [eigen] refactoring fork: some news** - Previous by thread:
**Re: [eigen] refactoring fork: some news** - Next by thread:
**Re: [eigen] refactoring fork: some news**

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