60 pdf->
cd.
v[0] = sqrt(cd.
m[0][0]);
61 pdf->
cd.
v[1] = sqrt(cd.
m[1][1]);
62 pdf->
cd.
v[2] = sqrt(cd.
m[2][2]);
112 for (i = 0; i < 3; i++)
118 for (i = 0; i < 3; i++)
120 x.
v[i] = pdf->
x.
v[i];
121 for (j = 0; j < 3; j++)
122 x.
v[i] += pdf->
cr.
m[i][j] * r.
v[j];
138 do { r = drand48(); }
while (r==0.0);
140 do { r = drand48(); }
while (r==0.0);
143 }
while(w > 1.0 || w==0.0);
145 return(sigma * x2 * sqrt(-2.0*log(w)/w));
void pf_pdf_gaussian_free(pf_pdf_gaussian_t *pdf)
double pf_ran_gaussian(double sigma)
pf_vector_t pf_pdf_gaussian_sample(pf_pdf_gaussian_t *pdf)
pf_pdf_gaussian_t * pf_pdf_gaussian_alloc(pf_vector_t x, pf_matrix_t cx)
static unsigned int pf_pdf_seed
TFSIMD_FORCE_INLINE const tfScalar & x() const
TFSIMD_FORCE_INLINE const tfScalar & w() const
void pf_matrix_unitary(pf_matrix_t *r, pf_matrix_t *d, pf_matrix_t a)