ParMooN
 All Classes Functions Variables Friends Pages
sparsematrix.h
1 #ifndef SPARSEMATRIX
2 #define SPARSEMATRIX
3 
4 #include "basictools.h"
5 
6 typedef struct _sparsematrix sparsematrix;
8 typedef const sparsematrix *pcsparsematrix;
9 
10 struct _sparsematrix {
11  int rows;
12  int cols;
13  int cmax; // maximum possible number of entries for each column
14 
15  int* nzindices; // indices of rows of nonzero entries for each column
16  // (cmax * cols dimensional array). If -1 then
17  double* data; // values of nonzero entries (cmax * cols dimensional array)
18 };
19 
20 psparsematrix new_sparsematrix(int r, int c, int cmax);
21 void del_sparsematrix(psparsematrix s);
22 
23 void matrix_times_sparsematrix(psparsematrix s, double* A, int A_rows, double* B);
24 
25 #endif
26 
Definition: sparsematrix.h:10