I have to write a program where I have to perform matrix-vector multiplication and the matrix is sparse matrix. Most sparse matrices available online are in Harwell-Boeing format and they have to be read in compressed sparse row format in order to do operations on it. How should I read such a file and convert into compressed sparse row format in a C programming framework?
Tim Davis' SuiteSparse package has a function for reading matrices in that format: http://faculty.cse.tamu.edu/davis/suitesparse.html It appears that you have to download the entire SuiteSparse package but if all you want is to read Harwell-Boeing files, you really need only one routine from that package: RBio/Source/RBio.c. Note, you will also need a couple of include files that are also part of the package in order to compile that function.