3

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?

1 Answers1

4

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.

Bill Greene
  • 6,064
  • 1
  • 16
  • 24
  • Thanks for the information Bill Greene. After following your link I also found another link http://bebop.cs.berkeley.edu/smc/ . Infact both were helpful. – Madhav Gumma Feb 25 '16 at 19:36