mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
beginning to fold in HOD code with jeremy tinker's approval
This commit is contained in:
parent
d8108d3a8e
commit
44cd0eb71f
95 changed files with 21950 additions and 0 deletions
18
c_tools/hod/f1dim.c
Normal file
18
c_tools/hod/f1dim.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
#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
|
Loading…
Add table
Add a link
Reference in a new issue