ROL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::Sketch< Real > Class Template Reference

Provides an interface for randomized sketching. More...

#include <ROL_Sketch.hpp>

Public Member Functions

virtual ~Sketch (void)
 
 Sketch (const Vector< Real > &x, const int ncol, const int rank, const Real orthTol=1e-8, const int orthIt=2, const bool truncate=false, const unsigned dom_seed=0, const unsigned rng_seed=0)
 
void setStream (Ptr< std::ostream > &out)
 
void setRank (const int rank)
 
void update (void)
 
int advance (const Real nu, Vector< Real > &h, const int col, const Real eta=1.0)
 
int reconstruct (Vector< Real > &a, const int col)
 
bool test (const int rank, std::ostream &outStream=std::cout, const int verbosity=0)
 

Private Member Functions

int computeP (void)
 
void mgs2 (std::vector< Ptr< Vector< Real >>> &Y) const
 
int computeQ (void)
 
int LSsolver (LA::Matrix< Real > &A, LA::Matrix< Real > &B, const bool trans=false) const
 
int lowRankApprox (LA::Matrix< Real > &A, const int r) const
 
int computeC (void)
 
void reset (void)
 
bool testQ (std::ostream &outStream=std::cout, const int verbosity=0)
 
bool testP (std::ostream &outStream=std::cout, const int verbosity=0)
 

Private Attributes

std::vector< Ptr< Vector< Real > > > Upsilon_
 
std::vector< Ptr< Vector< Real > > > Phi_
 
std::vector< Ptr< Vector< Real > > > Y_
 
LA::Matrix< Real > Omega_
 
LA::Matrix< Real > Psi_
 
LA::Matrix< Real > X_
 
LA::Matrix< Real > Z_
 
LA::Matrix< Real > C_
 
int maxRank_
 
int ncol_
 
int rank_
 
int k_
 
int s_
 
const Real orthTol_
 
const int orthIt_
 
const bool truncate_
 
LAPACK< int, Real > lapack_
 
bool flagP_
 
bool flagQ_
 
bool flagC_
 
Ptr< std::ostream > out_
 
Ptr< Elementwise::NormalRandom
< Real > > 
nrand_
 
Ptr< std::mt19937_64 > gen_
 
Ptr< std::normal_distribution
< Real > > 
dist_
 

Detailed Description

template<class Real>
class ROL::Sketch< Real >

Provides an interface for randomized sketching.


Definition at line 64 of file ROL_Sketch.hpp.

Constructor & Destructor Documentation

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

Definition at line 287 of file ROL_Sketch.hpp.

template<class Real>
ROL::Sketch< Real >::Sketch ( const Vector< Real > &  x,
const int  ncol,
const int  rank,
const Real  orthTol = 1e-8,
const int  orthIt = 2,
const bool  truncate = false,
const unsigned  dom_seed = 0,
const unsigned  rng_seed = 0 
)
inline

Member Function Documentation

template<class Real>
int ROL::Sketch< Real >::computeP ( void  )
inlineprivate
template<class Real>
void ROL::Sketch< Real >::mgs2 ( std::vector< Ptr< Vector< Real >>> &  Y) const
inlineprivate
template<class Real>
int ROL::Sketch< Real >::computeQ ( void  )
inlineprivate
template<class Real>
int ROL::Sketch< Real >::LSsolver ( LA::Matrix< Real > &  A,
LA::Matrix< Real > &  B,
const bool  trans = false 
) const
inlineprivate

Definition at line 153 of file ROL_Sketch.hpp.

References ROL::Sketch< Real >::lapack_.

Referenced by ROL::Sketch< Real >::computeC().

template<class Real>
int ROL::Sketch< Real >::lowRankApprox ( LA::Matrix< Real > &  A,
const int  r 
) const
inlineprivate

Definition at line 173 of file ROL_Sketch.hpp.

References ROL::Sketch< Real >::lapack_, and zero.

Referenced by ROL::Sketch< Real >::computeC().

template<class Real>
int ROL::Sketch< Real >::computeC ( void  )
inlineprivate
template<class Real>
void ROL::Sketch< Real >::reset ( void  )
inlineprivate
template<class Real>
void ROL::Sketch< Real >::setStream ( Ptr< std::ostream > &  out)
inline

