org.omegahat.Simulation.MCMC.Proposals
Class IndependentHastingsCoupledProposal

java.lang.Object
  |
  +--org.omegahat.Simulation.MCMC.Proposals.IndependentHastingsCoupledProposal
All Implemented Interfaces:
HastingsCoupledProposal, TimeDependentProposal

public class IndependentHastingsCoupledProposal
extends java.lang.Object
implements HastingsCoupledProposal, TimeDependentProposal

This class implements an Hastings-Coupled proposal that generates states independently using a common GeneralProposal. It simply refers appropriate method calls to the encapsulated GeneralProposal.


Field Summary
protected  int dim
           
protected  GeneralProposal proposal
           
protected  int time
           
protected  int timeCalls
           
 
Constructor Summary
IndependentHastingsCoupledProposal(GeneralProposal proposal)
           
 
Method Summary
 double conditionalPDF(java.lang.Object state, java.lang.Object conditions, int which, MultiState stateVector)
          Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
 java.lang.Object generate(java.lang.Object conditions, int which, MultiState stateVector)
          Generate a new component state given the entire state vector
 GeneralProposal getProposal()
           
 int getTime()
          Get the time
 double logConditionalPDF(java.lang.Object state, java.lang.Object conditions, int which, MultiState stateVector)
          Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
 double logTransitionProbability(java.lang.Object from, java.lang.Object to, int which, MultiState stateVector)
          Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
 void resetTime()
          Reset time to 0
 void timeInc()
          Increment time
 double transitionProbability(java.lang.Object from, java.lang.Object to, int which, MultiState stateVector)
          Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

proposal

protected GeneralProposal proposal

time

protected int time

timeCalls

protected int timeCalls

dim

protected int dim
Constructor Detail

IndependentHastingsCoupledProposal

public IndependentHastingsCoupledProposal(GeneralProposal proposal)
Method Detail

getProposal

public GeneralProposal getProposal()

timeInc

public void timeInc()
Description copied from interface: TimeDependentProposal
Increment time
Specified by:
timeInc in interface TimeDependentProposal

resetTime

public void resetTime()
Description copied from interface: TimeDependentProposal
Reset time to 0
Specified by:
resetTime in interface TimeDependentProposal

getTime

public int getTime()
Description copied from interface: TimeDependentProposal
Get the time
Specified by:
getTime in interface TimeDependentProposal

conditionalPDF

public double conditionalPDF(java.lang.Object state,
                             java.lang.Object conditions,
                             int which,
                             MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
Specified by:
conditionalPDF in interface HastingsCoupledProposal
Parameters:
conditions - Current value of the component state being updated
state - Proposed state of the component state being updated
which - index of the component state being updated
stateVector - entire set of states, including the state being updated

logConditionalPDF

public double logConditionalPDF(java.lang.Object state,
                                java.lang.Object conditions,
                                int which,
                                MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
Specified by:
logConditionalPDF in interface HastingsCoupledProposal
Parameters:
conditions - Current value of the component state being updated
state - Proposed state of the component state being updated
which - index of the component state being updated
stateVector - entire set of states, including the state being updated

generate

public java.lang.Object generate(java.lang.Object conditions,
                                 int which,
                                 MultiState stateVector)
Generate a new component state given the entire state vector
Specified by:
generate in interface HastingsCoupledProposal
Parameters:
conditions - Current value of the component state being updated
which - index of the component state being updated
stateVector - entire set of states, including the state being updated

transitionProbability

public double transitionProbability(java.lang.Object from,
                                    java.lang.Object to,
                                    int which,
                                    MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
Specified by:
transitionProbability in interface HastingsCoupledProposal
Parameters:
from - Current value of the component state being updated
to - Proposed state of the component state being updated
which - index of the component state being updated
stateVector - entire set of states, including the state being updated

logTransitionProbability

public double logTransitionProbability(java.lang.Object from,
                                       java.lang.Object to,
                                       int which,
                                       MultiState stateVector)
Computes the HastingsCoupled transition probability for one sub-state given the entire state vector
Specified by:
logTransitionProbability in interface HastingsCoupledProposal
Parameters:
from - Current value of the component state being updated
to - Proposed state of the component state being updated
which - index of the component state being updated
stateVector - entire set of states, including the state being updated