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
16namespace ROL {
17
18template<typename Real>
20private:
21 int dim_;
22 Ptr<Vector<Real>> tmp_, p_, q_, y_, z_;
23 Real b_, cdot_;
24
28
29 Real atol_, rtol_;
32
39
40public:
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
59private:
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
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
void project(Vector< Real > &x, std::ostream &stream=std::cout) override
Real residual_1d(const Vector< Real > &x) const
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_con(Vector< Real > &x, const Vector< Real > &y) const
void residual_nd(Vector< Real > &r, const Vector< Real > &y) const
const Ptr< Constraint< Real > > con_
const Ptr< BoundConstraint< Real > > bnd_
Defines the linear algebra or vector space interface.