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,14 @@
void reverse(int iorder[], int ncity, int n[])
{
int nn,j,k,l,itmp;
nn=(1+((n[2]-n[1]+ncity) % ncity))/2;
for (j=1;j<=nn;j++) {
k=1 + ((n[1]+j-2) % ncity);
l=1 + ((n[2]-j+ncity) % ncity);
itmp=iorder[k];
iorder[k]=iorder[l];
iorder[l]=itmp;
}
}