19 lines
317 B
C++
19 lines
317 B
C++
#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);
|
|
}
|
|
|
|
}
|