NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ linalg_matrix_inverse()

void linalg::linalg_matrix_inverse ( double *  a,
double *  x,
int  n 

Evaluate the inverse matrix of a real matrix \(a\).


Evaluate the inverse matrix of a given real matrix \(a\) and put it to \(x\).


A real square matrix given as a pointer.


A real square matrix into which \(a^{-1}\) is set. Given as a pointer.


Size of the matrix \(a\) and \(x\).

Definition at line 125 of file linalg_eigen.cpp.

References get_dmatrix(), and set_dmatrix().

126 {
127  dmatrix A_eigen;
128  dmatrix X_eigen;
129  set_dmatrix(n,a,A_eigen);
130  Eigen::FullPivLU<dmatrix> lu(A_eigen);
131  X_eigen=lu.inverse();
132  get_dmatrix(n,x,X_eigen);
133 }
void set_dmatrix(int n, void *a, dmatrix &A)
void get_dmatrix(int n, void *a, const dmatrix &A)
+ Here is the call graph for this function: