diff options
-rw-r--r-- | matrix.c | 7 | ||||
-rw-r--r-- | tests.c | 4 | ||||
-rw-r--r-- | utils.c | 2 | ||||
-rw-r--r-- | utils.h | 2 | ||||
-rw-r--r-- | vector.c | 7 |
5 files changed, 14 insertions, 8 deletions
@@ -1,3 +1,7 @@ +#include "matrix.h" + +#include "utils.h" + #include <stdio.h> #include <stdlib.h> #include <assert.h> @@ -5,9 +9,6 @@ #include <math.h> #include <time.h> -#include "matrix.h" -#include "utils.h" - Matrix *matrix_alloc(size_t m, size_t n) { double *xs = calloc(m * n, sizeof(double)); @@ -1,9 +1,9 @@ #include "tests.h" -#include <assert.h> - #include "matrix.h" +#include <assert.h> + void test_LR() { Matrix *A = matrix_from_str("[2 3 1;4 1 -5;-1 2 3]"); @@ -1,3 +1,5 @@ +#include "utils.h" + #include <string.h> #include <assert.h> #include <stdlib.h> @@ -1,6 +1,8 @@ #ifndef UTIL_H #define UTIL_H +#include <stddef.h> + #define ABS(x) ((x) >= 0 ? (x) : -(x)) char *str_delete_at(const char *str, const int pos); @@ -1,12 +1,13 @@ +#include "vector.h" + +#include "utils.h" + #include <math.h> #include <stddef.h> #include <assert.h> #include <stdlib.h> #include <stdio.h> -#include "utils.h" -#include "vector.h" - Vector *vector_alloc(size_t m) { Vector *v = malloc(sizeof(Vector)); |