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,26 @@
#include "nrutil.h"
void svbksb(u,w,v,m,n,b,x)
float **u,**v,b[],w[],x[];
int m,n;
{
int jj,j,i;
float s,*tmp;
tmp=vector(1,n);
for (j=1;j<=n;j++) {
s=0.0;
if (w[j]) {
for (i=1;i<=m;i++) s += u[i][j]*b[i];
s /= w[j];
}
tmp[j]=s;
}
for (j=1;j<=n;j++) {
s=0.0;
for (jj=1;jj<=n;jj++) s += v[j][jj]*tmp[jj];
x[j]=s;
}
free_vector(tmp,1,n);
}