Re: [eigen] Valid use case for creating a SparseMatrix?

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


I have exactly this use case myself but have been
somewhat reluctant to mention it because my feeling,
too, is that it is somewhat rare. (My solution too was
to first read all entries into a deque and then, after
finding the number of rows and columns, move the
entries to SparseMatrix.) So it would be useful
to me also if Eigen could support this scenario.

For what its worth, other sparse matrix packages
support this general insert "mode" in a somewhat
different way than Gael is proposing. They typically
allow a user to input (row, col, value) triplets in an
arbitrary order. Then, at the end of this input process,
some kind of convert operation changes their state
into CSC or CSR format. Obviously, there is some
kind of flag to indicate the state of the object. The
SPOOLES and Tim Davis' CSparse packages (among others) work
this way. The downside of this approach
is that every method that operates on one of these
sparse matrix objects has to check this state flag and
decide whether to support both states or simply issue
an error if the object is not in a supported state.

Is the current plan to keep or eliminate DynamicSparseMatrix?
How about an extended, more flexible version of that class?

Bill

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