org.omegahat.Simulation.MCMC
Class BaseMarkovChain

java.lang.Object
  |
  +--org.omegahat.Simulation.MCMC.NotifyingMCMCObject
        |
        +--org.omegahat.Simulation.MCMC.BaseMarkovChain
All Implemented Interfaces:
MarkovChain, NotifyingObject, java.lang.Runnable
Direct Known Subclasses:
CustomMarkovChain, SimpleGibbsSampler, SimpleMarkovChain, SimpleMetropolisHastingsSampler, SimpleMetropolisSampler

public abstract class BaseMarkovChain
extends NotifyingMCMCObject
implements MarkovChain, java.lang.Runnable

An abstract class providing methods implementing the interface MarkovChain.


Inner classes inherited from class org.omegahat.Simulation.MCMC.NotifyingMCMCObject
NotifyingMCMCObject.MyHandle
 
Field Summary
(package private)  MCMCState state
           
 
Fields inherited from class org.omegahat.Simulation.MCMC.NotifyingMCMCObject
listeners
 
Constructor Summary
BaseMarkovChain()
           
 
Method Summary
protected abstract  MCMCState generate(MCMCState current)
          Generate the next state from the current one
 MCMCState getState()
          Get the current state of the Markov Chain.
 void iterate(int n)
          Perform several steps.
 void run()
           
 void step()
          Generate the next state from the current state.
 
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

state

MCMCState state
Constructor Detail

BaseMarkovChain

public BaseMarkovChain()
Method Detail

getState

public MCMCState getState()
Get the current state of the Markov Chain.
Specified by:
getState in interface MarkovChain

step

public void step()
Generate the next state from the current state.
Specified by:
step in interface MarkovChain

iterate

public void iterate(int n)
Perform several steps.
Specified by:
iterate in interface MarkovChain
Parameters:
n - how many steps

run

public void run()
Specified by:
run in interface java.lang.Runnable

generate

protected abstract MCMCState generate(MCMCState current)
Generate the next state from the current one
Overrides:
generate in class NotifyingMCMCObject