40 float data[MAX_ROWS][MAX_COLS];
55 #define MROWS(m) ((m).rows) 56 #define MCOLS(m) ((m).cols) 57 #define MDATA(m,i,j) ((m).data[i][j]) 59 #define VELEMENTS(v) ((v).elements) 60 #define VDATA(v,i) ((v).data[i]) 62 #define M_SQUARE(m) ((m).rows == (m).cols) 63 #define M_COMPAT_DIM(m, n) ((m).cols == (n).rows) 64 #define M_EQUAL_DIM(m, n) (((m).rows == (n).rows) && ((m).cols == (n).cols)) 65 #define V_EQUAL_DIM(v, w) (((v).elements == (w).elements)) 66 #define MV_COMPAT_DIM(m, v) ((m).cols == (v).elements) 68 #define FIRST(b) ((b).mat[0]) 69 #define SECOND(b) ((b).mat[1]) 70 #define THIRD(b) ((b).mat[2]) 71 #define RANGE(b) ((b).range) 73 #define SQUARE(x) ((x)*(x)) 75 MATRIX create_matrix (
int rows,
int cols);
76 void initialize_matrix (
MATRIX *m,
int rows,
int cols);
77 void diagonal_matrix (
MATRIX *m,
int dim,
float el1,
float el2,
float el3);
78 void print_matrix (
char *message,
MATRIX const *m);
79 VECTOR create_vector (
int elements);
80 void initialize_vector (
VECTOR *v,
int elements);
81 void print_vector (
char *message,
VECTOR const *v);
82 float cross_product (
MATRIX const *m,
int f1,
int c1,
int f2,
int c2);
83 int determinant (
MATRIX const *m,
float *result);
Definition: sp_matrix.h:50
Definition: sp_matrix.h:37
Definition: sp_matrix.h:43