10 #ifndef ROL_RISKMEASURE_HPP
11 #define ROL_RISKMEASURE_HPP
66 ROL::Ptr<Vector<Real> >
g_;
67 ROL::Ptr<Vector<Real> >
hv_;
103 x0 = ROL::constPtrCast<Vector<Real> >(
107 g_ = (x0->dual()).clone();
108 hv_ = (x0->dual()).clone();
135 v0 = ROL::constPtrCast<Vector<Real> >(
146 virtual void update(
const Real val,
const Real weight) {
147 val_ += weight * val;
180 hv_->axpy(weight,hv);
virtual void getHessVec(Vector< Real > &hv, SampleGenerator< Real > &sampler)
Return risk measure Hessian-times-a-vector.
virtual Real getValue(SampleGenerator< Real > &sampler)
Return risk measure value.
ROL::Ptr< Vector< Real > > hv_
virtual void getGradient(Vector< Real > &g, SampleGenerator< Real > &sampler)
Return risk measure (sub)gradient.
Defines the linear algebra or vector space interface.
void sumAll(Real *input, Real *output, int dim) const
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
int getComponent(void) const
ROL::Ptr< Vector< Real > > dualVector_
virtual void reset(ROL::Ptr< Vector< Real > > &x0, const Vector< Real > &x)
Reset internal risk measure storage. Called for value and gradient computation.
ROL::Ptr< Vector< Real > > g_
void setRiskVectorInfo(const int comp, const int index)
virtual void update(const Real val, const Vector< Real > &g, const Real gv, const Vector< Real > &hv, const Real weight)
Update internal risk measure storage for Hessian-time-a-vector computation.
virtual void reset(ROL::Ptr< Vector< Real > > &x0, const Vector< Real > &x, ROL::Ptr< Vector< Real > > &v0, const Vector< Real > &v)
Reset internal risk measure storage. Called for Hessian-times-a-vector computation.
virtual void update(const Real val, const Real weight)
Update internal risk measure storage for value computation.
virtual void update(const Real val, const Vector< Real > &g, const Real weight)
Update internal risk measure storage for gradient computation.
Provides the interface to implement risk measures.