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 "nrutil.h"
void mprove(a,alud,n,indx,b,x)
float **a,**alud,b[],x[];
int indx[],n;
{
void lubksb();
int j,i;
double sdp;
float *r;
r=vector(1,n);
for (i=1;i<=n;i++) {
sdp = -b[i];
for (j=1;j<=n;j++) sdp += a[i][j]*x[j];
r[i]=sdp;
}
lubksb(alud,n,indx,r);
for (i=1;i<=n;i++) x[i] -= r[i];
free_vector(r,1,n);
}