1.1.0
CCC
 
AGibbs Class Referenceabstract

#include <AGibbs.hpp>

Inheritance diagram for AGibbs:
AStringable GibbsMulti GibbsMultiMono GibbsMMulti GibbsUMulti GibbsUMultiMono GibbsUPropMono

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)
 
AGibbsoperator= (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)
 
DbgetDb () 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)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 

Constructor & Destructor Documentation

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)
AGibbs::~AGibbs ( )
virtual

Member Function Documentation

VectorVectorDouble AGibbs::allocY ( ) const
VectorInt AGibbs::calculateSampleRanks ( ) const
virtual int AGibbs::calculInitialize ( VectorVectorDouble y,
int  isimu,
int  ipgs 
)
pure virtual

Implemented in GibbsMultiMono, and GibbsMulti.

virtual int AGibbs::checkGibbs ( const VectorVectorDouble y,
int  isimu,
int  ipgs 
)
pure virtual

Implemented in GibbsMultiMono, and GibbsMulti.

virtual void AGibbs::cleanup ( )
inlinevirtual

Reimplemented in GibbsMMulti.

virtual int AGibbs::covmatAlloc ( bool  verbose,
bool  verboseTimer = false 
)
pure virtual
void AGibbs::getBoundsDecay ( int  iter,
double *  vmin,
double *  vmax 
) const

Given the initial bounds, calculate the modified bounds during the Burning stage

Parameters
iterRank of the iteration
vminLower bound (in/out)
vmaxUpper bound (in/out)
Db* AGibbs::getDb ( ) const
inline
int AGibbs::getDimension ( ) const
bool AGibbs::getFlagDecay ( ) const
inline
int AGibbs::getFlagOrder ( ) const
inline
int AGibbs::getNburn ( ) const
inline
int AGibbs::getNiter ( ) const
inline
int AGibbs::getNpgs ( ) const
inline
int AGibbs::getNvar ( ) const
inline
bool AGibbs::getOptionStats ( ) const
inline
int AGibbs::getRank ( int  ipgs,
int  ivar 
) const
int AGibbs::getRelativeRank ( int  iech)

Find the relative rank of an absolute sample rank

Parameters
iechAbsolute sample rank
Returns
The rank within the vector if relative ranks (or -1)
int AGibbs::getSampleNumber ( ) const
int AGibbs::getSampleRank ( int  i) const
int AGibbs::getSampleRankNumber ( ) const
virtual double AGibbs::getSimulate ( VectorVectorDouble y,
double  yk,
double  sk,
int  ipgs,
int  ivar,
int  iact,
int  iter 
)
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)

Parameters
ipgsRank of the GS
ivarRank of the variable
iactRank of the sample (within internal _ranks)
valueConstraining value (if sample is an active constraint)
Returns
AGibbs & AGibbs::operator= ( const AGibbs r)
int AGibbs::run ( VectorVectorDouble y,
int  ipgs = 0,
int  isimu = 0,
bool  verbose = false,
bool  flagCheck = false 
)
virtual
void AGibbs::setFlagOrder ( int  flagOrder)
inline
void AGibbs::setNburn ( int  nburn)
inline
void AGibbs::setNiter ( int  niter)
inline
void AGibbs::setNpgs ( int  npgs)
inline
void AGibbs::setNvar ( int  nvar)
inline
void AGibbs::setOptionStats ( int  option_stats)
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

Parameters
yThe Gaussian vector to be stored
isimuRank of the simulation
ipgsRank of the GS
String AGibbs::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Reimplemented from AStringable.

virtual void AGibbs::update ( VectorVectorDouble y,
int  isimu,
int  ipgs,
int  iter 
)
pure virtual
void AGibbs::updateStats ( const VectorVectorDouble y,
int  ipgs,
int  iter,
double  amort = 0.9 
)

The documentation for this class was generated from the following files: