org.omegahat.Simulation.MCMC.Proposals
Class IteratedProposal

java.lang.Object
  |
  +--org.omegahat.Simulation.MCMC.Proposals.IteratedProposal
All Implemented Interfaces:
ConditionalDensity, ConditionalGenerator, GeneralProposal, MarkovProposal, TimeDependentProposal

public class IteratedProposal
extends java.lang.Object
implements GeneralProposal, TimeDependentProposal


Field Summary
protected  int currentCount
           
protected  int currentProposal
           
 boolean debug
           
protected  int[] proposalFreqs
           
protected  GeneralProposal[] proposals
           
protected  int time
           
 
Constructor Summary
  IteratedProposal(GeneralProposal[] proposalList, int[] proposalFreqs)
           
protected IteratedProposal(int nProposal)
           
 
Method Summary
 double conditionalPDF(java.lang.Object state, java.lang.Object conditions)
           
 java.lang.Object generate(java.lang.Object conditionals)
          Generate a single random value conditional on conditionals
 int getTime()
          Get the time
 double logConditionalPDF(java.lang.Object state, java.lang.Object conditions)
           
 double logTransitionProbability(java.lang.Object from, java.lang.Object to)
          Convenience method for computing the log probability of proposing a move.
 int numChains()
           
 void resetTime()
          Reset time to 0
 void setProposal(int which, GeneralProposal what, int freq)
           
 void setProposals(GeneralProposal[] what, int[] freqs)
           
 void timeInc()
          Increment time
 double transitionProbability(java.lang.Object from, java.lang.Object to)
          Convenience method for computing the probability of proposing a move.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

proposals

protected GeneralProposal[] proposals

proposalFreqs

protected int[] proposalFreqs

currentProposal

protected int currentProposal

currentCount

protected int currentCount

time

protected int time

debug

public boolean debug
Constructor Detail

IteratedProposal

protected IteratedProposal(int nProposal)

IteratedProposal

public IteratedProposal(GeneralProposal[] proposalList,
                        int[] proposalFreqs)
Method Detail

numChains

public int numChains()

setProposal

public void setProposal(int which,
                        GeneralProposal what,
                        int freq)

setProposals

public void setProposals(GeneralProposal[] what,
                         int[] freqs)

transitionProbability

public double transitionProbability(java.lang.Object from,
                                    java.lang.Object to)
Convenience method for computing the probability of proposing a move.
Specified by:
transitionProbability in interface GeneralProposal

logTransitionProbability

public double logTransitionProbability(java.lang.Object from,
                                       java.lang.Object to)
Convenience method for computing the log probability of proposing a move.
Specified by:
logTransitionProbability in interface GeneralProposal

conditionalPDF

public double conditionalPDF(java.lang.Object state,
                             java.lang.Object conditions)
Specified by:
conditionalPDF in interface ConditionalDensity

logConditionalPDF

public double logConditionalPDF(java.lang.Object state,
                                java.lang.Object conditions)
Specified by:
logConditionalPDF in interface ConditionalDensity

generate

public java.lang.Object generate(java.lang.Object conditionals)
Description copied from interface: ConditionalGenerator
Generate a single random value conditional on conditionals
Specified by:
generate in interface ConditionalGenerator

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