ROL
ROL_TypeP_SpectralGradientAlgorithm.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_TYPEP_SPECTRALGRADIENTALGORITHM_HPP
11#define ROL_TYPEP_SPECTRALGRADIENTALGORITHM_HPP
12
14
19namespace ROL {
20namespace TypeP {
21
22template<typename Real>
24private:
30
31 using TypeP::Algorithm<Real>::status_;
32 using TypeP::Algorithm<Real>::state_;
33 using TypeP::Algorithm<Real>::pgstep;
34
36 const Vector<Real> &g,
37 Objective<Real> &sobj,
38 Objective<Real> &nobj,
39 Vector<Real> &px,
40 Vector<Real> &dg,
41 std::ostream &outStream = std::cout);
42public:
43
44 SpectralGradientAlgorithm(ParameterList &list);
45
46 using TypeP::Algorithm<Real>::run;
47 void run( Vector<Real> &x,
48 const Vector<Real> &g,
49 Objective<Real> &sobj,
50 Objective<Real> &nobj,
51 std::ostream &outStream = std::cout) override;
52
53 void writeHeader( std::ostream& os ) const override;
54
55 void writeName( std::ostream& os ) const override;
56
57 void writeOutput( std::ostream& os, bool write_header = false ) const override;
58
59}; // class ROL::TypeP::SpectralGradientAlgorithm
60
61} // namespace TypeP
62} // namespace ROL
63
65
66#endif
Provides the interface to evaluate objective functions.
Provides an interface to run optimization algorithms to minimize composite optimization problems f+ph...
void pgstep(Vector< Real > &pgiter, Vector< Real > &pgstep, Objective< Real > &nobj, const Vector< Real > &x, const Vector< Real > &dg, Real t, Real &tol) const
const Ptr< AlgorithmState< Real > > state_
const Ptr< CombinedStatusTest< Real > > status_
Provides an interface to run the proximal gradient algorithm.
void writeOutput(std::ostream &os, bool write_header=false) const override
Print iterate status.
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &sobj, Objective< Real > &nobj, std::ostream &outStream=std::cout) override
Run algorithm on unconstrained problems (Type-U). This general interface supports the use of dual opt...
void writeName(std::ostream &os) const override
Print step name.
void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &sobj, Objective< Real > &nobj, Vector< Real > &px, Vector< Real > &dg, std::ostream &outStream=std::cout)
void writeHeader(std::ostream &os) const override
Print iterate header.
Defines the linear algebra or vector space interface.