ROL
ROL_IdentityOperator.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Rapid Optimization Library (ROL) Package
4//
5// Copyright 2014 NTESS and the ROL contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef ROL_IDENTITYOPERATOR_H
11#define ROL_IDENTITYOPERATOR_H
12
14
15
21namespace ROL {
22
23template<class Real>
24class IdentityOperator : public LinearOperator<Real> {
25
26 void apply( Vector<Real> &Hv, const Vector<Real> &v, Real &tol ) const {
27 Hv.set(v);
28 }
29
30 void applyInverse( Vector<Real> &Hv, const Vector<Real> &v, Real &tol ) const {
31 Hv.set(v);
32 }
33
34};
35
36} // namespace ROL
37
38
39
40
41#endif // ROL_NULLOPERATOR_H
42
Multiplication by unity.
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply inverse of linear operator.
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Apply linear operator.
Provides the interface to apply a linear operator.
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .