10 #ifndef ROL_LINEAR_OBJECTIVE_DEF_H
11 #define ROL_LINEAR_OBJECTIVE_DEF_H
15 template<
typename Real>
21 template<
typename Real>
23 return x.
dot(*dual_cost_);
26 template<
typename Real>
31 template<
typename Real>
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.
const Ptr< const Vector< Real > > dual_cost_
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
virtual Real dot(const Vector &x) const =0
Compute where .
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply Hessian approximation to vector.
const Ptr< const Vector< Real > > cost_
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
virtual void set(const Vector &x)
Set where .
LinearObjective(const Ptr< const Vector< Real >> &cost)