diff options
author | Jasper | 2025-09-08 12:12:09 +0200 |
---|---|---|
committer | Jasper | 2025-09-08 12:12:09 +0200 |
commit | f8d2ae65bba18ae79695111960a74507cdda0132 (patch) | |
tree | 8e926f4a6053ed728d7c653dad32268487f1a06a | |
parent | f8ec4383f4bdfd9e0d582c2ece55fe22ce08d61c (diff) |
Reordered includes
-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)); |