10 #ifndef ROL_COHERENTEXPUTILITY_HPP
11 #define ROL_COHERENTEXPUTILITY_HPP
64 const std::vector<Real> &xstat,
71 const std::vector<Real> &xstat,
75 return xstat[0]*std::log(ev);
80 const std::vector<Real> &xstat,
83 Real ev = std::exp(val/xstat[0]);
91 std::vector<Real> &gstat,
93 const std::vector<Real> &xstat,
97 std::vector<Real> myval(2,0), val(2,0);
100 sampler.
sumAll(&myval[0],&val[0],2);
104 gstat[0] = std::log(val[0]) - val[1]/(val[0]*xstat[0]);
109 const std::vector<Real> &vstat,
111 const std::vector<Real> &xstat,
114 Real ev = std::exp(val/xstat[0]);
131 std::vector<Real> &hvstat,
133 const std::vector<Real> &vstat,
135 const std::vector<Real> &xstat,
138 std::vector<Real> myval(5,0), val(5,0);
144 sampler.
sumAll(&myval[0],&val[0],5);
146 Real xs2 = xstat[0]*xstat[0];
147 Real xs3 = xs2*xstat[0];
148 Real v02 = val[0]*val[0];
149 Real h11 = (val[3]*val[0] - val[2]*val[2])/(v02*xs3) * vstat[0];
150 Real h12 = (val[1]*val[2] - val[4]*val[0])/(v02*xs2);
153 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.