44 #ifndef ROL_EXPECTATIONQUADDEVIATION_HPP
45 #define ROL_EXPECTATIONQUADDEVIATION_HPP
91 Ptr<ExpectationQuad<Real>>
eq_;
119 const std::vector<Real> &xstat,
122 Real r =
eq_->error(val-xstat[0],0);
128 const std::vector<Real> &xstat,
131 Real r =
eq_->error(val-xstat[0],1);
132 if (std::abs(r) >= ROL_EPSILON<Real>()) {
141 const std::vector<Real> &vstat,
143 const std::vector<Real> &xstat,
146 Real r1 =
eq_->error(val-xstat[0],1);
147 Real r2 =
eq_->error(val-xstat[0],2);
148 if (std::abs(r2) >= ROL_EPSILON<Real>()) {
153 if (std::abs(r1) >= ROL_EPSILON<Real>()) {
160 const std::vector<Real> &xstat,
168 std::vector<Real> &gstat,
170 const std::vector<Real> &xstat,
179 std::vector<Real> &hvstat,
181 const std::vector<Real> &vstat,
183 const std::vector<Real> &xstat,
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)
void checkRegret(void)
Run derivative tests for the scalar regret function.
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 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.
Contains definitions of custom data types in ROL.
Ptr< Vector< Real > > dualVector_
Defines the linear algebra or vector space interface.
void sumAll(Real *input, Real *output, int dim) const
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 computeGradient(Vector< Real > &g, Objective< Real > &obj, const Vector< Real > &x, Real &tol)
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.
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...
Ptr< ExpectationQuad< Real > > eq_
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.
ExpectationQuadDeviation(const Ptr< ExpectationQuad< Real >> &eq)
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.