Class ThresholdFuncBitmap32
- java.lang.Object
-
- com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32
-
- com.googlecode.javaewah32.symmetric.ThresholdFuncBitmap32
-
public final class ThresholdFuncBitmap32 extends UpdateableBitmapFunction32
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.2
- See Also:
- http://en.wikipedia.org/wiki/Symmetric_Boolean_function
-
-
Field Summary
Fields Modifier and Type Field Description private int[]bufcountersprivate int[]buffersprivate intbufferUsedprivate intminprivate static int[]zeroes64-
Fields inherited from class com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32
b, hammingWeight, litWeight, litwlist, rw
-
-
Constructor Summary
Constructors Constructor Description ThresholdFuncBitmap32(int min)Construction a threshold function with a given threshold
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidandLiterals(BitmapStorage32 out, int runBegin, int runLength)voiddispatch(BitmapStorage32 out, int runBegin, int runend)Writes out the answer.private voidgeneralLiterals(int deficit, BitmapStorage32 out, int runBegin, int runLength)private voidorLiterals(BitmapStorage32 out, int runBegin, int runLength)private intthreshold2buf(int t, int[] buf, int bufUsed)private static intthreshold3(int t, int[] buffers, int bufUsed)private intthreshold4(int t, int[] buf, int bufUsed)-
Methods inherited from class com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32
clearLiteral, fillWithLiterals, getLiterals, getNumberOfLiterals, resize, setLiteral, setOne, setZero
-
-
-
-
Method Detail
-
dispatch
public void dispatch(BitmapStorage32 out, int runBegin, int runend)
Description copied from class:UpdateableBitmapFunction32Writes out the answer.- Specified by:
dispatchin classUpdateableBitmapFunction32- Parameters:
out- output bufferrunBegin- beginning of the runrunend- end of the run
-
threshold2buf
private int threshold2buf(int t, int[] buf, int bufUsed)
-
threshold3
private static int threshold3(int t, int[] buffers, int bufUsed)
-
threshold4
private int threshold4(int t, int[] buf, int bufUsed)
-
orLiterals
private void orLiterals(BitmapStorage32 out, int runBegin, int runLength)
-
andLiterals
private void andLiterals(BitmapStorage32 out, int runBegin, int runLength)
-
generalLiterals
private void generalLiterals(int deficit, BitmapStorage32 out, int runBegin, int runLength)
-
-