Boost logo

Ublas :

Subject: [ublas] matrix_expression
From: pmamales_at_[hidden]
Date: 2011-11-09 10:50:32


Hi,
I am using the ublas matrix structures to wrap lapack for my needs.
As it turns out, the lapack distribution I use, has specific requirements on the
memory alignment and the leading dimension of a matrix.
Also, for readbility-and not only- I wish to derive from a generic Matrix class.
Therefore, I have decided that I need to have a matrix_range derivative which hosts a matrix class.
Hence I have something like (schematically),

class MyMatrix
     :public MatrixHolder, //contains the matrix
     public matrix_range, //"views" the ublas matrix in MatrixHolder
     public Matrix, // my own little thing
     public matrix_expression< MyMatrix >
{...};

However, now I can no longer use the constructors from a matrix expression (or the assignment operators).
Not even MyMatrix in a product, in the rhs - btw the compiler even complains for the (*)multiplication operator
overloading - is it overloaded?
Should I derive from another structure, other than matrix_expression for the operators to be picked up?
What is the way around it? I thought of creating an automatic conversion to matrix_range operator but this does not
seem easy (also, is dangerous).
Any ideas?
Thank you for your help,
Petros

ps: I see in the code things like assign, assign_temporary etc. Being a user of the library I have not really gone through this code
Is there some documentation? Also for things like matrix_expression, scalar_assign etc, I have nowhere seen a description of the concepts.
Any pointer would be greatly appreciated.
ps2: using msvc10 on win7/vista.