Package cc.mallet.fst

Class 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 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