Thread: Accessor for Sparse Matrix

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    1

    Question Accessor for Sparse Matrix

    Hi, I need a piece of code to work with sparse matrices, I've never worked with them before. Basically, I need to write a C function taking in a sparse matrix and two integers, say a and b, and return the element with row index a and column index b in the represented array. The sparse array data type itself ought to be holding the three arrays necessary to store the compressed array (with compressed row storage) and the row,col size of the original sparse array.

    So ....anyone can help me out with this?

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Clark, welcome to the forum.

    The way the forum works (to avoid becoming homework central), is to have the posters show what they've worked on - it is, after all, your class, so you must have some idea of how to get started.

    Post up your effort,and thoughts, and what has you stopped, and we will try to assist, you.

    Be sure and use code tags (click on the # icon in the advanced editor's window), and some kind of decent (2-5 spaces ideal) level of indentation for more subordinate lines of code.

    Anything else, and you code looks like crap, and people tend to turn away.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM
  3. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM
  4. Matrix Reloaded Questions (SPOILERS_
    By Xei in forum A Brief History of Cprogramming.com
    Replies: 73
    Last Post: 10-19-2003, 02:21 PM