44 #ifndef ROL_HOUSEHOLDERREFLECTOR_H
45 #define ROL_HOUSEHOLDERREFLECTOR_H
81 const ROL::Ptr<const V>
x_;
82 const ROL::Ptr<const V>
y_;
105 Real xdoty =
x_->dot(*
y_);
106 Real xnorm =
x_->norm();
107 Real ynorm =
y_->norm();
108 Real sgn = xdoty/std::abs(xdoty);
110 Real alpha = sgn*xnorm/ynorm;
115 Real beta = -2.0*
u_->dot(v)/
u_->dot(*
u_);
129 #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)