cc.mallet.fst
Class CRFCacheStaleIndicator

java.lang.Object
  extended by cc.mallet.fst.CRFCacheStaleIndicator
All Implemented Interfaces:
CacheStaleIndicator

public class CRFCacheStaleIndicator
extends java.lang.Object
implements CacheStaleIndicator

Indicates when the value/gradient becomes stale based on updates to CRF's parameters.

Author:
Gaurav Chandalia

Field Summary
protected  int cachedGradientChangeStamp
           
protected  int cachedValueChangeStamp
           
protected  CRF crf
           
 
Constructor Summary
CRFCacheStaleIndicator(CRF crf)
           
 
Method Summary
 boolean isGradientStale()
          Returns true if the gradient is stale, also updates the cacheGradientStamp.
 boolean isValueStale()
          Returns true if the value is stale, also updates the cacheValueStamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

crf

protected CRF crf

cachedValueChangeStamp

protected int cachedValueChangeStamp

cachedGradientChangeStamp

protected int cachedGradientChangeStamp
Constructor Detail

CRFCacheStaleIndicator

public CRFCacheStaleIndicator(CRF crf)
Method Detail

isValueStale

public boolean isValueStale()
Returns true if the value is stale, also updates the cacheValueStamp.

Specified by:
isValueStale in interface CacheStaleIndicator

isGradientStale

public boolean isGradientStale()
Returns true if the gradient is stale, also updates the cacheGradientStamp.

Specified by:
isGradientStale in interface CacheStaleIndicator