ROL
|
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_ |
Provides an interface for randomized sketching.
Definition at line 64 of file ROL_Sketch.hpp.
|
inlinevirtual |
Definition at line 287 of file ROL_Sketch.hpp.
|
inline |
Definition at line 289 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 86 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 113 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::k_, ROL::Sketch< Real >::orthIt_, and ROL::Sketch< Real >::orthTol_.
Referenced by ROL::Sketch< Real >::computeQ().
|
inlineprivate |
Definition at line 145 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 153 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::lapack_.
Referenced by ROL::Sketch< Real >::computeC().
|
inlineprivate |
Definition at line 173 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::lapack_, and zero.
Referenced by ROL::Sketch< Real >::computeC().
|
inlineprivate |
Definition at line 204 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().
|
inlineprivate |
Definition at line 245 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::C_, 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 >::Sketch(), and ROL::Sketch< Real >::update().
|
inline |
Definition at line 324 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::out_.
|
inline |
Definition at line 328 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 >::s_, ROL::Sketch< Real >::update(), ROL::Sketch< Real >::Upsilon_, ROL::Sketch< Real >::X_, ROL::Sketch< Real >::Y_, and ROL::Sketch< Real >::Z_.
Referenced by main().
|
inline |
Definition at line 358 of file ROL_Sketch.hpp.
References ROL::Sketch< Real >::flagC_, ROL::Sketch< Real >::flagP_, ROL::Sketch< Real >::flagQ_, and ROL::Sketch< Real >::reset().
Referenced by ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::test().
|
inline |
Definition at line 366 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 407 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 450 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 499 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 537 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 66 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 66 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 66 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 67 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 67 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 67 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 67 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 67 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 69 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 69 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 69 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::setRank(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 69 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::mgs2(), 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 69 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 71 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::mgs2().
|
private |
Definition at line 72 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::mgs2().
|
private |
Definition at line 74 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::computeC().
|
private |
Definition at line 76 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::computeP(), ROL::Sketch< Real >::lowRankApprox(), and ROL::Sketch< Real >::LSsolver().
|
private |
Definition at line 78 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeP(), and ROL::Sketch< Real >::update().
|
private |
Definition at line 78 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeQ(), and ROL::Sketch< Real >::update().
|
private |
Definition at line 78 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::advance(), ROL::Sketch< Real >::computeC(), and ROL::Sketch< Real >::update().
|
private |
Definition at line 80 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 82 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::reset(), and ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 83 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::Sketch().
|
private |
Definition at line 84 of file ROL_Sketch.hpp.
Referenced by ROL::Sketch< Real >::Sketch().