Top Description Fields Constructors Methods
com.googlecode.javaewah32.symmetric

public final Class ThresholdFuncBitmap32

extends UpdateableBitmapFunction32
Class Inheritance
Imports
com.googlecode.javaewah32.BitmapStorage32, java.util.Arrays

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.
Author
Daniel Lemire
Since
0.8.2
See Also
http://en.wikipedia.org/wiki/Symmetric_Boolean_function

Field Summary

Modifier and TypeField and Description
private final int[]
private int[]
private int
private final int
private static final int[]
Inherited from com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32:
bhammingWeightlitWeightlitwlistrw

Constructor Summary

AccessConstructor and Description
public
ThresholdFuncBitmap32(final int
threshold
min
)

Construction a threshold function with a given threshold

Method Summary

Modifier and TypeMethod and Description
private void
andLiterals(final BitmapStorage32 out, final int runBegin, final int runLength)

public void
dispatch(BitmapStorage32
output buffer
out
,
int
beginning of the run
runBegin
,
int
end of the run
runend
)

Implements abstract com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32.dispatch.

Writes out the answer.

private void
generalLiterals(final int deficit, final BitmapStorage32 out, final int runBegin, final int runLength)

private void
orLiterals(final BitmapStorage32 out, final int runBegin, final int runLength)

private int
threshold2buf(final int t, final int[] buf, final int bufUsed)

private static int
threshold3(final int t, final int[] buffers, final int bufUsed)

private int
threshold4(final int t, final int[] buf, final int bufUsed)

Inherited from com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32:
clearLiteralfillWithLiteralsgetLiteralsgetNumberOfLiteralsresizesetLiteralsetOnesetZero

Field Detail

bufcountersback to summary
private final int[] bufcounters
buffersback to summary
private int[] buffers
bufferUsedback to summary
private int bufferUsed
minback to summary
private final int min
zeroes64back to summary
private static final int[] zeroes64

Constructor Detail

ThresholdFuncBitmap32back to summary
public ThresholdFuncBitmap32(final int min)

Construction a threshold function with a given threshold

Parameters
min:int

threshold

Method Detail

andLiteralsback to summary
private void andLiterals(final BitmapStorage32 out, final int runBegin, final int runLength)
dispatchback to summary
public void dispatch(BitmapStorage32 out, int runBegin, int runend)

Implements abstract com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32.dispatch.

Doc from com.googlecode.javaewah32.symmetric.UpdateableBitmapFunction32.dispatch.

Writes out the answer.

Parameters
out:BitmapStorage32

output buffer

runBegin:int

beginning of the run

runend:int

end of the run

Annotations
@Override
generalLiteralsback to summary
private void generalLiterals(final int deficit, final BitmapStorage32 out, final int runBegin, final int runLength)
orLiteralsback to summary
private void orLiterals(final BitmapStorage32 out, final int runBegin, final int runLength)
threshold2bufback to summary
private int threshold2buf(final int t, final int[] buf, final int bufUsed)
threshold3back to summary
private static int threshold3(final int t, final int[] buffers, final int bufUsed)
threshold4back to summary
private int threshold4(final int t, final int[] buf, final int bufUsed)