On Mon, Jun 8, 2009 at 5:25 AM, kayhman <kayhman@gmail.com> wrote:
Hello !

I'd like to add some new classes (that do not inherit from matrix and vector - in fact this will be elements of some lie groups algebras), and I want to use the template expression pattern.

Is it possible to do that easily ? Can I reuse a part of expression_type.cpp, i.e. ublas_expression ? Can you provide a simple example ?

If there is not a huge connection to ublas other than the use of expression templates, you might want to consider using boost::proto.  I haven't used it, but it has good examples and I believe it is intended as a generic expression template/EDSL library.  And there is some discussion a while back of a vector class: http://archives.free.net.ph/message/20080326.155523.eb5b6d6e.el.html