24#ifndef quantlib_levy_flight_distribution_hpp
25#define quantlib_levy_flight_distribution_hpp
120 if(x <
xm_)
return 0.0;
127 template<
class Engine>
130 return xm_*pow(std::uniform_real_distribution<Real>(0.0, 1.0)(eng), -1.0/
alpha_);
136 template<
class Engine>
param_type(Real xm=1.0, Real alpha=1.0)
Real xm() const
Returns the xm parameter of the distribution.
Real alpha() const
Returns the alpha parameter of the distribution.
Levy Flight distribution.
param_type param() const
Returns the parameters of the distribution.
Real operator()(Real x) const
Returns the value of the pdf for x.
void param(const param_type &parm)
Sets the parameters of the distribution.
Real operator()(Engine &eng, const param_type &parm) const
Real operator()(Engine &eng) const
LevyFlightDistribution(const param_type &parm)
Constructs a LevyFlightDistribution from its parameters.
Real xm() const
Returns the xm parameter of the distribution.
LevyFlightDistribution(Real xm=1.0, Real alpha=1.0)
Real max BOOST_PREVENT_MACRO_SUBSTITUTION() const
Returns the largest value that the distribution can produce.
Real alpha() const
Returns the alpha parameter of the distribution.
Real min BOOST_PREVENT_MACRO_SUBSTITUTION() const
Returns the smallest value that the distribution can produce.
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified