org.omegahat.Simulation.MCMC.Targets
Class CachingTarget

java.lang.Object
  |
  +--org.omegahat.Simulation.MCMC.Targets.CachingTarget
All Implemented Interfaces:
UnnormalizedDensity

public class CachingTarget
extends java.lang.Object
implements UnnormalizedDensity


Field Summary
(package private)  boolean[] cachedIsLogProb
           
(package private)  int index
           
(package private)  java.lang.Object[] objectCache
           
(package private)  double[] probCache
           
(package private)  UnnormalizedDensity target
           
 
Constructor Summary
CachingTarget(UnnormalizedDensity target)
           
CachingTarget(UnnormalizedDensity target, int length)
           
 
Method Summary
 boolean[] cachedIsLogProb()
           
protected  double common(java.lang.Object state, boolean wantLog)
           
 double logUnnormalizedPDF(java.lang.Object state)
           
 java.lang.Object[] objectCache()
           
 double[] probCache()
           
 UnnormalizedDensity target()
           
 double unnormalizedPDF(java.lang.Object state)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

target

UnnormalizedDensity target

objectCache

java.lang.Object[] objectCache

probCache

double[] probCache

cachedIsLogProb

boolean[] cachedIsLogProb

index

int index
Constructor Detail

CachingTarget

public CachingTarget(UnnormalizedDensity target,
                     int length)

CachingTarget

public CachingTarget(UnnormalizedDensity target)
Method Detail

target

public UnnormalizedDensity target()

objectCache

public java.lang.Object[] objectCache()

probCache

public double[] probCache()

cachedIsLogProb

public boolean[] cachedIsLogProb()

unnormalizedPDF

public double unnormalizedPDF(java.lang.Object state)
Specified by:
unnormalizedPDF in interface UnnormalizedDensity

logUnnormalizedPDF

public double logUnnormalizedPDF(java.lang.Object state)
Specified by:
logUnnormalizedPDF in interface UnnormalizedDensity

common

protected double common(java.lang.Object state,
                        boolean wantLog)