/* * Project P12 parsecommand header file * J Dean Brock, 2011 * * You should not have to modify this file */ #ifndef SPARCEMATRIX_H #define SPARCEMATRIX_H typedef struct sparceElementRec *sparceElementPtr ; /* The nodes of the sparce matrix */ struct sparceElementRec { int row ; /* Position in the matrix */ int col ; int value ; /* Value of element */ sparceElementPtr nextOnRow ; /* Pointers to other nodes */ sparceElementPtr nextOnCol ; } ; /* The master structure for the matrix */ struct sparceMatrix { int numRows ; /* number of rows */ int numCols ; /* number of columns */ sparceElementPtr *rows ; /* rows */ sparceElementPtr *cols ; /* columns */ } ; struct sparceMatrix *createSparceMatrix(int, int) ; int incrementValueSparceMatrix(struct sparceMatrix *, int, int) ; int printValueSparceMatrix(FILE *, struct sparceMatrix *, int, int) ; int printRowSparceMatrix(FILE *, struct sparceMatrix *, int) ; int printColumnSparceMatrix(FILE *, struct sparceMatrix *, int) ; #endif /* SPARCEMATRIX_H */