NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library
linalg.hpp
Go to the documentation of this file.
1 /*#####################################################################
2 #
3 # LINEAR ALGEBRA INTERFACE:
4 #
5 # FOR A MOMENT, I STILL USE THOSE FROM THE EIGEN LIBRARY,
6 # BUT THY MAY BE REPLACED BY DIRECT BLAS/LAPACK CALLS
7 # AT A LATER TIME
8 #
9 #####################################################################*/
10 
11 #ifndef _LINALG_H
12 #define _LINALG_H 1
13 
14 #include <stdio.h>
15 #include <complex>
16 #include <cassert>
17 #include <cstring>
18 
19 namespace linalg {
20 
22 // interface to simple linear algebra routines:
23 // implementation (using EIGEN library) defined in linalg_eigen.cpp
25 
26 //void cplx_sq_solve(void *a,void *b,void *x,int n,int d);
27 
49 void eigen_hermv(int size,std::complex<double> *A,double *eval,std::complex<double> *evec);
50 
51 
71 void real_sq_solve(double *ad,double *bd,double *xd,int dim);
72 
73 
93 void cplx_sq_solve(void *a,void *b,void *x,int dim);
94 
119 void cplx_sq_solve_many(void *a,void *b,void *x,int dim,int d);
120 
121 //void cplx_tri_solve(double *a,double *b,double *x,int dim);
122 
141 void cplx_matrix_inverse(void *a,void *x,int n);
142 
160 void linalg_matrix_inverse(double *a,double *x,int n);
161 //void QR_decomposition(double *aa,double *qq,double *rr,int n,int m);
163 
164 
165 } // namespace
166 
167 
168 
169 #endif // linalg
void cplx_matrix_inverse(void *a, void *x, int n)
Evaluate the inverse matrix of a complex matrix .
void cplx_sq_solve(void *a, void *b, void *x, int dim)
Solve a linear equation ax=b.
void eigen_hermv(int size, std::complex< double > *A, double *eval, std::complex< double > *evec)
Evaluate the eigen set of a given Hermitian matrix .
void linalg_matrix_inverse(double *a, double *x, int n)
Evaluate the inverse matrix of a real matrix .
void real_sq_solve(double *ad, double *bd, double *xd, int dim)
Solve a linear equation ax=b.
void cplx_sq_solve_many(void *a, void *b, void *x, int dim, int d)
Solve a linear equation .