# eig.h

    00001 #ifndef EIG_H__
    00002 #define EIG_H__
    00003
    00004 #include <matrices.h>
    00005 #include <valarray>
    00006
    00007 namespace eo {
    00008 /* ========================================================= */
    00009 /*
    00010    Calculating eigenvalues and vectors.
    00011    Input:
    00012      N: dimension.
    00013      C: lower_triangular NxN-matrix.
    00014      niter: number of maximal iterations for QL-Algorithm.
    00015    Output:
    00016      diag: N eigenvalues.
    00017      Q: Columns are normalized eigenvectors.
    00018      return: number of iterations in QL-Algorithm.
    00019  */
    00020 extern int eig( int N,  const lower_triangular_matrix& C, std::valarray<double>& diag, square_matrix& Q,
    00021        int niter = 0);
    00022
    00023 } // namespace eo
    00024
    00025 #endif