10 #ifndef ROL_EXPECTATIONQUADREGRET_HPP
11 #define ROL_EXPECTATIONQUADREGRET_HPP
57 Ptr<ExpectationQuad<Real>>
eq_;
85 const std::vector<Real> &xstat,
93 const std::vector<Real> &xstat,
96 Real r =
eq_->regret(val,1);
97 if (std::abs(r) >= ROL_EPSILON<Real>()) {
105 const std::vector<Real> &vstat,
107 const std::vector<Real> &xstat,
110 Real r1 =
eq_->regret(val,1);
111 Real r2 =
eq_->regret(val,2);
112 if (std::abs(r2) >= ROL_EPSILON<Real>()) {
116 if (std::abs(r1) >= ROL_EPSILON<Real>()) {
123 const std::vector<Real> &xstat,
131 std::vector<Real> &gstat,
133 const std::vector<Real> &xstat,
139 std::vector<Real> &hvstat,
141 const std::vector<Real> &vstat,
143 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)
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)
Real getValue(const Vector< Real > &x, const std::vector< Real > &xstat, SampleGenerator< Real > &sampler)
Return risk measure value.
Ptr< Vector< Real > > hv_
Contains definitions of custom data types in ROL.
Ptr< Vector< Real > > dualVector_
Defines the linear algebra or vector space interface.
Provides a general interface for regret measures generated through the expectation risk quadrangle...
void sumAll(Real *input, Real *output, int dim) const
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< ExpectationQuad< Real > > eq_
void updateValue(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal storage for value computation.
void updateGradient(Objective< Real > &obj, const Vector< Real > &x, const std::vector< Real > &xstat, Real &tol)
Update internal risk measure storage for gradient computation.
ExpectationQuadRegret(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 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 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 checkRegret(void)
Run derivative tests for the scalar regret function.