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
21namespace ROL {
22
23template <typename Real>
25public:
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 compute unconstrained optimization steps for line search.
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
virtual void initialize(const Vector< Real > &x, const Vector< Real > &g)
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 std::string printName(void) const
Provides the interface to evaluate objective functions.
Defines the linear algebra or vector space interface.