Hi everybody,
I've created a CSC (compressed storage columns) Matrix , for store sparse matrix!
in similar way I've created a CRS Matrix (compressed storage row). Both of them stored all the non zero element of sparse matrix in a vector A and the difference is illustred in this link : http://www.cs.colostate.edu/~mcrob/toolbox/c++/sparseMatrix/sparse_matrix_compression.html
by the way for CRS matrix i found this alghoritm to find the corrispondent index in the original matrix (in this way I can easily print out the whole matrix)
typical sparse matrix storage consists of a list of row,column, value. Any value not in the list is assumed zero. If the matrix isnt really sparse, this wastes space, of course. You may figure out a clever scheme for doing this another way (there are some) but whatever you do must be easily reversible to produce the real matrix or to operate on the sparse matrix as if fully filled out.