org.omegahat.Simulation.MCMC.Listeners
Class ThinningProxyListener
java.lang.Object
|
+--org.omegahat.Simulation.MCMC.Listeners.ThinningProxyListener
- All Implemented Interfaces:
- MCMCListener, NotifyingObject
- public class ThinningProxyListener
- extends java.lang.Object
- implements NotifyingObject, MCMCListener
This object serves as a proxy MCMCListener
that only
forwards 1 out of every thinningFactor
events to its
subscribers
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
listeners
protected java.util.Hashtable listeners
thinningFactor
protected int thinningFactor
totalEvents
protected int totalEvents
ThinningProxyListener
public ThinningProxyListener()
ThinningProxyListener
public ThinningProxyListener(int factor)
getTotalEvents
public int getTotalEvents()
resetTotalEvents
public void resetTotalEvents()
getThinningFactor
public int getThinningFactor()
setThinningFactor
public int setThinningFactor(int factor)
registerListener
public MCMCListenerHandle registerListener(MCMCListener listener)
- Description copied from interface:
NotifyingObject
- Register a listener to be notified of events.
- Specified by:
registerListener
in interface NotifyingObject
unregisterListener
public void unregisterListener(MCMCListenerHandle handle)
- Description copied from interface:
NotifyingObject
- Unregister a listener to be notified of events.
- Specified by:
unregisterListener
in interface NotifyingObject
notifyAll
protected void notifyAll(MCMCEvent e)
notify
public void notify(MCMCEvent event)
- Function to be called for notification
- Specified by:
notify
in interface MCMCListener