4 #define KE_EXCESS_ITER (-1)
11 * Compute eigenvalues/vectors for a dense symmetric matrix
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
);
25 * Transform a real symmetric matrix to a tridiagonal matrix
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
);
35 * Compute eigenvalues and eigenvectors for a tridiagonal matrix
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
);