LU and LU inverse is done

This commit is contained in:
2025-09-14 18:35:37 +02:00
parent 88087ea6a6
commit 92437e5ef1
23 changed files with 503 additions and 978 deletions
+4 -11
View File
@@ -23,8 +23,11 @@ namespace numerics{
if (method == "Gauss-Jordan"){
inverse_gj(A);
}
else if(method == "LU"){
inplace_inverse_lu(A);
}
else{
throw std::runtime_error("numerics::inplace_inverse(" + method + ") - Not implemented yet \r \nImplemented: 'Gauss-Jordan',");
throw std::runtime_error("numerics::inplace_inverse(" + method + ") - Not implemented yet \r \nImplemented: 'Gauss-Jordan', 'LU'");
}
}
@@ -32,21 +35,11 @@ namespace numerics{
template <typename T>
utils::Matrix<T> inverse(utils::Matrix<T>& A, std::string method = "Gauss-Jordan"){
utils::Matrix<T> B = A;
inplace_inverse(B, method);
return B;
}
} // namespace numerics
#endif // _inverse_n_