44 #ifndef ROL_COHERENTEXPUTILITY_HPP
45 #define ROL_COHERENTEXPUTILITY_HPP
98 const std::vector<Real> &xstat,
105 const std::vector<Real> &xstat,
109 return xstat[0]*std::log(ev);
114 const std::vector<Real> &xstat,
117 Real ev = std::exp(val/xstat[0]);
125 std::vector<Real> &gstat,
127 const std::vector<Real> &xstat,
131 std::vector<Real> myval(2,0), val(2,0);
134 sampler.
sumAll(&myval[0],&val[0],2);
138 gstat[0] = std::log(val[0]) - val[1]/(val[0]*xstat[0]);
143 const std::vector<Real> &vstat,
145 const std::vector<Real> &xstat,
148 Real ev = std::exp(val/xstat[0]);
165 std::vector<Real> &hvstat,
167 const std::vector<Real> &vstat,
169 const std::vector<Real> &xstat,
172 std::vector<Real> myval(5,0), val(5,0);
178 sampler.
sumAll(&myval[0],&val[0],5);
180 Real xs2 = xstat[0]*xstat[0];
181 Real xs3 = xs2*xstat[0];
182 Real v02 = val[0]*val[0];
183 Real h11 = (val[3]*val[0] - val[2]*val[2])/(v02*xs3) * vstat[0];
184 Real h12 = (val[1]*val[2] - val[4]*val[0])/(v02*xs2);
187 hv.
scale(one/val[0]);
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)
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Ptr< Vector< Real > > hv_
Ptr< Vector< Real > > dualVector_
Defines the linear algebra or vector space interface.
void sumAll(Real *input, Real *output, int dim) const
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
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 for the coherent entropic risk measure.
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.
CoherentEntropicRisk(void)
void updateValue(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal storage for value computation.
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...
void initialize(const Vector< Real > &x)
Initialize temporary variables.
void updateGradient(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for gradient computation.
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.
virtual void initialize(const Vector< Real > &x)
Initialize temporary variables.