void gauss(double a[][NDIM],f[],int n)(ただしNDIM は定数) |
DO 1 K=I+1,N 1 A(J,K)=A(J,K)-AA*A(I,K) |
for (k=i+1;k<n;k++) a[j][k] -= aa * a[i][k]; |
DO 3 I=1,N-1 DO 2 J=I+1,N AA=A(J,I)/A(I,I) DO 1 K=I+1,N 1 A(J,K)=A(J,K)-AA*A(I,K) F(J)=F(J)-AA*F(I) 2 CONTINUE 3 CONTINUE |
for (i=0;i<n-1;i++) { for (j=i+1;j<n;j++) { aa = a[j][i] / a[i][i]; for (k=i+1;k<N;k++) a[j][k] -= aa * a[i][k]; f[j] -= aa * f[i]; } } |
桂田 祐史