10 #ifndef ROL_EXPONENTIAL_HPP
11 #define ROL_EXPONENTIAL_HPP
14 #include "ROL_ParameterList.hpp"
25 if ( k == 0 || m == 0 || m == 1 ) {
29 for (
size_t i = m-k; i < m; i++) {
37 :
loc_(loc),
scale_((scale>0.) ? scale : 1.) {}
40 loc_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Exponential").get(
"Location",0.);
41 scale_ = parlist.sublist(
"SOL").sublist(
"Distribution").sublist(
"Exponential").get(
"Scale",1.);
54 return ((input >=
loc_) ?
59 return -std::log(1.-input)/
scale_;
63 Real val = 0., coeff = 0.;
64 for (
size_t i = 0; i < m+1; i++) {
66 val += coeff*std::pow(
loc_,(Real)(m-i))/std::pow(
scale_,(Real)i);
76 return ROL_INF<Real>();
79 void test(std::ostream &outStream = std::cout )
const {
81 std::vector<Real> X(size,0.);
82 std::vector<int> T(size,0);
83 X[0] =
loc_-4.0*(Real)rand()/(Real)RAND_MAX;
87 X[2] =
loc_+4.0*(Real)rand()/(Real)RAND_MAX;
Real integrateCDF(const Real input) const
Exponential(ROL::ParameterList &parlist)
Real invertCDF(const Real input) const
Real upperBound(void) const
Real evaluatePDF(const Real input) const
Real evaluateCDF(const Real input) const
size_t compute_coeff(const size_t m, const size_t k) const
Real moment(const size_t m) const
virtual void test(std::ostream &outStream=std::cout) const
Exponential(const Real loc=0., const Real scale=1.)
Real lowerBound(void) const
void test(std::ostream &outStream=std::cout) const