mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
18 lines
293 B
C
18 lines
293 B
C
#define NRANSI
|
|
#include "nrutil.h"
|
|
|
|
extern int ncom;
|
|
extern double *pcom,*xicom,(*nrfunc)(double []);
|
|
|
|
double f1dim(double x)
|
|
{
|
|
int j;
|
|
double f,*xt;
|
|
|
|
xt=dvector(1,ncom);
|
|
for (j=1;j<=ncom;j++) xt[j]=pcom[j]+x*xicom[j];
|
|
f=(*nrfunc)(xt);
|
|
free_dvector(xt,1,ncom);
|
|
return f;
|
|
}
|
|
#undef NRANSI
|