When you're multiplying sparse matrices against other sparse matrices or dense matrices, what is the conventional approach for each? How are the sparse matrices stored? What does matrix multiplication work?
My understanding is there are several ways it can be stored:
(1) Store the non-zero elements in a hash table where the key is the 2D indices (mapped to 1D usually) and the value is the value of the non-zero element at that index.
(2) Store the non-zero elements in a $k$ sized array where $k$ is the number of non-zero elements. Each element stores the indices and the value at that index.
(3) Similar to (2), but you have a $n$ sized array where $n$ is the size of the original matrix. For each element of the array you store a list of non-zero elements.
I'm not sure which of these or some other formulation is used in practice and under what circumstances.
An additional question I have is do we know how this is done in linear algebra packages like BLAS and LAPACK?