// dsbev.cc // 実帯行列の固有値方程式を解く #include extern "C" { void dsbev_ ( const char& JOBZ, const char& UPLO, const int& N, const int& KD, double** AB, const int& LDAB, double* W, double** Z, const int& LDZ, double* WORK, int& INFO, int JOBZlen, int UPLOlen ); }; // 実対称3重帯行列 H の固有値方程式 H x = E x を解く簡易関数 // Input: H[2][N], Output: U[N][N], E[N] // H[0][N] に対角成分、H[1][N] 下副対角成分 // U^\dagger H U が対角行列となる // template int dsbev3( double H[2][N], double U[N][N], double E[N] ) { int i, j, info; static double work[4*N]; static double AB[N][N]; for( j=0; j int dsbev5( double H[3][N], double U[N][N], double E[N] ) { int i, j, info; static double work[4*N]; static double AB[N][N]; for( j=0; j