10 #ifndef ROL_SMOOTHEDPOE_HPP
11 #define ROL_SMOOTHEDPOE_HPP
52 const Real one(1), two(2);
55 Real ex = std::exp(-two*x/
eps_);
58 else if (deriv == 1) {
59 Real ex = std::exp(-two*x/
eps_);
60 val = (two/
eps_)*ex/std::pow(one+ex,2);
62 else if (deriv == 2) {
63 Real ex = std::exp(two*x/
eps_);
64 val = std::pow(two/
eps_,2)*ex*(one-ex)/std::pow(one+ex,3);
76 ROL::ParameterList &list = parlist.sublist(
"SOL").sublist(
"Probability").sublist(
"Smoothed POE");
78 eps_ = list.get<Real>(
"Smoothing Parameter");
83 const std::vector<Real> &xstat,
87 if ( std::abs(sp) > ROL_EPSILON<Real>() ) {
93 const std::vector<Real> &xstat,
102 const std::vector<Real> &xstat,
106 if ( std::abs(sp) > ROL_EPSILON<Real>() ) {
113 std::vector<Real> &gstat,
115 const std::vector<Real> &xstat,
122 const std::vector<Real> &vstat,
124 const std::vector<Real> &xstat,
129 if ( std::abs(sp1) > ROL_EPSILON<Real>() ) {
134 if ( std::abs(sp2) > ROL_EPSILON<Real>() ) {
142 std::vector<Real> &hvstat,
144 const std::vector<Real> &vstat,
146 const std::vector<Real> &xstat,
Provides the interface to evaluate objective functions.
void computeHessVec(Vector< Real > &hv, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Real computeValue(Objective< Real > &obj, const Vector< Real > &x, Real &tol)
void getGradient(Vector< Real > &g, std::vector< Real > &gstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure (sub)gradient.
Ptr< Vector< Real > > hv_
void updateValue(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal storage for value computation.
void updateHessVec(Objective< Real > &obj, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for Hessian-time-a-vector computation.
Ptr< Vector< Real > > dualVector_
Defines the linear algebra or vector space interface.
void sumAll(Real *input, Real *output, int dim) const
SmoothedPOE(ROL::ParameterList &parlist)
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.
void getHessVec(Vector< Real > &hv, std::vector< Real > &hvstat, const Vector< Real > &v, const std::vector< Real > &vstat, const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure Hessian-times-a-vector.
void computeGradient(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
Real smoothHeaviside(const Real x, const int deriv=0) const
SmoothedPOE(const Real threshold, const Real eps)
Real computeGradVec(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Provides the interface to implement any functional that maps a random variable to a (extended) real n...
void updateGradient(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for gradient computation.
Provides the implementation of the smoothed probability of exceedance.