Registered Member
|
Hi folks,
I've got no experience with template (meta?)programming, but I'm pretty sure that what I want is straightforward. I was hoping for some guidance. Here's the background: Let's say I have two vectors spaces, V and W, of dimensions N and M. I can represent a vector v∈V as a column vector, and a vector w∈W as a row vector. Then consider the tensor product space T = V⊗W which has dimension N*M. It can be represented as a matrix of dimensions (N,M) -- any sum over 'outer' products v⊗w. Now consider a linear operator acting on t∈T. A linear operator L*t can be written as a sum of tensor products of linear operators acting on V and acting on W. For example, let's say L = A⊗B, where A:V→V and B:W→W. Represented as matrices, A is an (N,N) matrix that acts on the left on v, and B is an (M,M) matrix that acts on the right on w. So for L to act on t, this can be represented as L*t = (A*v) ⊗ (w*B). The space of linear operators acting on T is a linear vector space that forms an algebra. I would like to be able to treat elements from this algebra like I would write operators in normal mathematical notation ("acting on the left" on T). So imagine writing code like:
which translates, in matrix language, into
So -- can anyone advise me in how to make such an operator algebra? It is (obviously) quite similar to the algebra of matrices that already exists in Eigen, in that operator sums and products are also operator expressions. However, this is something to be built on top of matrices, so it doesn't have to do things like know whether it is stored in column/row major order, etc. Cheers Leo |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]