10 #ifndef ROL_EXPUTILITY_HPP
11 #define ROL_EXPUTILITY_HPP
52 ROL_TEST_FOR_EXCEPTION((
coeff_ <= zero), std::invalid_argument,
53 ">>> ERROR (ROL::EntropicRisk): Rate must be positive!");
76 ROL::ParameterList &list
77 = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"Entropic Risk");
78 coeff_ = list.get<Real>(
"Rate");
84 const std::vector<Real> &xstat,
91 const std::vector<Real> &xstat,
95 return std::log(ev)/
coeff_;
100 const std::vector<Real> &xstat,
103 Real ev = std::exp(
coeff_*val);
110 std::vector<Real> &gstat,
112 const std::vector<Real> &xstat,
122 const std::vector<Real> &vstat,
124 const std::vector<Real> &xstat,
127 Real ev = std::exp(
coeff_*val);
138 std::vector<Real> &hvstat,
140 const std::vector<Real> &vstat,
142 const std::vector<Real> &xstat,
145 std::vector<Real> myval(2), val(2);
148 sampler.
sumAll(&myval[0],&val[0],2);
151 hv.
scale(one/val[0]);
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.
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)
virtual void scale(const Real alpha)=0
Compute where .
Real computeValue(Objective< Real > &obj, const Vector< Real > &x, Real &tol)
void updateGradient(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for gradient computation.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Ptr< Vector< Real > > hv_
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 > > dualVector_
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 updateValue(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal storage for value computation.
Defines the linear algebra or vector space interface.
EntropicRisk(const Real coeff=1)
Constructor.
void sumAll(Real *input, Real *output, int dim) const
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
void checkInputs(void) const
Provides an interface for the entropic risk.
void computeGradient(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
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...
EntropicRisk(ROL::ParameterList &parlist)
Constructor.
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.