ROL
Public Member Functions | Private Types | Private Attributes | List of all members
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)
 Update linear operator. More...
 
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
 Apply linear operator. More...
 
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
 Apply adjoint of linear operator. More...
 
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
 Apply inverse of linear operator. More...
 
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
 Apply adjoint of the inverse linear operator. More...
 
virtual void applyAdjointInverse (std::vector< Real > &Hv, const std::vector< Real > &v, Real &tol) const
 
- Public Member Functions inherited from ROL::LinearOperator< Real >
virtual ~LinearOperator ()
 

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 65 of file ROL_StdLinearOperator.hpp.

Member Typedef Documentation

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

Definition at line 67 of file ROL_StdLinearOperator.hpp.

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

Definition at line 69 of file ROL_StdLinearOperator.hpp.

Constructor & Destructor Documentation

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

Definition at line 84 of file ROL_StdLinearOperator.hpp.

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

Definition at line 96 of file ROL_StdLinearOperator.hpp.

Member Function Documentation

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

Update linear operator.

This function updates the linear operator at new iterations.

Parameters
[in]xis the new iterate.
[in]flagis true if the iterate has changed.
[in]iteris the outer algorithm iterations count.

Reimplemented from ROL::LinearOperator< Real >.

Definition at line 99 of file ROL_StdLinearOperator.hpp.

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

Definition at line 104 of file ROL_StdLinearOperator.hpp.

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

Apply linear operator.

This function applies the linear operator to a vector.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Implements ROL::LinearOperator< Real >.

Definition at line 108 of file ROL_StdLinearOperator.hpp.

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

Apply adjoint of linear operator.

This function applies the adjoint of a linear operator to a vector. Default behavior assumes operator is self-adjoint.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Reimplemented from ROL::LinearOperator< Real >.

Definition at line 126 of file ROL_StdLinearOperator.hpp.

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

Apply inverse of linear operator.

This function applies the inverse of linear operator to a vector.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Reimplemented from ROL::LinearOperator< Real >.

Definition at line 146 of file ROL_StdLinearOperator.hpp.

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

Apply adjoint of the inverse linear operator.

This function applies the adjoint of the inverse linear operator to a vector. Default behavior assumes operator is self-adjoint.

Parameters
[out]Hvis the output vector.
[in]vis the input vector.
[in]tolis a tolerance for inexact linear operator application.

Reimplemented from ROL::LinearOperator< Real >.

Definition at line 183 of file ROL_StdLinearOperator.hpp.

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

Member Data Documentation

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

Definition at line 75 of file ROL_StdLinearOperator.hpp.

template<class Real >
vector ROL::StdLinearOperator< Real >::PLU_
mutableprivate
template<class Real >
std::vector<int> ROL::StdLinearOperator< Real >::ipiv_
mutableprivate
template<class Real >
ROL::LAPACK<int,Real> ROL::StdLinearOperator< Real >::lapack_
private

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