#include "tests.h" #include "matrix.h" #include "vector.h" #include void test_LR() { Matrix *A = matrix_from_str("[2 3 1;4 1 -5;-1 2 3]"); Vector *b = vector_from_str("[-1;2;3]"); Matrix **LR = matrix_LR(A, b); Matrix *L = LR[0]; Matrix *R = LR[1]; Vector *y = matrix_forwardel(L, b); Vector *x = matrix_backsubst(R, y); vector_print(x); /* TODO: Implement matrix vector multiplication */ /* assert(matrix_eq(matrix_mult(A, x), b, 0.01)); */ } void run_tests() { test_LR(); }