10 #ifndef ROL_GUMBEL_HPP
11 #define ROL_GUMBEL_HPP
14 #include "ROL_ParameterList.hpp"
25 if (scale <= static_cast<Real>(0)) {
31 Gumbel(
const Real loc = 0.,
const Real scale = 1.)
36 Gumbel(ROL::ParameterList &parlist) {
37 loc_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Gumbel").get(
"Location",0.);
38 scale_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Gumbel").get(
"Scale",1.);
44 return std::exp(-(z+exp(-z)))/
scale_;
49 return std::exp(-std::exp(-z));
54 return static_cast<Real
>(0);
58 return loc_ -
scale_*std::log(-std::log(input));
62 Real val(0), gamma(0.57721566490153286);
67 Real pi(M_PI), six(6);
77 return ROL_NINF<Real>();
81 return ROL_INF<Real>();
84 void test(std::ostream &outStream = std::cout )
const {
86 std::vector<Real> X(size,0.);
87 std::vector<int> T(size,0);
88 X[0] =
loc_-4.0*(Real)rand()/(Real)RAND_MAX;
92 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)