ROL
ROL_DouglasRachfordProjection.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_DOUGLASRACHFORDPROJECTION_H
11 #define ROL_DOUGLASRACHFORDPROJECTION_H
12 
14 #include "ROL_ParameterList.hpp"
15 
16 namespace ROL {
17 
18 template<typename Real>
20 private:
21  int dim_;
22  Ptr<Vector<Real>> tmp_, p_, q_, y_, z_;
23  Real b_, cdot_;
24 
28 
29  Real atol_, rtol_;
32 
39 
40 public:
41 
43  const Vector<Real> &xdual,
44  const Ptr<BoundConstraint<Real>> &bnd,
45  const Ptr<Constraint<Real>> &con,
46  const Vector<Real> &mul,
47  const Vector<Real> &res);
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  ParameterList &list);
56 
57  void project(Vector<Real> &x, std::ostream &stream = std::cout) override;
58 
59 private:
60 
61  Real residual_1d(const Vector<Real> &x) const;
62 
63  void residual_nd(Vector<Real> &r, const Vector<Real> &y) const;
64 
65  void project_bnd(Vector<Real> &x, const Vector<Real> &y) const;
66 
67  void project_con(Vector<Real> &x, const Vector<Real> &y) const;
68 
69  void project_DouglasRachford(Vector<Real> &x, std::ostream &stream = std::cout) const;
70 
71 }; // class DouglasRachfordProjection
72 
73 } // namespace ROL
74 
76 
77 #endif
void project_DouglasRachford(Vector< Real > &x, std::ostream &stream=std::cout) const
void project_bnd(Vector< Real > &x, const Vector< Real > &y) const
void project(Vector< Real > &x, std::ostream &stream=std::cout) override
DouglasRachfordProjection(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)
Real residual_1d(const Vector< Real > &x) const
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
void residual_nd(Vector< Real > &r, const Vector< Real > &y) const
void project_con(Vector< Real > &x, const Vector< Real > &y) const
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.