GibbsSampler Class Reference

Gibbs sampling algorithm. More...

#include <gibbssampler.h>

Inheritance diagram for GibbsSampler:

MCMC Inference List of all members.

Public Member Functions

 GibbsSampler (VariableState *state, long int seed, const bool &trackClauseTrueCnts, GibbsParams *gibbsParams)
 Constructor.
 ~GibbsSampler ()
 Destructor.
void init ()
 Initializes the Gibbs sampler.
void infer ()
 Runs Gibbs sampling.

Detailed Description

Gibbs sampling algorithm.

Definition at line 83 of file gibbssampler.h.


Constructor & Destructor Documentation

GibbsSampler::GibbsSampler ( VariableState state,
long int  seed,
const bool &  trackClauseTrueCnts,
GibbsParams gibbsParams 
) [inline]

Constructor.

User-set parameters are set and an instance of MaxWalksat is created for initial values (not used if initialized randomly).

See also:
MCMC::Constructor(VariableState*, long int, const bool&, MCMCParams*)

Definition at line 93 of file gibbssampler.h.

References GibbsParams::epsilonError, GibbsParams::fracConverged, GibbsParams::gamma, GibbsParams::mwsParams, GibbsParams::samplesPerTest, Inference::state_, and GibbsParams::walksatType.

00095     : MCMC(state, seed, trackClauseTrueCnts, gibbsParams)
00096   {
00097       // User-set parameters
00098     gamma_ = gibbsParams->gamma;
00099     epsilonError_ = gibbsParams->epsilonError;
00100     fracConverged_ = gibbsParams->fracConverged;
00101     walksatType_ = gibbsParams->walksatType;
00102     samplesPerTest_ = gibbsParams->samplesPerTest;
00103     
00104       // We don't need to track clause true counts in up and ss
00105     mws_ = new MaxWalkSat(state_, seed, false, gibbsParams->mwsParams);
00106   }

GibbsSampler::~GibbsSampler (  )  [inline]

Destructor.

Convergence tests and the instance of MaxWalksat are deleted.

Definition at line 111 of file gibbssampler.h.

References VariableState::getNumAtoms(), and Inference::state_.

00112   {
00113     deleteConvergenceTests(burnConvergenceTests_, gibbsConvergenceTests_,
00114                            state_->getNumAtoms());
00115     delete mws_;
00116   }


The documentation for this class was generated from the following file:
Generated on Tue Jan 16 05:30:06 2007 for Alchemy by  doxygen 1.5.1