LU and LU inverse is done
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "./decomp/lu.h"
|
||||
|
||||
|
||||
|
||||
|
||||
namespace numerics{
|
||||
|
||||
template <typename T>
|
||||
void inplace_inverse_lu(utils::Matrix<T>& A){
|
||||
if (A.rows() != A.cols()){
|
||||
throw std::runtime_error("numerics inverse_lu: non-square matrix");
|
||||
}
|
||||
|
||||
decomp::LUdcmp<T> lu(A);
|
||||
lu.inplace_inverse(A);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user