com.googlecode.javaewah.symmetric
Class ThresholdFuncBitmap

java.lang.Object
  extended by com.googlecode.javaewah.symmetric.UpdateableBitmapFunction
      extended by com.googlecode.javaewah.symmetric.ThresholdFuncBitmap

public final class ThresholdFuncBitmap
extends UpdateableBitmapFunction

A threshold Boolean function returns true if the number of true values exceed a threshold. It is a symmetric Boolean function. This class implements an algorithm described in the following paper: Owen Kaser and Daniel Lemire, Compressed bitmap indexes: beyond unions and intersections http://arxiv.org/abs/1402.4466 It is not thread safe: you should use one object per thread.

Since:
0.8.0
Author:
Daniel Lemire
See Also:
http://en.wikipedia.org/wiki/Symmetric_Boolean_function

Constructor Summary
ThresholdFuncBitmap(int min)
          Construction a threshold function with a given threshold
 
Method Summary
 void dispatch(BitmapStorage out, int runbegin, int runend)
          Writes out the answer.
 
Methods inherited from class com.googlecode.javaewah.symmetric.UpdateableBitmapFunction
clearLiteral, fillWithLiterals, getLiterals, getNumberOfLiterals, resize, setLiteral, setOne, setZero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThresholdFuncBitmap

public ThresholdFuncBitmap(int min)
Construction a threshold function with a given threshold

Parameters:
min - threshold
Method Detail

dispatch

public void dispatch(BitmapStorage out,
                     int runbegin,
                     int runend)
Description copied from class: UpdateableBitmapFunction
Writes out the answer.

Specified by:
dispatch in class UpdateableBitmapFunction
Parameters:
out - output buffer
runbegin - beginning of the run
runend - end of the run


Copyright © 2014. All Rights Reserved.