Definition at line 324 of file ROL_Sketch.hpp.

References ROL::Sketch< Real >::out_.

template<class Real>
void ROL::Sketch< Real >::setRank ( const int  rank)
inline
template<class Real>
void ROL::Sketch< Real >::update ( void  )
inline
template<class Real>
int ROL::Sketch< Real >::advance ( const Real  nu,
Vector< Real > &  h,
const int  col,
const Real  eta = 1.0 
)
inline
template<class Real>
int ROL::Sketch< Real >::reconstruct ( Vector< Real > &  a,
const int  col 
)
inline
template<class Real>
bool ROL::Sketch< Real >::test ( const int  rank,
std::ostream &  outStream = std::cout,
const int  verbosity = 0 
)
inline
template<class Real>
bool ROL::Sketch< Real >::testQ ( std::ostream &  outStream = std::cout,
const int  verbosity = 0 
)
inlineprivate
template<class Real>
bool ROL::Sketch< Real >::testP ( std::ostream &  outStream = std::cout,
const int  verbosity = 0 
)
inlineprivate

Member Data Documentation

template<class Real>
std::vector<Ptr<Vector<Real> > > ROL::Sketch< Real >::Upsilon_
private
template<class Real>
std::vector<Ptr<Vector<Real> > > ROL::Sketch< Real >::Phi_
private
template<class Real>
std::vector<Ptr<Vector<Real> > > ROL::Sketch< Real >::Y_
private
template<class Real>
LA::Matrix<Real> ROL::Sketch< Real >::Omega_
private
template<class Real>
LA::Matrix<Real> ROL::Sketch< Real >::Psi_
private
template<class Real>
LA::Matrix<Real> ROL::Sketch< Real >::X_
private
template<class Real>
LA::Matrix<Real> ROL::Sketch< Real >::Z_
private
template<class Real>
LA::Matrix<Real> ROL::Sketch< Real >::C_
private
template<class Real>
int ROL::Sketch< Real >::maxRank_
private

Definition at line 69 of file ROL_Sketch.hpp.

Referenced by ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().

template<class Real>
int ROL::Sketch< Real >::ncol_
private
template<class Real>
int ROL::Sketch< Real >::rank_
private
template<class Real>
int ROL::Sketch< Real >::k_
private
template<class Real>
int ROL::Sketch< Real >::s_
private
template<class Real>
const Real ROL::Sketch< Real >::orthTol_
private

Definition at line 71 of file ROL_Sketch.hpp.

Referenced by ROL::Sketch< Real >::mgs2().

template<class Real>
const int ROL::Sketch< Real >::orthIt_
private

Definition at line 72 of file ROL_Sketch.hpp.

Referenced by ROL::Sketch< Real >::mgs2().

template<class Real>
const bool ROL::Sketch< Real >::truncate_
private

Definition at line 74 of file ROL_Sketch.hpp.

Referenced by ROL::Sketch< Real >::computeC().

template<class Real>
LAPACK<int,Real> ROL::Sketch< Real >::lapack_
private
template<class Real>
bool ROL::Sketch< Real >::flagP_
private
template<class Real>
bool ROL::Sketch< Real >::flagQ_
private
template<class Real>
bool ROL::Sketch< Real >::flagC_
private
template<class Real>
Ptr<std::ostream> ROL::Sketch< Real >::out_
private
template<class Real>
Ptr<Elementwise::NormalRandom<Real> > ROL::Sketch< Real >::nrand_
private

Definition at line 82 of file ROL_Sketch.hpp.

Referenced by ROL::Sketch< Real >::reset(), and ROL::Sketch< Real >::Sketch().

template<class Real>
Ptr<std::mt19937_64> ROL::Sketch< Real >::gen_
private

Definition at line 83 of file ROL_Sketch.hpp.

Referenced by ROL::Sketch< Real >::Sketch().

template<class Real>
Ptr<std::normal_distribution<Real> > ROL::Sketch< Real >::dist_
private

Definition at line 84 of file ROL_Sketch.hpp.

Referenced by ROL::Sketch< Real >::Sketch().


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