ROL
ROL_LinearObjective.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Rapid Optimization Library (ROL) Package
4//
5// Copyright 2014 NTESS and the ROL contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef ROL_LINEAR_OBJECTIVE_H
11#define ROL_LINEAR_OBJECTIVE_H
12
13#include "ROL_Objective.hpp"
14#include "ROL_Vector.hpp"
15#include "ROL_Ptr.hpp"
16
30namespace ROL {
31
32template<typename Real>
33class LinearObjective : public Objective<Real> {
34private:
35 const Ptr<const Vector<Real>> cost_, dual_cost_;
36
37public:
38 LinearObjective(const Ptr<const Vector<Real>> &cost);
39
40 Real value( const Vector<Real> &x, Real &tol ) override;
41 void gradient( Vector<Real> &g, const Vector<Real> &x, Real &tol ) override;
42 void hessVec( Vector<Real> &hv, const Vector<Real> &v, const Vector<Real> &x, Real &tol ) override;
43
44}; // class LinearObjective
45
46} // namespace ROL
47
49
50#endif
Provides the interface to evaluate linear objective functions.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.
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 > > dual_cost_
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
const Ptr< const Vector< Real > > cost_
Provides the interface to evaluate objective functions.
Defines the linear algebra or vector space interface.