10 #ifndef ROL_HOUSEHOLDERREFLECTOR_H
11 #define ROL_HOUSEHOLDERREFLECTOR_H
47 const ROL::Ptr<const V>
x_;
48 const ROL::Ptr<const V>
y_;
71 Real xdoty =
x_->dot(*
y_);
72 Real xnorm =
x_->norm();
73 Real ynorm =
y_->norm();
74 Real sgn = xdoty/std::abs(xdoty);
76 Real alpha = sgn*xnorm/ynorm;
81 Real beta = -2.0*
u_->dot(v)/
u_->dot(*
u_);
95 #endif // ROL_HOUSEHOLDERREFLECTOR_H
HouseholderReflector(const ROL::Ptr< const Vector< Real > > &x)
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Defines the linear algebra or vector space interface.
Provides the interface to create a Householder reflector operator, that when applied to a vector x...
HouseholderReflector(const ROL::Ptr< const Vector< Real > > &x, const ROL::Ptr< const Vector< Real > > &y, ROL::Ptr< Vector< Real > > &scratch)
const ROL::Ptr< const V > x_
const ROL::Ptr< const V > y_
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
HouseholderReflector(const ROL::Ptr< const Vector< Real > > &x, ROL::Ptr< Vector< Real > > &scratch)
Provides the interface to apply a linear operator.
virtual void set(const Vector &x)
Set where .
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
HouseholderReflector(const ROL::Ptr< const Vector< Real > > &x, const ROL::Ptr< const Vector< Real > > &y)