org.omegahat.Simulation.MCMC.Listeners
Class DistanceWriter

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

public class DistanceWriter
extends DistanceListener
implements MCMCListenerWriter


Field Summary
protected  java.io.PrintWriter out
           
protected  boolean storeTime
           
 
Fields inherited from class org.omegahat.Simulation.MCMC.Listeners.DistanceListener
cumExpectedAcceptance, cumExpectedDistance, cumsumAccepted, cumsumAll, niterAccepted, niterAll, numChain
 
Constructor Summary
protected DistanceWriter()
           
  DistanceWriter(java.lang.String filename)
           
  DistanceWriter(java.lang.String filename, boolean append)
           
  DistanceWriter(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 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.
 
Methods inherited from class org.omegahat.Simulation.MCMC.Listeners.DistanceListener
acceptance, averageDistance, conditionalDistance, expectedAcceptance, expectedDistance, notify, reset
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface org.omegahat.Simulation.MCMC.MCMCListener
notify
 

Field Detail

out

protected java.io.PrintWriter out

storeTime

protected boolean storeTime
Constructor Detail

DistanceWriter

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

DistanceWriter

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

DistanceWriter

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

DistanceWriter

protected DistanceWriter()
Method Detail

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

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