36 complex<double>
cdgamma(complex<double> x);
45 double ellpk(
double x);
51 double expn(
int n,
double x);
56 double igam (
double a,
double x);
57 double igamc (
double a,
double x);
64 void bessel_k0_k1(
double x,
double* k0val,
double* k1val);
71 void bessel_i0_i1(
double x,
double* k0val,
double* k1val);
76 inline void sincos(
double x,
double* s,
double* c)
110 void spline_cubic_set(
long n,
const double t[],
const double y[],
double ypp[],
111 int ibcbeg,
double ybcbeg,
int ibcend,
double ybcend );
112 void spline_cubic_val(
long n,
const double t[],
double tval,
const double y[],
const double ypp[],
113 double *yval,
double *ypval,
double *yppval );
134 int ibcbeg = ( yp1 > 0.99999e30 ) ? 2 : 1;
135 double ybcbeg = ( yp1 > 0.99999e30 ) ? 0. : yp1;
136 int ibcend = ( ypn > 0.99999e30 ) ? 2 : 1;
137 double ybcend = ( ypn > 0.99999e30 ) ? 0. : ypn;
186 const double lo_bound =
MIN2(xa[0],xa[n-1]);
187 const double hi_bound =
MAX2(xa[0],xa[n-1]);
188 const double SAFETY =
MAX2(hi_bound-lo_bound,1.)*10.*DBL_EPSILON;
192 if( x < lo_bound-SAFETY )
195 *lgOutOfBounds =
true;
197 else if( x > hi_bound+SAFETY )
200 *lgOutOfBounds =
true;
205 *lgOutOfBounds =
false;
208 splint(xa,ya,y2a,n,xsafe,y);
226 const double lo_bound =
MIN2(xa[0],xa[n-1]);
227 const double hi_bound =
MAX2(xa[0],xa[n-1]);
228 const double SAFETY =
MAX2(fabs(lo_bound),fabs(hi_bound))*10.*DBL_EPSILON;
232 if( x < lo_bound-SAFETY )
235 *lgOutOfBounds =
true;
237 else if( x > hi_bound+SAFETY )
240 *lgOutOfBounds =
true;
245 *lgOutOfBounds =
false;
248 spldrv(xa,ya,y2a,n,xsafe,y);
273 long ilo = 0, ihi = n-1;
276 long imid = (ilo+ihi)/2;
310 long ilo = 0, ihi = n-1;
313 long imid = (ilo+ihi)/2;
314 if( xval <= x[imid] )
358 else if( xval >= x[n-1] )
363 T deriv = (y[ilo+1]-y[ilo])/(x[ilo+1]-x[ilo]);
364 yval = y[ilo] + deriv*(xval-x[ilo]);
392 void getrf_wrapper(
long M,
long N,
double *A,
long lda, int32 *ipiv, int32 *info);
405 void getrs_wrapper(
char trans,
long N,
long nrhs,
double *A,
long lda, int32 *ipiv,
double *B,
long ldb, int32 *info);
431 for(
int i=0; i < n; ++i )
444 return erfce(a)/SQRTPI;
448 static const unsigned int NMD5 = 32;
458 void MD5string(
const string& str, uint64 md5sum[2]);
461 void chbfit(
double a,
double b, vector<double>& c,
double (*func)(
double));
463 void svd(
const int nm,
const int m,
const int n,
double *a,
464 double *w,
bool matu,
double *u,
bool matv,
465 double *v,
int *ierr,
double *rv1);
468 double gegenbauer(
long n,
double al,
double x);
497 return ( J1 >= 0 && J2 >= 0 && J3 >= 0 &&
498 J1 >= abs(J2-J3) && J1 <= J2+J3 &&
503 double sjs(
long j1,
long j2,
long j3,
long l1,
long l2,
long l3);
505 double SixJFull(
long j1,
long j2,
long j3,
long j4,
long j5,
long j6);
508 void rec6j(
double *sixcof,
double l2,
double l3,
509 double l4,
double l5,
double l6,
double *l1min,
510 double *l1max,
double *lmatch,
long ndim,
long *ier);
529 for(
size_t i=0; i <
TRIESZ; i++ )
void bessel_i0_i1(double x, double *k0val, double *k1val)
Definition: thirdparty.cpp:2748
double bessel_i0(double x)
Definition: thirdparty.cpp:2664
double lfactorial(long n)
Definition: thirdparty.cpp:757
trieNode()
Definition: thirdparty.h:520
double SixJFull(long j1, long j2, long j3, long j4, long j5, long j6)
Definition: thirdparty.cpp:3330
T linint(const T x[], const T y[], long n, T xval)
Definition: thirdparty.h:347
void xoshiro256starstar_jump(uint64 &state0, uint64 &state1, uint64 &state2, uint64 &state3)
Definition: thirdparty.cpp:3811
double igam(double a, double x)
Definition: thirdparty.cpp:2128
void getrs_wrapper(char trans, long N, long nrhs, double *A, long lda, int32 *ipiv, double *B, long ldb, int32 *info)
Definition: thirdparty_lapack.cpp:69
double bessel_jn(int n, double x)
Definition: thirdparty.cpp:1400
double val() const
Definition: thirdparty.h:488
realnum FastVoigtH(realnum a, realnum v)
Definition: thirdparty.cpp:4027
T * get_ptr(T *v)
Definition: cddefines.h:1115
string MD5string(const string &str)
Definition: thirdparty.cpp:4437
void sincos(double x, double *s, double *c)
Definition: thirdparty.h:76
double m_x
Definition: thirdparty.h:476
bool linfit(long n, const double x[], const double y[], double &a, double &siga, double &b, double &sigb)
Definition: thirdparty.cpp:47
void spldrv_safe(const double xa[], const double ya[], const double y2a[], long int n, double x, double *y, bool *lgOutOfBounds)
Definition: thirdparty.h:216
void test_expn()
Definition: thirdparty.cpp:3210
double e1(double x)
Definition: thirdparty.cpp:3030
void spline_cubic_val(long n, const double t[], double tval, const double y[], const double ypp[], double *yval, double *ypval, double *yppval)
Definition: thirdparty_interpolate.cpp:328
bool Triangle2(long J1, long J2, long J3)
Definition: thirdparty.h:495
access_scheme
Definition: cpu.h:257
void spline_cubic_set(long n, const double t[], const double y[], double ypp[], int ibcbeg, double ybcbeg, int ibcend, double ybcend)
Definition: thirdparty_interpolate.cpp:105
double factorial(long n)
Definition: thirdparty.cpp:357
void spldrv(const double xa[], const double ya[], const double y2a[], long int n, double x, double *y)
Definition: thirdparty.h:161
long hunt_bisect_reverse(const T x[], long n, T xval)
Definition: thirdparty.h:305
double bessel_y0(double x)
Definition: thirdparty.cpp:1104
void chbfit(double a, double b, vector< double > &c, double(*func)(double))
Definition: thirdparty.cpp:3189
double m_c2
Definition: thirdparty.h:476
#define MIN2(a, b)
Definition: cddefines.h:807
static const int MXDSF
Definition: thirdparty.h:28
void splint(const double xa[], const double ya[], const double y2a[], long int n, double x, double *y)
Definition: thirdparty.h:150
long hunt_bisect(const T x[], long n, T xval)
Definition: thirdparty.h:268
string MD5file(const char *fnam, access_scheme scheme=AS_DEFAULT)
Definition: thirdparty.cpp:4331
static const int NPRE_FACTORIAL
Definition: thirdparty.h:25
double bessel_i1(double x)
Definition: thirdparty.cpp:2706
void svd(const int nm, const int m, const int n, double *a, double *w, bool matu, double *u, bool matv, double *v, int *ierr, double *rv1)
Definition: thirdparty.cpp:4669
size_t LevenshteinDistance(const string &s, const string &t)
Definition: thirdparty.cpp:5173
double bessel_yn(int n, double x)
Definition: thirdparty.cpp:1535
double VoigtU0(double a)
Definition: thirdparty.h:442
string MD5datafile(const char *fnam, access_scheme scheme=AS_DEFAULT)
Definition: thirdparty.cpp:4350
void xoroshiro128plus(uint64 *pool, size_t size, uint64 state[], size_t ns)
Definition: thirdparty.cpp:3712
void spline(const double x[], const double y[], long int n, double yp1, double ypn, double y2a[])
Definition: thirdparty.h:127
void getrf_wrapper(long M, long N, double *A, long lda, int32 *ipiv, int32 *info)
Definition: thirdparty_lapack.cpp:47
double VoigtH0(double a)
Definition: thirdparty.h:436
double erfce(double)
Definition: thirdparty.cpp:1975
void xoroshiro128plus_jump(uint64 &state0, uint64 &state1)
Definition: thirdparty.cpp:3738
double sjs(long j1, long j2, long j3, long l1, long l2, long l3)
Definition: thirdparty.cpp:3266
double bessel_j0(double x)
Definition: thirdparty.cpp:1066
float realnum
Definition: cddefines.h:127
double expn(int n, double x)
Definition: thirdparty.cpp:1757
#define NULL
Definition: cddefines.h:115
trieNode * child[TRIESZ]
Definition: thirdparty.h:518
double bessel_k1_scaled(double x)
Definition: thirdparty.cpp:2541
long m_n
Definition: thirdparty.h:475
double lagrange(const double x[], const double y[], long n, double xval)
Definition: thirdparty_interpolate.cpp:430
trieNode & operator=(const trieNode &)=delete
void humlik(int n, const realnum x[], realnum y, realnum k[])
Definition: thirdparty.cpp:4163
uint64 splitmix64(uint64 &state)
Definition: thirdparty.cpp:3870
static const double SAFETY
Definition: grains_qheat.cpp:54
Definition: thirdparty.h:516
Definition: thirdparty.h:473
void xoshiro256starstar(uint64 *pool, size_t size, uint64 state[], size_t ns)
Definition: thirdparty.cpp:3779
double dawson(double x)
Definition: thirdparty.cpp:3988
#define ASSERT(exp)
Definition: cddefines.h:637
complex< double > cdgamma(complex< double > x)
Definition: thirdparty.cpp:790
double igamc(double a, double x)
Definition: thirdparty.cpp:2083
void rec6j(double *sixcof, double l2, double l3, double l4, double l5, double l6, double *l1min, double *l1max, double *lmatch, long ndim, long *ier)
Definition: thirdparty.cpp:3380
void bessel_k0_k1_scaled(double x, double *k0val, double *k1val)
Definition: thirdparty.cpp:2592
double bessel_i1_scaled(double x)
Definition: thirdparty.cpp:2727
void VoigtU(realnum a, const realnum v[], realnum y[], int n)
Definition: thirdparty.h:428
void step()
Definition: thirdparty.h:480
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:730
double bessel_j1(double x)
Definition: thirdparty.cpp:1297
double m_c1
Definition: thirdparty.h:476
static const unsigned int NMD5
Definition: thirdparty.h:448
void splint_safe(const double xa[], const double ya[], const double y2a[], long int n, double x, double *y, bool *lgOutOfBounds)
Definition: thirdparty.h:176
double bessel_k0_scaled(double x)
Definition: thirdparty.cpp:2495
#define MAX2(a, b)
Definition: cddefines.h:828
double igamc_scaled(double a, double x)
Definition: thirdparty.cpp:2101
size_t findUniqueLen(trieNode *root, const string &token)
Definition: thirdparty.cpp:5153
size_t freq
Definition: thirdparty.h:519
double e2(double t)
Definition: thirdparty.cpp:3100
double bessel_i0_scaled(double x)
Definition: thirdparty.cpp:2685
double gegenbauer(long n, double al, double x)
Definition: thirdparty.cpp:3236
double bessel_k0(double x)
Definition: thirdparty.cpp:2472
double e1_scaled(double x)
Definition: thirdparty.cpp:3068
UltraGen(long a, double x)
Definition: thirdparty.h:478
long m_a
Definition: thirdparty.h:475
string MD5datastream(fstream &ioFile)
Definition: thirdparty.cpp:4360
void bessel_i0_i1_scaled(double x, double *k0val, double *k1val)
Definition: thirdparty.cpp:2775
void insertToken(trieNode *root, const string &token)
Definition: thirdparty.cpp:5129
~trieNode()
Definition: thirdparty.h:527
static const size_t TRIESZ
Definition: thirdparty.h:514
double bessel_k1(double x)
Definition: thirdparty.cpp:2518
double ellpk(double x)
Definition: thirdparty.cpp:1677
void VoigtH(realnum a, const realnum v[], realnum y[], int n)
Definition: thirdparty.h:415
void bessel_k0_k1(double x, double *k0val, double *k1val)
Definition: thirdparty.cpp:2564
double bessel_y1(double x)
Definition: thirdparty.cpp:1324