|
gstlearn
1.0.0
CCC
|
#include <AGibbs.hpp>
Public Member Functions | |
| 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 | calculInitialize (VectorVectorDouble &y, int isimu, int ipgs)=0 |
| virtual void | update (VectorVectorDouble &y, int isimu, int ipgs, int iter)=0 |
| virtual int | covmatAlloc (bool verbose, bool verboseTimer=false)=0 |
| virtual double | getSimulate (VectorVectorDouble &y, double yk, double sk, int ipgs, int ivar, int iact, int iter)=0 |
| virtual int | checkGibbs (const VectorVectorDouble &y, int isimu, int ipgs)=0 |
| virtual int | run (VectorVectorDouble &y, int ipgs=0, int isimu=0, bool verbose=false, bool flagCheck=false) |
| virtual void | cleanup () |
| 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 |
Protected Member Functions | |
| 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 |
Private Attributes | |
| int | _npgs |
| int | _nvar |
| int | _nburn |
| int | _niter |
| int | _flagOrder |
| bool | _flagDecay |
| int | _optionStats |
| VectorInt | _ranks |
| Db * | _db |
| Table | _stats |
| AGibbs::AGibbs | ( | ) |
| AGibbs::AGibbs | ( | Db * | db | ) |
| AGibbs::AGibbs | ( | Db * | db, |
| int | npgs, | ||
| int | nvar, | ||
| int | nburn, | ||
| int | niter, | ||
| int | seed, | ||
| int | flag_order, | ||
| bool | flag_decay | ||
| ) |
| AGibbs::AGibbs | ( | const AGibbs & | r | ) |
|
virtual |
|
protected |
Correct the bounds according to the order relationship
| [in] | ipgs | Rank of the GS |
| [in] | ivar | Rank of the variable |
| [in] | iact | Internal Rank of the sample |
| [out] | vmin_arg | Output minimum bound |
| [out] | vmax_arg | Output maximum bound |
|
protected |
Print the initial status for Gibbs iterations
| [in] | flag_init | TRUE for the Initial printout |
| [in] | y | Gaussian vector |
| [in] | isimu | Rank of the simulation |
| [in] | ipgs | Rank of the GS |
|
protected |
Returns the number of Columns for storing the statistics This number is based on:
|
protected |
Return the column for the storage of a value in Statistics
| ipgs | Rank of the GS |
| ivar | Rank of the Variable or GRF |
| mode | 0 for Mean and 1 for Standard Deviation |
|
inlineprotected |
|
protected |
Returns the number of Rows for storing the statistics This number is based on the number of iterations, exclusing the burnout
|
protected |
Print the inequality
| [in] | iact | Relative rank of the sample |
| [in] | ivar | Rank of the variable |
| [in] | simval | Simulated value |
| [in] | vmin | Lower threshold |
| [in] | vmax | Upper threshold |
| VectorVectorDouble AGibbs::allocY | ( | ) | const |
| VectorInt AGibbs::calculateSampleRanks | ( | ) | const |
|
pure virtual |
Implemented in GibbsMultiMono, and GibbsMulti.
|
pure virtual |
Implemented in GibbsMultiMono, and GibbsMulti.
|
inlinevirtual |
Reimplemented in GibbsMMulti.
|
pure virtual |
Implemented in GibbsUPropMono, GibbsUMultiMono, GibbsUMulti, and GibbsMMulti.
| void AGibbs::getBoundsDecay | ( | int | iter, |
| double * | vmin, | ||
| double * | vmax | ||
| ) | const |
Given the initial bounds, calculate the modified bounds during the Burning stage
| iter | Rank of the iteration |
| vmin | Lower bound (in/out) |
| vmax | Upper bound (in/out) |
|
inline |
| int AGibbs::getDimension | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| int AGibbs::getRank | ( | int | ipgs, |
| int | ivar | ||
| ) | const |
| int AGibbs::getRelativeRank | ( | int | iech | ) |
Find the relative rank of an absolute sample rank
| iech | Absolute sample rank |
| int AGibbs::getSampleNumber | ( | ) | const |
| int AGibbs::getSampleRank | ( | int | i | ) | const |
| int AGibbs::getSampleRankNumber | ( | ) | const |
|
pure virtual |
Implemented in GibbsMultiMono, and GibbsMulti.
| void AGibbs::init | ( | int | npgs, |
| int | nvar, | ||
| int | nburn, | ||
| int | niter, | ||
| int | seed = 3241, |
||
| int | flag_order = 0, |
||
| bool | flag_decay = true |
||
| ) |
| bool AGibbs::isConstraintTight | ( | int | ipgs, |
| int | ivar, | ||
| int | iact, | ||
| double * | value | ||
| ) | const |
Test wheter a constraint is tight at a sample (data is a hard data)
| ipgs | Rank of the GS |
| ivar | Rank of the variable |
| iact | Rank of the sample (within internal _ranks) |
| value | Constraining value (if sample is an active constraint) |
|
virtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void AGibbs::statsInit | ( | ) |
| void AGibbs::storeResult | ( | const VectorVectorDouble & | y, |
| int | isimu, | ||
| int | ipgs | ||
| ) |
Store the Gaussian array in ELoc::GAUS variable. This should be performed once for all GS and all variables
| y | The Gaussian vector to be stored |
| isimu | Rank of the simulation |
| ipgs | Rank of the GS |
|
overridevirtual |
Reimplemented from AStringable.
|
pure virtual |
Implemented in GibbsUPropMono, GibbsUMultiMono, GibbsUMulti, and GibbsMMulti.
| void AGibbs::updateStats | ( | const VectorVectorDouble & | y, |
| int | ipgs, | ||
| int | iter, | ||
| double | amort = 0.9 |
||
| ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |