add numerical recipes library

This commit is contained in:
2025-09-12 18:55:25 +09:00
parent d4dff245bd
commit 2c75620ec9
1344 changed files with 63869 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#include "nr.h"
void NR::red(const int iz1, const int iz2, const int jz1, const int jz2,
const int jm1, const int jm2, const int jmf, const int ic1,
const int jc1, const int jcf, const int kc, Mat3D_I_DP &c,
Mat_IO_DP &s)
{
int loff,l,j,ic,i;
DP vx;
loff=jc1-jm1;
ic=ic1;
for (j=jz1;j<jz2;j++) {
for (l=jm1;l<jm2;l++) {
vx=c[ic][l+loff][kc-1];
for (i=iz1;i<iz2;i++) s[i][l] -= s[i][j]*vx;
}
vx=c[ic][jcf][kc-1];
for (i=iz1;i<iz2;i++) s[i][jmf] -= s[i][j]*vx;
ic += 1;
}
}