// dgbsv.cc // 実帯行列の線形方程式を解く #include extern "C" { void dgbsv_ ( const int& N, const int& KL, const int& KU, const int& NRHS, double** AB, const int& LDAB, int* IPIV, double** B, const int& LDB, int& INFO ); }; // 実 3重 帯称行列 A の線形方程式 A x = b を解く簡易関数 // Input: A[3][N], b[N] Output: x[N] // A[1][N] に対角成分、A[0][N] に上副対角成分、A[2][N] に下副対角成分 // template int dgbsv3( double A[3][N], double x[N], double b[N] ) { int i, j, info; static int ipiv[N]; static double AB[N][N]; for( j=0; j int dgbsv5( double A[5][N], double x[N], double b[N] ) { int i, j, info; static int ipiv[N]; static double AB[N][N]; for( j=0; j