44 #ifndef ROL_HOUSEHOLDERREFLECTOR_H 45 #define ROL_HOUSEHOLDERREFLECTOR_H 81 const Teuchos::RCP<const V>
x_;
82 const Teuchos::RCP<const V>
y_;
89 const Teuchos::RCP<
const Vector<Real> > &y) : x_(x), y_(y), u_(x->clone()) {}
94 Teuchos::RCP<
Vector<Real> > &scratch ) : x_(x), y_(y), u_(scratch) {}
99 Teuchos::RCP<
Vector<Real> > &scratch ) : x_(x), y_(x->basis(0)), u_(scratch) {}
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 void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
HouseholderReflector(const Teuchos::RCP< const Vector< Real > > &x, const Teuchos::RCP< const Vector< Real > > &y)
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
HouseholderReflector(const Teuchos::RCP< const Vector< Real > > &x, Teuchos::RCP< Vector< Real > > &scratch)
Defines the linear algebra or vector space interface.
HouseholderReflector(const Teuchos::RCP< const Vector< Real > > &x)
Provides the interface to create a Householder reflector operator, that when applied to a vector x...
const Teuchos::RCP< const V > y_
HouseholderReflector(const Teuchos::RCP< const Vector< Real > > &x, const Teuchos::RCP< const Vector< Real > > &y, Teuchos::RCP< Vector< Real > > &scratch)
const Teuchos::RCP< const V > x_
Provides the interface to apply a linear operator.
virtual void set(const Vector &x)
Set where .