ROL
ROL::StdLinearOperator< Real > Class Template Reference

Provides the std::vector implementation to apply a linear operator, which is a std::vector representation of column-stacked matrix. More...

#include <ROL_StdLinearOperator.hpp>

Inheritance diagram for ROL::StdLinearOperator< Real >:

Public Member Functions

 StdLinearOperator ()
 StdLinearOperator (ROL::Ptr< std::vector< Real > > &A)
virtual ~StdLinearOperator ()
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
virtual void update (const std::vector< Real > &x, bool flag=true, int iter=-1)
void apply (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
virtual void apply (std::vector< Real > &Hv, const std::vector< Real > &v, Real &tol) const
void applyAdjoint (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
virtual void applyAdjoint (std::vector< Real > &Hv, const std::vector< Real > &v, Real &tol) const
void applyInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
virtual void applyInverse (std::vector< Real > &Hv, const std::vector< Real > &v, Real &tol) const
void applyAdjointInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
virtual void applyAdjointInverse (std::vector< Real > &Hv, const std::vector< Real > &v, Real &tol) const
Public Member Functions inherited from ROL::ROL::LinearOperator< Real >
virtual ~LinearOperator ()
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update linear operator.
virtual void apply (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const =0
 Apply linear operator.
virtual void applyInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
 Apply inverse of linear operator.
virtual void applyAdjoint (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
 Apply adjoint of linear operator.
virtual void applyAdjointInverse (Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
 Apply adjoint of the inverse linear operator.

Private Types

typedef StdVector< Real > SV
typedef std::vector< Real > vector

Private Attributes

ROL::Ptr< std::vector< Real > > A_
int N_
int INFO_
vector PLU_
std::vector< int > ipiv_
ROL::LAPACK< int, Real > lapack_

Detailed Description

template<class Real>
class ROL::StdLinearOperator< Real >

Provides the std::vector implementation to apply a linear operator, which is a std::vector representation of column-stacked matrix.

Currently, this interface requires that the underlying matrix be square

Definition at line 31 of file ROL_StdLinearOperator.hpp.

Member Typedef Documentation

◆ SV

template<class Real>
typedef StdVector<Real> ROL::StdLinearOperator< Real >::SV
private

Definition at line 33 of file ROL_StdLinearOperator.hpp.

◆ vector

template<class Real>
typedef std::vector<Real> ROL::StdLinearOperator< Real >::vector
private

Definition at line 35 of file ROL_StdLinearOperator.hpp.

Constructor & Destructor Documentation

◆ StdLinearOperator() [1/2]

template<class Real>
ROL::StdLinearOperator< Real >::StdLinearOperator ( )
inline

◆ StdLinearOperator() [2/2]

template<class Real>
ROL::StdLinearOperator< Real >::StdLinearOperator ( ROL::Ptr< std::vector< Real > > & A)
inline

Definition at line 52 of file ROL_StdLinearOperator.hpp.

References A_, ipiv_, and N_.

◆ ~StdLinearOperator()

template<class Real>
virtual ROL::StdLinearOperator< Real >::~StdLinearOperator ( )
inlinevirtual

Definition at line 62 of file ROL_StdLinearOperator.hpp.

Member Function Documentation

◆ update() [1/2]

template<class Real>
void ROL::StdLinearOperator< Real >::update ( const Vector< Real > & x,
bool flag = true,
int iter = -1 )
inline

Definition at line 65 of file ROL_StdLinearOperator.hpp.

References update().

Referenced by update().

◆ update() [2/2]

template<class Real>
virtual void ROL::StdLinearOperator< Real >::update ( const std::vector< Real > & x,
bool flag = true,
int iter = -1 )
inlinevirtual

Definition at line 70 of file ROL_StdLinearOperator.hpp.

◆ apply() [1/2]

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

Definition at line 74 of file ROL_StdLinearOperator.hpp.

References apply().

Referenced by apply().

◆ apply() [2/2]

template<class Real>
virtual void ROL::StdLinearOperator< Real >::apply ( std::vector< Real > & Hv,
const std::vector< Real > & v,
Real & tol ) const
inlinevirtual

Definition at line 81 of file ROL_StdLinearOperator.hpp.

References A_, and N_.

◆ applyAdjoint() [1/2]

template<class Real>
void ROL::StdLinearOperator< Real >::applyAdjoint ( Vector< Real > & Hv,
const Vector< Real > & v,
Real & tol ) const
inline

Definition at line 92 of file ROL_StdLinearOperator.hpp.

References applyAdjoint().

Referenced by applyAdjoint().

◆ applyAdjoint() [2/2]

template<class Real>
virtual void ROL::StdLinearOperator< Real >::applyAdjoint ( std::vector< Real > & Hv,
const std::vector< Real > & v,
Real & tol ) const
inlinevirtual

Definition at line 99 of file ROL_StdLinearOperator.hpp.

References A_, and N_.

◆ applyInverse() [1/2]

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

Definition at line 112 of file ROL_StdLinearOperator.hpp.

References applyInverse().

Referenced by applyInverse().

◆ applyInverse() [2/2]

template<class Real>
virtual void ROL::StdLinearOperator< Real >::applyInverse ( std::vector< Real > & Hv,
const std::vector< Real > & v,
Real & tol ) const
inlinevirtual

Definition at line 119 of file ROL_StdLinearOperator.hpp.

References A_, ipiv_, lapack_, N_, and PLU_.

◆ applyAdjointInverse() [1/2]

template<class Real>
void ROL::StdLinearOperator< Real >::applyAdjointInverse ( Vector< Real > & Hv,
const Vector< Real > & v,
Real & tol ) const
inline

Definition at line 149 of file ROL_StdLinearOperator.hpp.

References applyAdjointInverse().

Referenced by applyAdjointInverse().

◆ applyAdjointInverse() [2/2]

template<class Real>
virtual void ROL::StdLinearOperator< Real >::applyAdjointInverse ( std::vector< Real > & Hv,
const std::vector< Real > & v,
Real & tol ) const
inlinevirtual

Definition at line 156 of file ROL_StdLinearOperator.hpp.

References A_, ipiv_, lapack_, N_, and PLU_.

Member Data Documentation

◆ A_

template<class Real>
ROL::Ptr<std::vector<Real> > ROL::StdLinearOperator< Real >::A_
private

◆ N_

template<class Real>
int ROL::StdLinearOperator< Real >::N_
private

◆ INFO_

template<class Real>
int ROL::StdLinearOperator< Real >::INFO_
private

Definition at line 41 of file ROL_StdLinearOperator.hpp.

◆ PLU_

template<class Real>
vector ROL::StdLinearOperator< Real >::PLU_
mutableprivate

Definition at line 43 of file ROL_StdLinearOperator.hpp.

Referenced by applyAdjointInverse(), and applyInverse().

◆ ipiv_

template<class Real>
std::vector<int> ROL::StdLinearOperator< Real >::ipiv_
mutableprivate

Definition at line 44 of file ROL_StdLinearOperator.hpp.

Referenced by applyAdjointInverse(), applyInverse(), and StdLinearOperator().

◆ lapack_

template<class Real>
ROL::LAPACK<int,Real> ROL::StdLinearOperator< Real >::lapack_
private

Definition at line 46 of file ROL_StdLinearOperator.hpp.

Referenced by applyAdjointInverse(), and applyInverse().


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