Re: [eigen] "plain": a new keyword for auto with implicit evaluation

[ Thread Index | Date Index | More Archives ]

> I was thinking about:


> Matrix M = ...;

> SparseMatrix S = ...;

> Array A = ...;


> with "..." any compatible expressions. Those would also be welcome alternatives to "auto" when you know that you are dealing with dense matrices only or sparse matrices only, whereas "plain" is more general and could even wrap scalars for generic array/scalar functions.


I think I like this idea over “plain” - but I think they are mutually compatible, i.e. you could have both? Generally I know whether I am working with Matrix or Array (see the other discussion thread about dot/star), and this would be a very neat way to indicate when I want an _expression_ (use auto) or store the result (use Matrix/Array etc.). So a +1 from me.


I am not sure “plain” is the right word to use though. “result”, “stored”, or even “eval” would be clearer, in my opinion. Why the result of an Eigen _expression_ would be “plain” is not clear to me. Note I’m not criticising the concept here, only the specific English word to use.




Mail converted by MHonArc 2.6.19+