summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--matrix.h2
-rw-r--r--vector.c1
-rw-r--r--vector.h6
3 files changed, 5 insertions, 4 deletions
diff --git a/matrix.h b/matrix.h
index 85dfa2b..76a3688 100644
--- a/matrix.h
+++ b/matrix.h
@@ -33,7 +33,7 @@ typedef enum {
MATRIX_SWAP_COLS
} MatrixSwapType;
-typedef struct {
+typedef struct Matrix {
double *xs;
size_t m;
size_t n;
diff --git a/vector.c b/vector.c
index 0ea8152..48b1901 100644
--- a/vector.c
+++ b/vector.c
@@ -1,5 +1,6 @@
#include "vector.h"
+#include "matrix.h"
#include "utils.h"
#include <math.h>
diff --git a/vector.h b/vector.h
index c10a765..3df897e 100644
--- a/vector.h
+++ b/vector.h
@@ -3,8 +3,6 @@
#include <stddef.h>
-#include "matrix.h"
-
#define vector_at(v, i) ((v)->xs[(i)])
#define vector_loop(v, i) matrix_loop((v)->mat, i)
@@ -15,7 +13,9 @@
#define VECTOR_DIM_MATCH(v1, v2) ((v1)->m == (v2)->m)
-typedef struct {
+typedef struct Matrix Matrix;
+
+typedef struct Vector {
double *xs;
size_t m;
Matrix *mat;