1 | #include <config.h> |
---|
2 | |
---|
3 | #ifndef EIGEN_H |
---|
4 | #define EIGEN_H |
---|
5 | |
---|
6 | #include "utilities.h" |
---|
7 | #include "free.h" |
---|
8 | |
---|
9 | #ifdef RWRAPPER |
---|
10 | #include <R.h> |
---|
11 | #endif |
---|
12 | |
---|
13 | int ludcmp_1D(phydbl *a, int n, phydbl *d); |
---|
14 | void det_1D(phydbl *a, int n, phydbl *d); |
---|
15 | |
---|
16 | int Eigen(int job, phydbl *A, int n, phydbl *rr, phydbl *ri, |
---|
17 | phydbl *vr, phydbl *vi, phydbl *w); |
---|
18 | void balance(phydbl *mat, int n, int *low, int *hi, phydbl *scale); |
---|
19 | void unbalance(int n, phydbl *vr, phydbl *vi, int low, int hi, |
---|
20 | phydbl *scale); |
---|
21 | int realeig(int job, phydbl *mat, int n,int low, int hi, phydbl *valr, |
---|
22 | phydbl *vali, phydbl *vr, phydbl *vi); |
---|
23 | void elemhess(int job, phydbl *mat, int n, int low, int hi, |
---|
24 | phydbl *vr, phydbl *vi, int *work); |
---|
25 | |
---|
26 | int ludcmp(phydbl **a, int n, phydbl *d); |
---|
27 | void det(phydbl **a, int n, phydbl *d); |
---|
28 | |
---|
29 | /* complex functions */ |
---|
30 | |
---|
31 | typedef struct { phydbl re, im; } complex; |
---|
32 | #define csize(a) (FABS(a.re)+FABS(a.im)) |
---|
33 | |
---|
34 | complex compl (phydbl re,phydbl im); |
---|
35 | complex _conj (complex a); |
---|
36 | complex cplus (complex a, complex b); |
---|
37 | complex cminus (complex a, complex b); |
---|
38 | complex cby (complex a, complex b); |
---|
39 | complex cdiv (complex a,complex b); |
---|
40 | /* complex local_cexp (complex a); */ |
---|
41 | complex cfactor (complex x, phydbl a); |
---|
42 | int cxtoy (complex *x, complex *y, int n); |
---|
43 | int cmatby (complex *a, complex *b, complex *c, int n,int m,int k); |
---|
44 | int cmatout (FILE * fout, complex *x, int n, int m); |
---|
45 | int cmatinv( complex *x, int n, int m, phydbl *space); |
---|
46 | phydbl *Cholesky_Decomp(phydbl *A, int dim); |
---|
47 | |
---|
48 | |
---|
49 | #endif |
---|
50 | |
---|