Re: [eigen] cwise / array |

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

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

On Thursday 03 July 2008 11:04:55 Gael Guennebaud wrote: > hm... I don't really like the "from" which could likely be interpreted > as a "set from". What about apply*() or maybe just unary(), binary() > ? or even unaryExpr(), binaryExpr() ?? > (I like the latter ones with "Expr") good idea. > > > * rename create(functor) to fromNullary(functor) > > this one a static member. BTW, what about naming static members with a > upper case for the first letter: MyMatrix::Random(), MyMatrix::Zero(), > etc. My point is that currently you can write: > Matrix3f a, b; > b = a.zero(); > this would work but it not clear what you're really doing especially with: > b = a.fromNullary(functor); > With an upper case: > b = a.Zero(); > it is immedialtely clear that you're doing something insane. good idea. > I know > this is a quite common coding rule though Qt does not use it (don't > known about KDE). Moreover it works pretty well here because then you > would write Matrix3f::Zero() which might give you the feeling that > Matrix3f::Zero is a nested struct, that is wrong, but pretty close to > what actually does Zero(), i.e., creating a "zero" expression. ok, I agree. > > about fromNullary(functor), again it could be simply ::nullary(), > > ::Nullary(), ::nullaryExpr() or ::NullaryExpr() .... ok > excellent, I have to say that writing .abs2() sounded a bit strange to > me while what I wanted is really a cwise square ! ok, seems like we're on the same wavelength. Cheers, Benoit

**Attachment:
signature.asc**

**References**:**[eigen] cwise / array***From:*Benoît Jacob

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

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

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