ROL
ROL_DykstraProjection.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_DYKSTRAPROJECTION_H
11 #define ROL_DYKSTRAPROJECTION_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 
27 
28  Real atol_, rtol_;
30 
37 
38 public:
39 
40  DykstraProjection(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 
47  DykstraProjection(const Vector<Real> &xprim,
48  const Vector<Real> &xdual,
49  const Ptr<BoundConstraint<Real>> &bnd,
50  const Ptr<Constraint<Real>> &con,
51  const Vector<Real> &mul,
52  const Vector<Real> &res,
53  ParameterList &list);
54 
55  void project(Vector<Real> &x, std::ostream &stream = std::cout) override;
56 
57 private:
58 
59  Real residual_1d(const Vector<Real> &x) const;
60 
61  void residual_nd(Vector<Real> &r, const Vector<Real> &y) const;
62 
63  void project_bnd(Vector<Real> &x, const Vector<Real> &y) const;
64 
65  void project_con(Vector<Real> &x, const Vector<Real> &y) const;
66 
67  void project_Dykstra(Vector<Real> &x, std::ostream &stream = std::cout) const;
68 
69 }; // class DykstraProjection
70 
71 } // namespace ROL
72 
74 
75 #endif
Real residual_1d(const Vector< Real > &x) const
Ptr< Vector< Real > > q_
void project(Vector< Real > &x, std::ostream &stream=std::cout) override
Ptr< Vector< Real > > p_
void residual_nd(Vector< Real > &r, const Vector< Real > &y) const
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
Ptr< Vector< Real > > tmp_
void project_con(Vector< Real > &x, const Vector< Real > &y) const
Ptr< Vector< Real > > y_
void project_bnd(Vector< Real > &x, const Vector< Real > &y) const
Ptr< Vector< Real > > z_
Provides the interface to apply upper and lower bound constraints.
DykstraProjection(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 project_Dykstra(Vector< Real > &x, std::ostream &stream=std::cout) const
Defines the general constraint operator interface.