Re: [eigen] Column matrix

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


Gael Guennebaud wrote:

Hi,

On Wed, Nov 4, 2009 at 2:56 PM, guillaume saupin <guillaume.saupin@xxxxxx <mailto:guillaume.saupin@xxxxxx>> wrote:

    Hello,

    Is there a kind of sparse matrix in eigen which stores only the
    non null column of a matrix (i.e. a ColumnMatrix) ?


I'm not sure to fully understand what you need here, but what I'm sure about, is that's not in Eigen ;)

So, you're looking for an efficient representation for matrices having a couple of columns which are "empty", right ? So, e.g., if you have a n x m matrix with k non null columns, I guess you would store it into a n x k dense (or sparse) matrix, plus a vector of k integers storing the real column index of each column.
This is exactly that, except that we also store a vector of n integers mapping a real column index to its compressed index. This is more efficient for some operations (accessing coeff(i,j)) and does not required to much memory.


If so, then a question is do we really need a new type of matrix for that ? I mean, isn't it enough to simply remove those columns from your problem ? Perhaps I'm missing something though ?

In fact, we have a set of n parameters q = (q1, ..., q2), and we have some functions f1(q), f2(q), ... which depend only on some parameters of q. So when we compute the differential of f1, f2, ..., only the columns corresponding to the parameters whose function depends on are non null, i.e. df1/dq = (df1/dq1 0 0 0 ... df1/dq6 ...)

As we need to multiply these differentials with vectors of dimension n (or matrices of dim n * m), it is more handy for us to have a class that stores the mapping between the full and compressed indices, and acts like a dense matrix.


 gael.


    In our libraries, we currently use this kind of matrix and as we
    plan to completely rely on Eigen, we'd like to have this kind of
    matrix.

    As for the SkylineMatrix, we are willing to develop this
    ColumnMatrix if it does not already exists, and if you are ready
    to integrate it inside eigen.

    Thanks,

    guillaume





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