modified: src1/input.c
[GalaxyCodeBases.git] / c_cpp / lib / klib / keigen.h
blob14aa53da543c4715ea48ba1ec642d6c13cb18707
1 #ifndef KEIGEN_H
2 #define KEIGEN_H
4 #define KE_EXCESS_ITER (-1)
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 /**
11 * Compute eigenvalues/vectors for a dense symmetric matrix
13 * @param n dimension
14 * @param a input matrix and eigenvalues on return ([n*n]; in & out)
15 * @param v eigenvalues ([n]; out)
16 * @param cal_ev compute eigenvectos or not (faster without vectors)
17 * @param eps precision (<=0 for default)
18 * @param max_itr max iteration (<=0 for detaul)
20 * @return 0 on success; KE_EXCESS_ITER if too many iterations
22 int ke_eigen_sd(int n, double *a, double *v, int cal_ev, double eps, int max_iter);
24 /**
25 * Transform a real symmetric matrix to a tridiagonal matrix
27 * @param n dimension
28 * @param q input matrix and transformation matrix ([n*n]; in & out)
29 * @param b diagonal ([n]; out)
30 * @param c subdiagonal ([n]; out)
32 void ke_core_strq(int n, double *q, double *b, double *c);
34 /**
35 * Compute eigenvalues and eigenvectors for a tridiagonal matrix
37 * @param n dimension
38 * @param b diagonal and eigenvalues on return ([n]; in & out)
39 * @param c subdiagonal ([n]; in)
40 * @param q transformation matrix and eigenvectors on return ([n*n]; in & out)
41 * @param cal_ev compute eigenvectors or not (faster without vectors)
42 * @param eps precision
43 * @param l max iterations
45 * @return 0 on success; KE_EXCESS_ITER if too many iterations
47 int ke_core_sstq(int n, double *b, double *c, double *q, int cal_ev, double eps, int l);
49 #ifdef __cplusplus
51 #endif
53 #endif