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,15 @@
#include "nr.h"
void NR::banmul(Mat_I_DP &a, const int m1, const int m2, Vec_I_DP &x,
Vec_O_DP &b)
{
int i,j,k,tmploop;
int n=a.nrows();
for (i=0;i<n;i++) {
k=i-m1;
tmploop=MIN(m1+m2+1,int(n-k));
b[i]=0.0;
for (j=MAX(0,-k);j<tmploop;j++) b[i] += a[i][j]*x[j+k];
}
}