ROL
ROL_DaiFletcherProjection.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_DAIFLETCHERPROJECTION_H
11#define ROL_DAIFLETCHERPROJECTION_H
12
14#include "ROL_ParameterList.hpp"
15
16namespace ROL {
17
18template<typename Real>
20private:
21 int dim_;
22 Ptr<Vector<Real>> xnew_, Px_;
24
27
30
31 Real ctol_;
32
39
40 void initialize(const Vector<Real> &xprim,
41 const Vector<Real> &xdual,
42 const Ptr<BoundConstraint<Real>> &bnd,
43 const Ptr<Constraint<Real>> &con,
44 const Vector<Real> &mul,
45 const Vector<Real> &res);
46
47public:
48
50 const Vector<Real> &xdual,
51 const Ptr<BoundConstraint<Real>> &bnd,
52 const Ptr<Constraint<Real>> &con,
53 const Vector<Real> &mul,
54 const Vector<Real> &res);
55
57 const Vector<Real> &xdual,
58 const Ptr<BoundConstraint<Real>> &bnd,
59 const Ptr<Constraint<Real>> &con,
60 const Vector<Real> &mul,
61 const Vector<Real> &res,
62 ParameterList &list);
63
64 void project(Vector<Real> &x, std::ostream &stream = std::cout) override;
65
66private:
67
68 Real residual(const Vector<Real> &x) const;
69
70 void update_primal(Vector<Real> &y, const Vector<Real> &x, const Real lam) const;
71
72 void project_df(Vector<Real> &x, Real &lam, Real &dlam, std::ostream &stream = std::cout) const;
73
74}; // class DaiFletcherProjection
75
76} // namespace ROL
77
79
80#endif
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
void project_df(Vector< Real > &x, Real &lam, Real &dlam, std::ostream &stream=std::cout) const
void project(Vector< Real > &x, std::ostream &stream=std::cout) override
Real residual(const Vector< Real > &x) const
void initialize(const Vector< Real > &xprim, const Vector< Real > &xdual, const Ptr< BoundConstraint< Real > > &bnd, const Ptr< Constraint< Real > > &con, const Vector< Real > &mul, const Vector< Real > &res)
void update_primal(Vector< Real > &y, const Vector< Real > &x, const Real lam) const
const Ptr< Constraint< Real > > con_
const Ptr< BoundConstraint< Real > > bnd_
Defines the linear algebra or vector space interface.