#ifndef __UTILS_H__ #define __UTILS_H__ #include #include #include #define mat_n 3 typedef struct { double c[3][3]; } r3x3_t; typedef struct { double c[3]; } r3_t; void r3x3_inv (r3x3_t *A, r3x3_t *R); void r3x3_adj (r3x3_t *A, r3x3_t *R); /* Sets {r} to the product of matrix {A} by column vector {x} */ void r3x3_map_col (r3x3_t *A, r3_t *x, r3_t *r); #endif