gstlearn
1.0.0
CCC
|
#include <GibbsMMulti.hpp>
Public Member Functions | |
GibbsMMulti () | |
GibbsMMulti (Db *db, Model *model) | |
GibbsMMulti (const GibbsMMulti &r) | |
GibbsMMulti & | operator= (const GibbsMMulti &r) |
virtual | ~GibbsMMulti () |
void | update (VectorVectorDouble &y, int isimu, int ipgs, int iter) override |
int | covmatAlloc (bool verbose, bool verboseTimer=false) override |
void | setEps (double eps) |
void | setStoreTables (bool storeTables) |
void | cleanup () override |
bool | getFlagStoreInternal () const |
void | setFlagStoreInternal (bool flagStoreInternal) |
Public Member Functions inherited from GibbsMulti | |
GibbsMulti () | |
GibbsMulti (Db *db, Model *model) | |
GibbsMulti (const GibbsMulti &r) | |
GibbsMulti & | operator= (const GibbsMulti &r) |
virtual | ~GibbsMulti () |
int | calculInitialize (VectorVectorDouble &y, int isimu, int ipgs) |
double | getSimulate (VectorVectorDouble &y, double yk, double sk, int ipgs, int ivar, int iact, int iter) |
int | checkGibbs (const VectorVectorDouble &y, int isimu, int ipgs) |
Model * | getModel () const |
Public Member Functions inherited from AGibbs | |
AGibbs () | |
AGibbs (Db *db) | |
AGibbs (Db *db, int npgs, int nvar, int nburn, int niter, int seed, int flag_order, bool flag_decay) | |
AGibbs (const AGibbs &r) | |
AGibbs & | operator= (const AGibbs &r) |
virtual | ~AGibbs () |
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
virtual int | run (VectorVectorDouble &y, int ipgs=0, int isimu=0, bool verbose=false, bool flagCheck=false) |
void | init (int npgs, int nvar, int nburn, int niter, int seed=3241, int flag_order=0, bool flag_decay=true) |
void | getBoundsDecay (int iter, double *vmin, double *vmax) const |
int | getNvar () const |
void | setNvar (int nvar) |
int | getNpgs () const |
void | setNpgs (int npgs) |
int | getNburn () const |
void | setNburn (int nburn) |
int | getNiter () const |
void | setNiter (int niter) |
int | getFlagOrder () const |
void | setFlagOrder (int flagOrder) |
bool | getOptionStats () const |
void | setOptionStats (int option_stats) |
Db * | getDb () const |
int | getDimension () const |
int | getRank (int ipgs, int ivar) const |
VectorVectorDouble | allocY () const |
void | storeResult (const VectorVectorDouble &y, int isimu, int ipgs) |
int | getSampleNumber () const |
int | getSampleRankNumber () const |
int | getSampleRank (int i) const |
VectorInt | calculateSampleRanks () const |
void | updateStats (const VectorVectorDouble &y, int ipgs, int iter, double amort=0.9) |
bool | isConstraintTight (int ipgs, int ivar, int iact, double *value) const |
void | statsInit () |
bool | getFlagDecay () const |
int | getRelativeRank (int iech) |
Public Member Functions inherited from AStringable | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (const AStringable &r) |
virtual | ~AStringable () |
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
virtual void | display (int level) const final |
Private Member Functions | |
int | _getVariableNumber () const |
void | _tableStore (int mode, const cs *Cmat) |
void | _getWeights (int iact0) const |
int | _calculateWeights (int iact0, double tol=EPSILON3) const |
int | _storeAllWeights (bool verbose=false) |
int | _getSizeOfWeights (const VectorDouble &weights) const |
void | _getEstimate (int ipgs0, int ivar0, int iact0, int icase, VectorVectorDouble &y, double *yk, double *vark) const |
Private Attributes | |
cs * | _Ln |
VectorInt | _Pn |
double | _eps |
bool | _storeTables |
HDF5format | _hdf5 |
bool | _flagStoreInternal |
VectorDouble | _b |
VectorDouble | _x |
VectorDouble | _weights |
VectorVectorDouble | _areas |
Additional Inherited Members | |
Protected Member Functions inherited from AGibbs | |
int | _boundsCheck (int ipgs, int ivar, int iact, double *vmin, double *vmax) |
void | _printInequalities (int iact, int ivar, double simval, double vmin, double vmax) const |
int | _getRowNumberStats () const |
int | _getColNumberStats () const |
int | _getColRankStats (int ipgs, int ivar, int mode) const |
void | _displayCurrentVector (bool flag_init, const VectorVectorDouble &y, int isimu, int ipgs) const |
const int * | _getRanks () const |
GibbsMMulti::GibbsMMulti | ( | ) |
GibbsMMulti::GibbsMMulti | ( | const GibbsMMulti & | r | ) |
|
virtual |
|
private |
Calculate the set of (multivariate) weights for one given sample
iact0 | Rank of the sample |
tol | Tolerance below which weights are set to 0 |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Reimplemented from AGibbs.
|
overridevirtual |
Establish the covariance matrix for Gibbs
[in] | verbose | Verbose flag |
[in] | verboseTimer | True to show elapse times |
Implements AGibbs.
|
inline |
GibbsMMulti & GibbsMMulti::operator= | ( | const GibbsMMulti & | r | ) |
|
inline |
void GibbsMMulti::setFlagStoreInternal | ( | bool | flagStoreInternal | ) |
|
inline |
|
overridevirtual |
Perform one update of the Gibbs sampler
[in] | y | Gaussian Vector |
[in] | isimu | Rank of the simulation |
[in] | ipgs | Rank of the GS |
[in] | iter | Rank of the iteration |
Implements AGibbs.
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |