#define MAX_MATRIX2_DATA 10 typedef struct { Float *a; int i; int j; } Matrix; typedef struct { Float *a[MAX_MATRIX2_DATA]; int i; int j; } Matrix2; extern void ProdM( Matrix *M1, Matrix *M2 , Matrix *M); extern void ProdM2( Matrix *M1, Matrix2 *M2 , Matrix *M); extern void print_matrix( Matrix *M); extern void print_matrix2( Matrix2 *M); #define el(ii,jj,m) (*( (m)->a + (jj)*((m)->i) + (ii) )) #define el2(ii,jj,m) (*( (m)->a[jj] + (ii) )) #define new_matrix(x,y,m) m.i=x; m.j=y; \ m.a = (Float*)calloc((size_t)(m.i*m.j),sizeof(Float)) #define dispose_matrix(m) if(m.a!=NULL) free(m.a)