23 #ifndef ATBDATASYNTHESIS_HH 24 #define ATBDATASYNTHESIS_HH 84 inline double gaussian(
double x,
double mu,
double sigma)
86 if (sigma == 0.0)
return (x == mu) ? 1.0 : 0.0;
87 return std::exp(-0.5 * (x - mu) * (x - mu) / (sigma * sigma)) /
88 (std::sqrt(2.0 * M_PI) * sigma);
113 if (d < 0)
return 0.0;
114 if (d == 0)
return 1.0;
115 if (d == 1)
return 1.0 / (sigma * sigma) * x;
143 return ((d % 2 == 0) ? 1.0 : -1.0) *
172 template<
typename DataT,
int Dim>
173 void gaussian(blitz::Array<DataT,Dim>& gauss,
174 blitz::TinyVector<double,Dim>
const &sigmaUm,
175 blitz::TinyVector<double,Dim>
const &elementSizeUm,
176 int flags = DEFAULT);
200 template<
typename DataT,
int Dim>
202 blitz::TinyVector<double,Dim>
const &sigmaUm,
203 int flags = DEFAULT);
234 template<
typename DataT,
int Dim>
236 blitz::TinyVector<double,Dim>
const &sigmaUm,
237 blitz::TinyVector<double,Dim>
const &elementSizeUm,
238 blitz::TinyVector<int,Dim>
const &d,
239 int flags = DEFAULT);
267 template<
typename DataT,
int Dim>
269 blitz::TinyVector<double,Dim>
const &sigmaUm,
270 blitz::TinyVector<int,Dim>
const &d,
271 int flags = DEFAULT);
275 #include "ATBDataSynthesis.icc" Array class derived from blitz++ Arrays for handling microscopic datasets with associated element siz...
double normalizedHermitePolynomial(double x, double sigma, int d)
Evaluate the normalized Hermite polynomial at position x.
The Array class is an extension to the blitz++ Array class providing additional parameters element si...
double erfbase(const double x, ErrorFunctionType type=Erf)
General evaluation of erf, erfc and erfcx, where erf is the error function given as: ...
double gaussianDerivative(double x, double mu, double sigma, int d)
Evaluate the Gaussian derivative of degree d with mean mu and standard deviation sigma at position x...
double gaussian(double x, double mu, double sigma)
Evaluate the Gaussian distribution with mean mu and standard deviation sigma at position x...