org.omegahat.Simulation.MCMC.Listeners
Class MeanWriter

java.lang.Object
  |
  +--org.omegahat.Simulation.MCMC.Listeners.MeanWriter
All Implemented Interfaces:
MCMCListener, MCMCListenerWriter, ResettableListener

public class MeanWriter
extends java.lang.Object
implements MCMCListenerWriter, ResettableListener


Field Summary
protected  double[] cumsums
           
protected  int niter
           
protected  int numChain
           
protected  java.io.PrintWriter out
           
protected  boolean storeTime
           
 
Constructor Summary
protected MeanWriter()
           
  MeanWriter(java.lang.String filename)
           
  MeanWriter(java.lang.String filename, boolean append)
           
  MeanWriter(java.lang.String filename, boolean append, boolean storeTime)
           
 
Method Summary
 void close()
          Write out any cached state and then close the output stream.
 void flush()
          Write out any cached state
 void flush(double pCouple)
           
 void notify(MCMCEvent e)
          Function to be called for notification
 void print(java.lang.String data)
          Write arbitrary text to the output stream.
 void println(java.lang.String data)
          Write arbitrary text to the output stream.
 void reset()
          Reset any stored state to the initial condition
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

out

protected java.io.PrintWriter out

storeTime

protected boolean storeTime

cumsums

protected double[] cumsums

niter

protected int niter

numChain

protected int numChain
Constructor Detail

MeanWriter

public MeanWriter(java.lang.String filename,
                  boolean append,
                  boolean storeTime)
           throws java.io.IOException

MeanWriter

public MeanWriter(java.lang.String filename,
                  boolean append)
           throws java.io.IOException

MeanWriter

public MeanWriter(java.lang.String filename)
           throws java.io.IOException

MeanWriter

protected MeanWriter()
Method Detail

notify

public void notify(MCMCEvent e)
Description copied from interface: MCMCListener
Function to be called for notification
Specified by:
notify in interface MCMCListener

flush

public void flush(double pCouple)

flush

public void flush()
Description copied from interface: MCMCListenerWriter
Write out any cached state
Specified by:
flush in interface MCMCListenerWriter

reset

public void reset()
Description copied from interface: ResettableListener
Reset any stored state to the initial condition
Specified by:
reset in interface ResettableListener

close

public void close()
Description copied from interface: MCMCListenerWriter
Write out any cached state and then close the output stream.
Specified by:
close in interface MCMCListenerWriter

println

public void println(java.lang.String data)
Description copied from interface: MCMCListenerWriter
Write arbitrary text to the output stream.
Specified by:
println in interface MCMCListenerWriter

print

public void print(java.lang.String data)
Description copied from interface: MCMCListenerWriter
Write arbitrary text to the output stream.
Specified by:
print in interface MCMCListenerWriter