1 #ifndef variogrammodels_h 2 #define variogrammodels_h 20 float range,
int size,
float* in,
float* out )
23 if ( type==
"exponential" )
25 for (
int idx=0; idx<size; idx++ )
26 out[idx] = (sill-nugget)*(1-exp(-3*in[idx]/range))+nugget;
28 else if ( type==
"gaussian" )
30 for (
int idx=0; idx<size; idx++ )
32 out[idx] = (sill-nugget)*
33 (1-exp(-3*((in[idx]*in[idx])/(range*range))))+
37 else if ( type==
"spherical" )
39 for (
int idx=0; idx<size; idx++ )
41 if ( in[idx] < range )
43 out[idx] = (sill-nugget)*(((3*in[idx])/(2*range))-
44 ((in[idx]*in[idx]*in[idx])/(2*range*range*range)))
OD::String that holds an existing text string.
Definition: fixedstring.h:29
void getVariogramModel(const char *typestr, float nugget, float sill, float range, int size, float *in, float *out)
Definition: variogrammodels.h:19