diff options
Diffstat (limited to 'matrix.c')
-rw-r--r-- | matrix.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -280,7 +280,7 @@ Matrix **matrix_LR(const Matrix *A, const Matrix *b) { assert(matrix_is_square(A) && "LR decomposition only works for square matrices"); assert(A->n == b->m && "Dimension mismatch"); - assert(b->n == 1 && "Vector b expected"); + assert(matrix_is_colvec(b) && "Column vector b expected"); Matrix *L = matrix_id(A->n); Matrix *A_prev = matrix_copy(A); @@ -321,7 +321,7 @@ Matrix **matrix_LR(const Matrix *A, const Matrix *b) Matrix *matrix_forwardel(const Matrix *L, const Matrix *b) { assert(L->n == b->m && "Dimension mismatch"); - assert(b->n == 1 && "Vector b expected"); + assert(matrix_is_colvec(b) && "Column vector b expected"); double sum; Matrix *y = matrix_const(L->n, 1, 0); @@ -340,7 +340,7 @@ Matrix *matrix_forwardel(const Matrix *L, const Matrix *b) Matrix *matrix_backsubst(const Matrix *R, const Matrix *y) { assert(R->n == y->m && "Dimension mismatch"); - assert(y->n == 1 && "Vector y expected"); + assert(matrix_is_colvec(y) && "Column vector y expected"); Matrix *x = matrix_const(R->n, 1, 0); double sum; |