44 #ifndef ROL_EXPUTILITY_HPP
45 #define ROL_EXPUTILITY_HPP
54 Teuchos::RCP<Vector<Real> >
eg_;
77 void update(
const Real val,
const Real weight) {
82 Real ev = std::exp(val);
89 Real ev = std::exp(val);
94 this->
eg_->axpy(weight*ev*gv,g);
100 sampler.
sumAll(&val,&ev,1);
107 sampler.
sumAll(&val,&ev,1);
115 sampler.
sumAll(&val,&ev,1);
119 sampler.
sumAll(&gv,&egv,1);
123 Teuchos::RCP<Vector<Real> > g = hv.
clone();
130 g->scale(egv/(ev*ev));
Teuchos::RCP< Vector< Real > > eg_
virtual void scale(const Real alpha)=0
Compute where .
void reset(Teuchos::RCP< Vector< Real > > &x0, const Vector< Real > &x, Teuchos::RCP< Vector< Real > > &v0, const Vector< Real > &v)
virtual void plus(const Vector &x)=0
Compute , where .
void update(const Real val, const Vector< Real > &g, const Real weight)
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
Defines the linear algebra or vector space interface.
void sumAll(Real *input, Real *output, int dim) const
void reset(Teuchos::RCP< Vector< Real > > &x0, const Vector< Real > &x)
virtual void getHessVec(Vector< Real > &hv, SampleGenerator< Real > &sampler)
Real getValue(SampleGenerator< Real > &sampler)
void update(const Real val, const Real weight)
virtual void getGradient(Vector< Real > &g, SampleGenerator< Real > &sampler)
void update(const Real val, const Vector< Real > &g, const Real gv, const Vector< Real > &hv, const Real weight)