|
Ublas : |
Subject: [ublas] Help with new matrix adaptor
From: Arnaldo Leon (arnaldo.leon_at_[hidden])
Date: 2009-02-07 14:54:53
Hi
I've been wanting to implement a read-only matrix adaptor for lagged
matrices, which are similar to Hankel matrices, but without the
square-matrix constraint, that is:
a(i,j) = a(i+1,j-1)
This would allow me to store the data in memory in a very compact
form. In my current implementation (where I copy the data) a matrix
with 100 lags consumes 100x more memory than necessary.
I've looked at symmetric_adaptor and I think it could be used as an
example of what I want to do, but the documentation is extremely
sparse.
What do the find1() and find2() methods do? What is the "rank" variable?
Is there an easier way to set up const_iterator1 and const_iterator2?
Is there any sample code or tutorials somewhere? What is index1() and
index2()?
Has anybody else implemented such an adaptor?
Is my approach correct? or should I be using some other template?
The only operations I will need to be using on this matrix is prod()
and column(), so I only need read-only access.
Thanks in advance...
-aml