From 39715d7f92843c3cc2950b89f917408ee4b7f8b4 Mon Sep 17 00:00:00 2001 From: Jasper Date: Fri, 12 Sep 2025 12:23:29 +0200 Subject: Vector doesn't keep track of being transposed, underlying matrix does --- matrix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'matrix.c') diff --git a/matrix.c b/matrix.c index 222ad6d..8f16006 100644 --- a/matrix.c +++ b/matrix.c @@ -311,7 +311,7 @@ Matrix **matrix_LR(const Matrix *A, const Vector *b) { assert(matrix_is_square(A) && "LR decomposition only works for square matrices"); assert(A->n == b->m && "Dimension mismatch"); - assert(b->is_colvec && "Column vector b expected"); + assert(vector_is_colvec(b) && "Column vector b expected"); Matrix *L = matrix_id(A->n); Matrix *A_prev = matrix_copy(A); @@ -351,7 +351,7 @@ Matrix **matrix_LR(const Matrix *A, const Vector *b) Vector *matrix_forwardel(const Matrix *L, const Vector *b) { assert(L->n == b->m && "Dimension mismatch"); - assert(b->is_colvec && "Column vector b expected"); + assert(vector_is_colvec(b) && "Column vector b expected"); double sum; Vector *y = vector_alloc(L->n); @@ -370,7 +370,7 @@ Vector *matrix_forwardel(const Matrix *L, const Vector *b) Vector *matrix_backsubst(const Matrix *R, const Vector *y) { assert(R->n == y->m && "Dimension mismatch"); - assert(y->is_colvec && "Column vector y expected"); + assert(vector_is_colvec(y) && "Column vector y expected"); double sum; Vector *x = vector_alloc(R->n); -- cgit v1.2.3