org.omegahat.Simulation.MCMC.Examples
Class SimpleGibbsSampler

java.lang.Object
  |
  +--org.omegahat.Simulation.MCMC.NotifyingMCMCObject
        |
        +--org.omegahat.Simulation.MCMC.BaseMarkovChain
              |
              +--org.omegahat.Simulation.MCMC.Examples.SimpleGibbsSampler
All Implemented Interfaces:
MarkovChain, NotifyingObject, java.lang.Runnable

public class SimpleGibbsSampler
extends BaseMarkovChain

A simple Markov Chain example. It simply generates its next state from N(0,1) regardless of the current state.


Inner Class Summary
protected  class SimpleGibbsSampler.BivariateDoubleState
           
static class SimpleGibbsSampler.listenerPrinter
           
 
Inner classes inherited from class org.omegahat.Simulation.MCMC.NotifyingMCMCObject
NotifyingMCMCObject.MyHandle
 
Field Summary
protected  Normal norm
           
protected  PRNG prng
           
protected  double rho
           
protected  double sigma
           
protected  SimpleGibbsSampler.BivariateDoubleState state
           
 
Fields inherited from class org.omegahat.Simulation.MCMC.NotifyingMCMCObject
listeners
 
Constructor Summary
SimpleGibbsSampler(PRNG prng, double sigma, double rho)
           
 
Method Summary
 MCMCState generate(MCMCState current)
          Generate the next state from the current one
static void main(java.lang.String[] argv)
           
 
Methods inherited from class org.omegahat.Simulation.MCMC.BaseMarkovChain
getState, iterate, run, step
 
Methods inherited from class org.omegahat.Simulation.MCMC.NotifyingMCMCObject
notifyAll, registerListener, unregisterListener
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

sigma

protected double sigma

rho

protected double rho

prng

protected PRNG prng

norm

protected Normal norm

state

protected SimpleGibbsSampler.BivariateDoubleState state
Constructor Detail

SimpleGibbsSampler

public SimpleGibbsSampler(PRNG prng,
                          double sigma,
                          double rho)
Method Detail

generate

public MCMCState generate(MCMCState current)
Description copied from class: BaseMarkovChain
Generate the next state from the current one
Overrides:
generate in class BaseMarkovChain

main

public static void main(java.lang.String[] argv)