[eigen] Re: Sparse Address Spaces

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



On Wed, Jan 20, 2016 at 3:32 AM, Elizabeth Fischer <rpf2116@xxxxxxxxxxxx> wrote:
The alternative is to convert to a dense address space.  That conversion is a pain, reducing code readability and debuggability.  It also incurs an overhead of building hash maps from your sparse to dense address space.  I'm sure if your problem involves enough linear algebra, this conversion would be worth it anyway.  But for more "casual" linear algebra, user code complexity could be a bigger issue.

yes, that's usually how people address this issue, but I see your point. Perhaps, an intermediate approach would be to hide this complexity within a wrapper storing a SparseMatrix plus a  an index mapping to truely sparsify the second dimension in CCS...

An important aspect is that such a flexible storage format should only expose the subset of operations which are known to work reasonably efficiently. I'm still traumatized by my first usages of sparse linear algebra through boost:ublas: I started with such a "coordinates" storage format, and got very confused by seeing that very simple operations took several hours... Then, I discovered that after converting the storage to CCS, it took fractions of a second only. Very bad user experience!

By the way, thinking about boost:ublas, it's sparse matrix seems to be very similar to SpSparse in spirit as it also allow you to use whatever as storage format (map<pair<int,int>>, vector<sparse_vector>, sparse_vector<sparse_vector>, etc.).

Gael


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