ROL
|
Provides the interface to create a Householder reflector operator, that when applied to a vector x, produces a vector parallel to y. More...
#include <ROL_HouseholderReflector.hpp>
Public Member Functions | |
HouseholderReflector (const ROL::Ptr< const Vector< Real > > &x, const ROL::Ptr< const Vector< Real > > &y) | |
HouseholderReflector (const ROL::Ptr< const Vector< Real > > &x, const ROL::Ptr< const Vector< Real > > &y, ROL::Ptr< Vector< Real > > &scratch) | |
HouseholderReflector (const ROL::Ptr< const Vector< Real > > &x) | |
HouseholderReflector (const ROL::Ptr< const Vector< Real > > &x, ROL::Ptr< Vector< Real > > &scratch) | |
void | apply (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const |
Apply linear operator. More... | |
void | applyInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const |
Apply inverse of linear operator. More... | |
Public Member Functions inherited from ROL::LinearOperator< Real > | |
virtual | ~LinearOperator () |
virtual void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
Update linear operator. More... | |
virtual void | applyAdjoint (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const |
Apply adjoint of linear operator. More... | |
virtual void | applyAdjointInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const |
Apply adjoint of the inverse linear operator. More... | |
Private Types | |
typedef Vector< Real > | V |
Private Attributes | |
const ROL::Ptr< const V > | x_ |
const ROL::Ptr< const V > | y_ |
ROL::Ptr< V > | u_ |
Provides the interface to create a Householder reflector operator, that when applied to a vector x, produces a vector parallel to y.
Forms the linear operator H such that
\[ Hv = (I-2u\otimes u) x = \frac{||x||}{||y||} y \]
where
\[ \hat u = x + \sign(\langle x,u\rangle)\frac{||x||}{||y||}y,\quad u = \frac{\hat u}{||\hat u||} \]
If y is not specified, it is taken to be the first canonical vector
Definition at line 41 of file ROL_HouseholderReflector.hpp.
|
private |
Definition at line 43 of file ROL_HouseholderReflector.hpp.
|
inline |
Definition at line 54 of file ROL_HouseholderReflector.hpp.
|
inline |
Definition at line 58 of file ROL_HouseholderReflector.hpp.
|
inline |
Definition at line 62 of file ROL_HouseholderReflector.hpp.
|
inline |
Definition at line 64 of file ROL_HouseholderReflector.hpp.
|
inlinevirtual |
Apply linear operator.
This function applies the linear operator to a vector.
[out] | Hv | is the output vector. |
[in] | v | is the input vector. |
[in] | tol | is a tolerance for inexact linear operator application. |
Implements ROL::LinearOperator< Real >.
Definition at line 69 of file ROL_HouseholderReflector.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::set(), ROL::HouseholderReflector< Real >::u_, ROL::HouseholderReflector< Real >::x_, and ROL::HouseholderReflector< Real >::y_.
Referenced by ROL::HouseholderReflector< Real >::applyInverse(), and main().
|
inlinevirtual |
Apply inverse of linear operator.
This function applies the inverse of linear operator to a vector.
[out] | Hv | is the output vector. |
[in] | v | is the input vector. |
[in] | tol | is a tolerance for inexact linear operator application. |
Reimplemented from ROL::LinearOperator< Real >.
Definition at line 87 of file ROL_HouseholderReflector.hpp.
References ROL::HouseholderReflector< Real >::apply().
|
private |
Definition at line 47 of file ROL_HouseholderReflector.hpp.
Referenced by ROL::HouseholderReflector< Real >::apply().
|
private |
Definition at line 48 of file ROL_HouseholderReflector.hpp.
Referenced by ROL::HouseholderReflector< Real >::apply().
|
private |
Definition at line 50 of file ROL_HouseholderReflector.hpp.
Referenced by ROL::HouseholderReflector< Real >::apply().