44 #ifndef ROL_GUMBEL_HPP
45 #define ROL_GUMBEL_HPP
48 #include "ROL_ParameterList.hpp"
59 if (scale <= static_cast<Real>(0)) {
65 Gumbel(
const Real loc = 0.,
const Real scale = 1.)
70 Gumbel(ROL::ParameterList &parlist) {
71 loc_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Gumbel").get(
"Location",0.);
72 scale_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Gumbel").get(
"Scale",1.);
78 return std::exp(-(z+exp(-z)))/
scale_;
83 return std::exp(-std::exp(-z));
88 return static_cast<Real
>(0);
92 return loc_ -
scale_*std::log(-std::log(input));
96 Real val(0), gamma(0.57721566490153286);
101 Real pi(M_PI), six(6);
111 return ROL_NINF<Real>();
115 return ROL_INF<Real>();
118 void test(std::ostream &outStream = std::cout )
const {
120 std::vector<Real> X(size,0.);
121 std::vector<int> T(size,0);
122 X[0] =
loc_-4.0*(Real)rand()/(Real)RAND_MAX;
126 X[2] =
loc_+4.0*(Real)rand()/(Real)RAND_MAX;
Real lowerBound(void) const
Gumbel(const Real loc=0., const Real scale=1.)
Real evaluateCDF(const Real input) const
Real integrateCDF(const Real input) const
Real invertCDF(const Real input) const
virtual void test(std::ostream &outStream=std::cout) const
Real evaluatePDF(const Real input) const
Real moment(const size_t m) const
void checkInputs(const Real loc, const Real scale) const
void test(std::ostream &outStream=std::cout) const
Real upperBound(void) const
Gumbel(ROL::ParameterList &parlist)