dgim 0.0.2 → 0.0.3
raw patch · 2 files changed
+4/−2 lines, 2 files
Files
dgim.cabal view
@@ -1,5 +1,5 @@ name: dgim-version: 0.0.2+version: 0.0.3 synopsis: Implementation of DGIM algorithm description: A basic implementation of the DGIM algorithm for counting the occurrence of certain elements in a fixed length prefix of a stream. license: MIT
src/Data/Stream/Algorithms/DGIM/Internal.hs view
@@ -23,6 +23,8 @@ type Index = Integer type NumOnesLog2 = Integer +-- | The bucket contains the last index and the logarithm (with base 2) of the+-- number of counted elements it contains data Bucket = B !Index !NumOnesLog2 deriving (Show) getIndex :: Bucket -> Index@@ -96,7 +98,7 @@ -> go (x:newBuckets) rest (similarBuckets + 1) lastBucketValue -- See a bucket with a different value- (x@(B _ vR):rest) -- | lastBucketValue /= vR+ (x@(B _ vR):rest) -- when lastBucketValue /= vR -> go (x:newBuckets) rest 1 vR