[eigen] Operations involving constants

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


So I'm working on my own little test class to learn expression templates, etc. and have run into a bit of a snag. I'd appreciate any help in understanding. I'm uncertain how to implement the following kinds expressions:

2*array
array+1

It looks like Eigen somehow implements this in the Unary Operators, which makes sense, but I can't figure it out.

I tried encapsulating the constant into a Constant<T> class, and using the BinaryOps like normal, but that gave me segfaults for some reason.
How would y'all suggest I approach this issue?

Thanks for the help.

Dalon



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