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,20 @@
#include "nr.h"
void NR::simp3(Mat_IO_DP &a, const int i1, const int k1, const int ip,
const int kp)
{
int ii,kk;
DP piv;
piv=1.0/a[ip][kp];
for (ii=0;ii<i1+1;ii++)
if (ii != ip) {
a[ii][kp] *= piv;
for (kk=0;kk<k1+1;kk++)
if (kk != kp)
a[ii][kk] -= a[ip][kk]*a[ii][kp];
}
for (kk=0;kk<k1+1;kk++)
if (kk != kp) a[ip][kk] *= -piv;
a[ip][kp]=piv;
}