44 #ifndef ROL_EXPUTILITY_HPP
45 #define ROL_EXPUTILITY_HPP
86 ROL_TEST_FOR_EXCEPTION((
coeff_ <= zero), std::invalid_argument,
87 ">>> ERROR (ROL::EntropicRisk): Rate must be positive!");
110 ROL::ParameterList &list
111 = parlist.sublist(
"SOL").sublist(
"Risk Measure").sublist(
"Entropic Risk");
112 coeff_ = list.get<Real>(
"Rate");
118 const std::vector<Real> &xstat,
125 const std::vector<Real> &xstat,
129 return std::log(ev)/
coeff_;
134 const std::vector<Real> &xstat,
137 Real ev = std::exp(
coeff_*val);
144 std::vector<Real> &gstat,
146 const std::vector<Real> &xstat,
156 const std::vector<Real> &vstat,
158 const std::vector<Real> &xstat,
161 Real ev = std::exp(
coeff_*val);
172 std::vector<Real> &hvstat,
174 const std::vector<Real> &vstat,
176 const std::vector<Real> &xstat,
179 std::vector<Real> myval(2), val(2);
182 sampler.
sumAll(&myval[0],&val[0],2);
185 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.