#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 |
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 |
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 GibbsUMultiMono, GibbsUPropMono, GibbsMMulti, and GibbsUMulti.
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 GibbsUMultiMono, GibbsUPropMono, GibbsMMulti, and GibbsUMulti.
void AGibbs::updateStats | ( | const VectorVectorDouble & | y, |
int | ipgs, | ||
int | iter, | ||
double | amort = 0.9 |
||
) |