ROL
ROL_ZeroProxObjective.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_ZEROPROXOBJECTIVE_HPP
11 #define ROL_ZEROPROXOBJECTIVE_HPP
12 
13 #include "ROL_ProxObjective.hpp"
14 
15 namespace ROL {
16 
17 template<typename Real>
18 class ZeroProxObjective : public ProxObjective<Real> {
19 public:
20 
21  Real value(const Vector<Real> x, Real &tol) override {
22  return static_cast<Real>(0);
23  }
24 
25  void gradient(Vector<Real> &g, const Vector<Real> &x, Real &tol) override {
26  g.zero();
27  }
28 
29  void prox(Vector<Real> &x, Real gamma) override {}
30 
31 };
32 
33 }
34 
35 #endif
virtual void zero()
Set to zero vector.
Definition: ROL_Vector.hpp:133
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
void prox(Vector< Real > &x, Real gamma) override
Real value(const Vector< Real > x, Real &tol) override
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.