58 return 1.0 / (1.0 + sum_sq);
68 return std::make_unique<Distribution1DCauchySampler>(1 /
m_omega);
93 return std::exp(-sum_sq / 2.0);
103 return std::make_unique<Distribution1DGaussSampler>(0.0,
m_omega);
137 return std::make_unique<Distribution1DGateSampler>(-
m_omega,
m_omega);
162 return sincqw2 * sincqw2;
172 return std::make_unique<Distribution1DTriangleSampler>(
m_omega);
196 double qw = std::abs(q *
m_omega);
197 if (std::abs(1.0 - qw * qw /
M_PI /
M_PI) < std::numeric_limits<double>::epsilon())
209 return std::make_unique<Distribution1DCosineSampler>(
m_omega);
218 {
"FTDistribution1DVoigt",
220 {{
"Eta",
"",
"balances between Gauss (eta=0) and Cauchy (eta=1) limiting cases", -
INF,
240 return m_eta * std::exp(-sum_sq / 2.0) + (1.0 -
m_eta) * 1.0 / (1.0 + sum_sq);
252 std::ostringstream ostr;
253 ostr <<
"FTDistribution1DVoigt::createSampler() -> Error in class initialization";
254 ostr <<
"\n\n Has not been implemented yet...stay tuned!";
Defines many exception classes in namespace Exceptionss.
Defines interface class IFTDistribution1D, and children thereof.
NodeMeta nodeMetaUnion(const std::vector< ParaMeta > &base, const NodeMeta &other)
Defines M_PI and some more mathematical constants.
Defines namespace MathFunctions.
Exponential IFTDistribution1D exp(-|omega*x|); its Fourier transform evaluate(q) is a Cauchy-Lorentzi...
FTDistribution1DCauchy * clone() const override final
double qSecondDerivative() const override final
Returns the negative of the second order derivative in q space around q=0.
std::unique_ptr< IDistribution1DSampler > createSampler() const override final
FTDistribution1DCauchy(const std::vector< double > P)
double evaluate(double q) const override final
Returns Fourier transform of this distribution; is a decay function starting at evaluate(0)=1.
IFTDistribution1D consisting of one cosine wave [1+cos(pi*x/omega) if |x|<omega, and 0 otherwise]; it...
std::unique_ptr< IDistribution1DSampler > createSampler() const override final
FTDistribution1DCosine * clone() const override final
double evaluate(double q) const override final
Returns Fourier transform of this distribution; is a decay function starting at evaluate(0)=1.
FTDistribution1DCosine(const std::vector< double > P)
double qSecondDerivative() const override final
Returns the negative of the second order derivative in q space around q=0.
Square gate IFTDistribution1D; its Fourier transform evaluate(q) is a sinc function starting at evalu...
double evaluate(double q) const override final
Returns Fourier transform of this distribution; is a decay function starting at evaluate(0)=1.
double qSecondDerivative() const override final
Returns the negative of the second order derivative in q space around q=0.
FTDistribution1DGate(const std::vector< double > P)
std::unique_ptr< IDistribution1DSampler > createSampler() const override final
FTDistribution1DGate * clone() const override final
Gaussian IFTDistribution1D; its Fourier transform evaluate(q) is a Gaussian starting at evaluate(0)=1...
FTDistribution1DGauss(const std::vector< double > P)
FTDistribution1DGauss * clone() const override final
double qSecondDerivative() const override final
Returns the negative of the second order derivative in q space around q=0.
std::unique_ptr< IDistribution1DSampler > createSampler() const override final
double evaluate(double q) const override final
Returns Fourier transform of this distribution; is a decay function starting at evaluate(0)=1.
Triangle IFTDistribution1D [1-|x|/omega if |x|<omega, and 0 otherwise]; its Fourier transform evaluat...
FTDistribution1DTriangle * clone() const override final
FTDistribution1DTriangle(const std::vector< double > P)
double evaluate(double q) const override final
Returns Fourier transform of this distribution; is a decay function starting at evaluate(0)=1.
std::unique_ptr< IDistribution1DSampler > createSampler() const override final
double qSecondDerivative() const override final
Returns the negative of the second order derivative in q space around q=0.
IFTDistribution1D that provides a Fourier transform evaluate(q) in form of a pseudo-Voigt decay funct...
FTDistribution1DVoigt * clone() const override final
double evaluate(double q) const override final
Returns Fourier transform of this distribution; is a decay function starting at evaluate(0)=1.
double qSecondDerivative() const override final
Returns the negative of the second order derivative in q space around q=0.
FTDistribution1DVoigt(const std::vector< double > P)
std::unique_ptr< IDistribution1DSampler > createSampler() const override final
Interface for a one-dimensional distribution, with normalization adjusted so that the Fourier transfo...
IFTDistribution1D(const NodeMeta &meta, const std::vector< double > &PValues)
Base class for tree-like structures containing parameterized objects.
double sinc(double x)
sinc function:
const double CosineDistributionFactor