ROL
ROL_TypeB_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_TYPEB_SPECTRALGRADIENTALGORITHM_HPP
11#define ROL_TYPEB_SPECTRALGRADIENTALGORITHM_HPP
12
14
19namespace ROL {
20namespace TypeB {
21
22template<typename Real>
24private:
29
30 using TypeB::Algorithm<Real>::status_;
31 using TypeB::Algorithm<Real>::state_;
32 using TypeB::Algorithm<Real>::proj_;
33
35 const Vector<Real> &g,
36 Objective<Real> &obj,
38 std::ostream &outStream = std::cout);
39
40public:
41
42 SpectralGradientAlgorithm(ParameterList &list);
43
44 using TypeB::Algorithm<Real>::run;
45 void run( Vector<Real> &x,
46 const Vector<Real> &g,
47 Objective<Real> &obj,
49 std::ostream &outStream = std::cout) override;
50
51 void writeHeader( std::ostream& os ) const override;
52
53 void writeName( std::ostream &os ) const override;
54
55 void writeOutput( std::ostream &os, const bool write_header = false ) const override;
56
57}; // class ROL::TypeB::SpectralGradientAlgorithm
58
59} // namespace TypeB
60} // namespace ROL
61
63
64#endif
Provides the interface to apply upper and lower bound constraints.
Provides the interface to evaluate objective functions.
Provides an interface to run bound constrained optimization algorithms.
Ptr< PolyhedralProjection< Real > > proj_
const Ptr< AlgorithmState< Real > > state_
const Ptr< CombinedStatusTest< Real > > status_
Provides an interface to run the spectral projected gradient algorithm.
void writeHeader(std::ostream &os) const override
Print iterate header.
void initialize(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout)
void writeName(std::ostream &os) const override
Print step name.
void writeOutput(std::ostream &os, const bool write_header=false) const override
Print iterate status.
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, std::ostream &outStream=std::cout) override
Run algorithm on bound constrained problems (Type-B). This general interface supports the use of dual...
Defines the linear algebra or vector space interface.