ROL
Public Member Functions | Private Types | Private Attributes | List of all members
ROL::HouseholderReflector< Real > Class Template Reference

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>

+ Inheritance diagram for ROL::HouseholderReflector< Real >:

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 Vx_
 
const ROL::Ptr< const Vy_
 
ROL::Ptr< Vu_
 

Detailed Description

template<class Real>
class ROL::HouseholderReflector< Real >

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 75 of file ROL_HouseholderReflector.hpp.

Member Typedef Documentation

template<class Real>
typedef Vector<Real> ROL::HouseholderReflector< Real >::V
private

Definition at line 77 of file ROL_HouseholderReflector.hpp.

Constructor & Destructor Documentation

template<class Real>
ROL::HouseholderReflector< Real >::HouseholderReflector ( const ROL::Ptr< const Vector< Real > > &  x,
const ROL::Ptr< const Vector< Real > > &  y 
)
inline

Definition at line 88 of file ROL_HouseholderReflector.hpp.

template<class Real>
ROL::HouseholderReflector< Real >::HouseholderReflector ( const ROL::Ptr< const Vector< Real > > &  x,
const ROL::Ptr< const Vector< Real > > &  y,
ROL::Ptr< Vector< Real > > &  scratch 
)
inline

Definition at line 92 of file ROL_HouseholderReflector.hpp.

template<class Real>
ROL::HouseholderReflector< Real >::HouseholderReflector ( const ROL::Ptr< const Vector< Real > > &  x)
inline

Definition at line 96 of file ROL_HouseholderReflector.hpp.

template<class Real>
ROL::HouseholderReflector< Real >::HouseholderReflector ( const ROL::Ptr< const Vector< Real > > &  x,
ROL::Ptr< Vector< Real > > &  scratch 
)
inline

Definition at line 98 of file ROL_HouseholderReflector.hpp.

Member Function Documentation

template<class Real>
void ROL::HouseholderReflector< Real >::apply ( Vector< Real > &  Hv,
const Vector< Real > &  v,
Real &  tol 
) const
inlinevirtual

Apply linear operator.

This function applies the linear operator to a vector.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Implements ROL::LinearOperator< Real >.

Definition at line 103 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().

template<class Real>
void ROL::HouseholderReflector< Real >::applyInverse ( Vector< Real > &  Hv,
const Vector< Real > &  v,
Real &  tol 
) const
inlinevirtual

Apply inverse of linear operator.

This function applies the inverse of linear operator to a vector.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Reimplemented from ROL::LinearOperator< Real >.

Definition at line 121 of file ROL_HouseholderReflector.hpp.

References ROL::HouseholderReflector< Real >::apply().

Member Data Documentation

template<class Real>
const ROL::Ptr<const V> ROL::HouseholderReflector< Real >::x_
private
template<class Real>
const ROL::Ptr<const V> ROL::HouseholderReflector< Real >::y_
private
template<class Real>
ROL::Ptr<V> ROL::HouseholderReflector< Real >::u_
private

The documentation for this class was generated from the following file: