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, int ncol, int rank, Real orthTol=1e-8, int orthIt=2, bool truncate=false, unsigned dom_seed=0, unsigned rng_seed=0)
 
void setStream (Ptr< std::ostream > &out)
 
void reset (bool randomize=true)
 
void setRank (int rank)
 
void update (void)
 
int advance (Real nu, const Vector< Real > &h, int col, 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

void mgs2 (std::vector< Ptr< Vector< Real >>> &Y) const
 
int LSsolver (LA::Matrix< Real > &A, LA::Matrix< Real > &B, bool trans=false) const
 
int lowRankApprox (LA::Matrix< Real > &A, int r) const
 
int computeP (void)
 
int computeQ (void)
 
int computeC (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 > > > Y_
 
LA::Matrix< Real > X_
 
LA::Matrix< Real > Z_
 
LA::Matrix< Real > C_
 
std::vector< Ptr< Vector< Real > > > Upsilon_
 
std::vector< Ptr< Vector< Real > > > Phi_
 
LA::Matrix< Real > Omega_
 
LA::Matrix< Real > Psi_
 
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 65 of file ROL_Sketch.hpp.

Constructor & Destructor Documentation

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

Definition at line 243 of file ROL_Sketch.hpp.

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

Member Function Documentation

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

Definition at line 123 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,
int  r 
) const
inlineprivate

Definition at line 143 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 >::computeP ( void  )
inlineprivate
template<class Real>
int ROL::Sketch< Real >::computeQ ( void  )
inlineprivate
template<class Real>
int ROL::Sketch< Real >::computeC ( void  )
inlineprivate
template<class Real>
void ROL::Sketch< Real >::setStream ( Ptr< std::ostream > &  out)
inline

Definition at line 273 of file ROL_Sketch.hpp.

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

template<class Real>
void ROL::Sketch< Real >::reset ( bool  randomize = true)
inline
template<class Real>
void ROL::Sketch< Real >::setRank ( int  rank)
inline
template<class Real>
void ROL::Sketch< Real >::update ( void  )
inline

Definition at line 322 of file ROL_Sketch.hpp.

References ROL::Sketch< Real >::reset().

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

template<class Real>
int ROL::Sketch< Real >::advance ( Real  nu,
const Vector< Real > &  h,
int  col,
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 >::Y_
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>
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>
LA::Matrix<Real> ROL::Sketch< Real >::Omega_
private
template<class Real>
LA::Matrix<Real> ROL::Sketch< Real >::Psi_
private
template<class Real>
int ROL::Sketch< Real >::maxRank_
private

Definition at line 75 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 77 of file ROL_Sketch.hpp.

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

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

Definition at line 78 of file ROL_Sketch.hpp.

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

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

Definition at line 80 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 88 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 89 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 90 of file ROL_Sketch.hpp.

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


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