10 #ifndef ROL_SCALED_OBJECTIVE_DEF_HPP
11 #define ROL_SCALED_OBJECTIVE_DEF_HPP
15 template<
typename Real>
17 obj_->update(x,type,iter);
20 template<
typename Real>
23 obj_->setParameter(param);
26 template<
typename Real>
28 return scale_ *
obj_->value(x,tol);
31 template<
typename Real>
33 obj_->gradient(g,x,tol);
37 template<
typename Real>
39 obj_->hessVec(hv,v,x,tol);
43 template<
typename Real>
45 obj_->invHessVec(hv,v,x,tol);
46 hv.
scale(static_cast<Real>(1)/scale_);
49 template<
typename Real>
51 obj_->precond(Pv,v,x,tol);
52 Pv.
scale(static_cast<Real>(1)/scale_);
virtual void scale(const Real alpha)=0
Compute where .
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
void precond(Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply preconditioner to vector.
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update objective function.
void setParameter(const std::vector< Real > ¶m) override
Defines the linear algebra or vector space interface.
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply inverse Hessian approximation to vector.
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply Hessian approximation to vector.
virtual void setParameter(const std::vector< Real > ¶m)
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.