ROL
|
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_ |
Provides an interface for randomized sketching.
Definition at line 31 of file ROL_Sketch.hpp.
|
inlinevirtual |
Definition at line 209 of file ROL_Sketch.hpp.
|
inline |
Definition at line 211 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::C_, ROL::Vector< Real >::clone(), ROL::Vector< Real >::dimension(), ROL::Sketch< Real >::dist_, ROL::Sketch< Real >::gen_, ROL::Sketch< Real >::k_, ROL::Sketch< Real >::maxRank_, ROL::Sketch< Real >::ncol_, ROL::Sketch< Real >::nrand_, ROL::Sketch< Real >::Omega_, ROL::Sketch< Real >::Phi_, ROL::Sketch< Real >::Psi_, ROL::Sketch< Real >::rank_, ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::s_, ROL::Sketch< Real >::Upsilon_, ROL::Sketch< Real >::X_, ROL::Sketch< Real >::Y_, and ROL::Sketch< Real >::Z_.
|
inlineprivate |
Definition at line 58 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::orthIt_, ROL::Sketch< Real >::orthTol_, and zero.
Referenced by ROL::Sketch< Real >::computeQ().
|
inlineprivate |
Definition at line 89 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::lapack_.
Referenced by ROL::Sketch< Real >::computeC().
|
inlineprivate |
Definition at line 109 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::lapack_, and zero.
Referenced by ROL::Sketch< Real >::computeC().
|
inlineprivate |
Definition at line 140 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::flagP_, ROL::Sketch< Real >::k_, ROL::Sketch< Real >::lapack_, ROL::Sketch< Real >::ncol_, and ROL::Sketch< Real >::X_.
Referenced by ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::reconstruct(), and ROL::Sketch< Real >::testP().
|
inlineprivate |
Definition at line 167 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::flagQ_, ROL::Sketch< Real >::mgs2(), and ROL::Sketch< Real >::Y_.
Referenced by ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::reconstruct(), and ROL::Sketch< Real >::testQ().
|
inlineprivate |
Definition at line 175 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::C_, ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::computeQ(), ROL::Sketch< Real >::flagC_, ROL::Sketch< Real >::k_, ROL::Sketch< Real >::lowRankApprox(), ROL::Sketch< Real >::LSsolver(), ROL::Sketch< Real >::ncol_, ROL::Sketch< Real >::Phi_, ROL::Sketch< Real >::Psi_, ROL::Sketch< Real >::rank_, ROL::Sketch< Real >::s_, ROL::Sketch< Real >::truncate_, ROL::Sketch< Real >::X_, ROL::Sketch< Real >::Y_, ROL::Sketch< Real >::Z_, and zero.
Referenced by ROL::Sketch< Real >::reconstruct().
|
inline |
Definition at line 239 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::out_.
|
inline |
Definition at line 243 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::C_, ROL::Sketch< Real >::flagC_, ROL::Sketch< Real >::flagP_, ROL::Sketch< Real >::flagQ_, ROL::Sketch< Real >::k_, ROL::Sketch< Real >::ncol_, ROL::Sketch< Real >::nrand_, ROL::Sketch< Real >::Omega_, ROL::Sketch< Real >::Phi_, ROL::Sketch< Real >::Psi_, ROL::Sketch< Real >::s_, ROL::Sketch< Real >::Upsilon_, ROL::Sketch< Real >::X_, ROL::Sketch< Real >::Y_, ROL::Sketch< Real >::Z_, and zero.
Referenced by ROL::Sketch< Real >::setRank(), ROL::Sketch< Real >::Sketch(), and ROL::Sketch< Real >::update().
|
inline |
Definition at line 260 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::C_, ROL::Sketch< Real >::k_, ROL::Sketch< Real >::maxRank_, ROL::Sketch< Real >::ncol_, ROL::Sketch< Real >::Omega_, ROL::Sketch< Real >::out_, ROL::Sketch< Real >::Phi_, ROL::Sketch< Real >::Psi_, ROL::Sketch< Real >::rank_, ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::s_, ROL::Sketch< Real >::Upsilon_, ROL::Sketch< Real >::X_, ROL::Sketch< Real >::Y_, and ROL::Sketch< Real >::Z_.
Referenced by main().
|
inline |
Definition at line 288 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::reset().
Referenced by ROL::Sketch< Real >::test().
|
inline |
Definition at line 292 of file ROL_Sketch.hpp.
References ROL::Vector< Real >::dot(), ROL::Sketch< Real >::flagC_, ROL::Sketch< Real >::flagP_, ROL::Sketch< Real >::flagQ_, ROL::Sketch< Real >::k_, ROL::Sketch< Real >::ncol_, ROL::Vector< Real >::norm(), ROL::Sketch< Real >::Omega_, ROL::Sketch< Real >::out_, ROL::Sketch< Real >::Phi_, ROL::Sketch< Real >::Psi_, ROL::Sketch< Real >::s_, ROL::Sketch< Real >::Upsilon_, ROL::Sketch< Real >::X_, ROL::Sketch< Real >::Y_, and ROL::Sketch< Real >::Z_.
Referenced by ROL::Sketch< Real >::test().
|
inline |
Definition at line 328 of file ROL_Sketch.hpp.
References ROL::Vector< Real >::axpy(), ROL::Sketch< Real >::C_, ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::computeQ(), ROL::Sketch< Real >::k_, ROL::Sketch< Real >::ncol_, ROL::Vector< Real >::norm(), ROL::Sketch< Real >::out_, ROL::Sketch< Real >::X_, ROL::Sketch< Real >::Y_, zero, and ROL::Vector< Real >::zero().
Referenced by ROL::Sketch< Real >::test().
|
inline |
Definition at line 360 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::ncol_, ROL::Sketch< Real >::reconstruct(), ROL::Sketch< Real >::testP(), ROL::Sketch< Real >::testQ(), ROL::Sketch< Real >::update(), and ROL::Sketch< Real >::Y_.
Referenced by main().
|
inlineprivate |
Definition at line 411 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::computeQ(), ROL::Sketch< Real >::k_, and ROL::Sketch< Real >::Y_.
Referenced by ROL::Sketch< Real >::test().
|
inlineprivate |
Definition at line 441 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::k_, ROL::Sketch< Real >::ncol_, ROL::Sketch< Real >::X_, and zero.
Referenced by ROL::Sketch< Real >::test().
|
private |
Definition at line 34 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::computeQ(), ROL::Sketch< Real >::reconstruct(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), ROL::Sketch< Real >::Sketch(), ROL::Sketch< Real >::test(), and ROL::Sketch< Real >::testQ().
|
private |
Definition at line 35 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::reconstruct(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), ROL::Sketch< Real >::Sketch(), and ROL::Sketch< Real >::testP().
|
private |
Definition at line 35 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 35 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::reconstruct(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 38 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 38 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 39 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 39 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 41 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 41 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::reconstruct(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), ROL::Sketch< Real >::Sketch(), ROL::Sketch< Real >::test(), and ROL::Sketch< Real >::testP().
|
private |
Definition at line 41 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 41 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::reconstruct(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), ROL::Sketch< Real >::Sketch(), ROL::Sketch< Real >::testP(), and ROL::Sketch< Real >::testQ().
|
private |
Definition at line 41 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::reset(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 43 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::mgs2().
|
private |
Definition at line 44 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::mgs2().
|
private |
Definition at line 46 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::computeC().
|
private |
Definition at line 48 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::lowRankApprox(), and ROL::Sketch< Real >::LSsolver().
|
private |
Definition at line 50 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeP(), and ROL::Sketch< Real >::reset().
|
private |
Definition at line 50 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeQ(), and ROL::Sketch< Real >::reset().
|
private |
Definition at line 50 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), and ROL::Sketch< Real >::reset().
|
private |
Definition at line 52 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::reconstruct(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::setStream().
|
private |
Definition at line 54 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::reset(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 55 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 56 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::Sketch().