Thread: Free Sparse Matrix

  1. #1
    Registered User
    Join Date
    Jan 2009

    Free Sparse Matrix

    The function receives pointer to the structure that contains a sparse matrix and releases all the engaged memory by the structure.

    How to realize this?

    #include <stdlib.h>
    #include <stdio.h>
    typedef int Elem;
    typedef struct cell Cell;
    typedef Cell * Matrix;
    struct cell {
    	int row;
    	int col;
    	Cell * right;
    	Cell * down;
    	Elem value;
    void freeSparseMatrix(Matrix m)

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Genrate sparse matrix - C99
    By anirban in forum C Programming
    Replies: 0
    Last Post: 06-10-2008, 11:44 PM
  2. Replies: 1
    Last Post: 03-08-2006, 06:47 PM
  3. Matrix and vector operations on computers
    By DavidP in forum A Brief History of
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM