ROL
ROL_DescentDirection_U.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_DESCENTDIRECTION_U_H
11 #define ROL_DESCENTDIRECTION_U_H
12 
13 #include "ROL_Objective.hpp"
14 
21 namespace ROL {
22 
23 template <typename Real>
25 public:
26  virtual ~DescentDirection_U() {}
27 
28  virtual void initialize(const Vector<Real> &x, const Vector<Real> &g) {}
29 
30  virtual void compute( Vector<Real> &s, Real &snorm, Real &sdotg, int &iter, int &flag,
31  const Vector<Real> &x, const Vector<Real> &g, Objective<Real> &obj) = 0;
32 
33  virtual void update(const Vector<Real> &x, const Vector<Real> &s,
34  const Vector<Real> &gold, const Vector<Real> &gnew,
35  const Real snorm, const int iter) {}
36 
37  virtual std::string printName(void) const {
38  std::string name = "Undefined";
39  return name;
40  }
41 }; // class DescentDirection_U
42 } // namespace ROL
43 
44 #endif
Provides the interface to evaluate objective functions.
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
virtual std::string printName(void) const
virtual void initialize(const Vector< Real > &x, const Vector< Real > &g)
Provides the interface to compute unconstrained optimization steps for line search.
virtual void update(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &gold, const Vector< Real > &gnew, const Real snorm, const int iter)
virtual void compute(Vector< Real > &s, Real &snorm, Real &sdotg, int &iter, int &flag, const Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj)=0