10 #ifndef ROL_EXPECTATIONQUADRISK_HPP
11 #define ROL_EXPECTATIONQUADRISK_HPP
57 Ptr<ExpectationQuad<Real>>
eq_;
85 const std::vector<Real> &xstat,
88 Real r =
eq_->regret(val-xstat[0],0);
94 const std::vector<Real> &xstat,
97 Real r =
eq_->regret(val-xstat[0],1);
98 if (std::abs(r) >= ROL_EPSILON<Real>()) {
107 const std::vector<Real> &vstat,
109 const std::vector<Real> &xstat,
112 Real r1 =
eq_->regret(val-xstat[0],1);
113 Real r2 =
eq_->regret(val-xstat[0],2);
114 if (std::abs(r2) >= ROL_EPSILON<Real>()) {
119 if (std::abs(r1) >= ROL_EPSILON<Real>()) {
126 const std::vector<Real> &xstat,
135 std::vector<Real> &gstat,
137 const std::vector<Real> &xstat,
139 Real stat(0), one(1);
147 std::vector<Real> &hvstat,
149 const std::vector<Real> &vstat,
151 const std::vector<Real> &xstat,
Provides the interface to evaluate objective functions.
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.
void computeHessVec(Vector< Real > &hv, Objective< Real > &obj, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Provides a general interface for risk and error measures generated through the expectation risk quadr...
Real computeValue(Objective< Real > &obj, const Vector< Real > &x, Real &tol)
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.
Contains definitions of custom data types in ROL.
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.
Ptr< Vector< Real > > dualVector_
void updateGradient(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for gradient computation.
Defines the linear algebra or vector space interface.
void sumAll(Real *input, Real *output, int dim) const
void checkRegret(void)
Run derivative tests for the scalar regret function.
ExpectationQuadRisk(const Ptr< ExpectationQuad< Real >> &eq)
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.
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)
Ptr< ExpectationQuad< Real > > eq_
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...