Package com.googlecode.javaewah32
Class IteratorAggregation32
- java.lang.Object
-
- com.googlecode.javaewah32.IteratorAggregation32
-
public final class IteratorAggregation32 extends Object
Set of helper functions to aggregate bitmaps.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_BUF_SIZEAn optimization option.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IteratingRLW32bufferedand(int bufSize, IteratingRLW32... al)Aggregate the iterators using a bitmap buffer.static IteratingRLW32bufferedand(IteratingRLW32... al)Aggregate the iterators using a bitmap buffer.static IteratingRLW32bufferedor(int bufSize, IteratingRLW32... al)Aggregate the iterators using a bitmap buffer.static IteratingRLW32bufferedor(IteratingRLW32... al)Aggregate the iterators using a bitmap buffer.static IteratingRLW32bufferedxor(int bufSize, IteratingRLW32... al)Aggregate the iterators using a bitmap buffer.static IteratingRLW32bufferedxor(IteratingRLW32... al)Aggregate the iterators using a bitmap buffer.protected static intdischarge(BitmapStorage32 container, IteratingRLW32 i, int max)Write out up to max words, returns how many were writtenprotected static voiddischargeAsEmpty(BitmapStorage32 container, IteratingRLW32 i)Write out the content of the iterator, but as if it were all zeros.protected static intdischargeNegated(BitmapStorage32 container, IteratingRLW32 i, int max)Write out up to max negated words, returns how many were writtenprotected static intinplaceand(int[] bitmap, IteratingRLW32 i)protected static intinplaceor(int[] bitmap, IteratingRLW32 i)protected static intinplacexor(int[] bitmap, IteratingRLW32 i)static IteratingRLW32not(IteratingRLW32 x)static voidxorToContainer(BitmapStorage32 container, int desiredrlwcount, IteratingRLW32 rlwi, IteratingRLW32 rlwj)Compute the first few words of the XOR aggregate between two iterators.
-
-
-
Field Detail
-
DEFAULT_MAX_BUF_SIZE
public static final int DEFAULT_MAX_BUF_SIZE
An optimization option. Larger values may improve speed, but at the expense of memory.- See Also:
- Constant Field Values
-
-
Method Detail
-
not
public static IteratingRLW32 not(IteratingRLW32 x)
- Parameters:
x- iterator to negate- Returns:
- negated version of the iterator
-
bufferedand
public static IteratingRLW32 bufferedand(IteratingRLW32... al)
Aggregate the iterators using a bitmap buffer.- Parameters:
al- iterators to aggregate- Returns:
- and aggregate
-
bufferedand
public static IteratingRLW32 bufferedand(int bufSize, IteratingRLW32... al)
Aggregate the iterators using a bitmap buffer.- Parameters:
al- iterators to aggregatebufSize- size of the internal buffer used by the iterator in 64-bit words- Returns:
- and aggregate
-
bufferedor
public static IteratingRLW32 bufferedor(IteratingRLW32... al)
Aggregate the iterators using a bitmap buffer.- Parameters:
al- iterators to aggregate- Returns:
- or aggregate
-
bufferedor
public static IteratingRLW32 bufferedor(int bufSize, IteratingRLW32... al)
Aggregate the iterators using a bitmap buffer.- Parameters:
al- iterators to aggregatebufSize- size of the internal buffer used by the iterator in 64-bit words- Returns:
- or aggregate
-
bufferedxor
public static IteratingRLW32 bufferedxor(IteratingRLW32... al)
Aggregate the iterators using a bitmap buffer.- Parameters:
al- iterators to aggregate- Returns:
- xor aggregate
-
bufferedxor
public static IteratingRLW32 bufferedxor(int bufSize, IteratingRLW32... al)
Aggregate the iterators using a bitmap buffer.- Parameters:
al- iterators to aggregatebufSize- size of the internal buffer used by the iterator in 64-bit words- Returns:
- xor aggregate
-
dischargeAsEmpty
protected static void dischargeAsEmpty(BitmapStorage32 container, IteratingRLW32 i)
Write out the content of the iterator, but as if it were all zeros.- Parameters:
container- where we writei- the iterator
-
discharge
protected static int discharge(BitmapStorage32 container, IteratingRLW32 i, int max)
Write out up to max words, returns how many were written- Parameters:
container- target for writesi- source of datamax- maximal number of writes- Returns:
- how many written
-
dischargeNegated
protected static int dischargeNegated(BitmapStorage32 container, IteratingRLW32 i, int max)
Write out up to max negated words, returns how many were written- Parameters:
container- target for writesi- source of datamax- maximal number of writes- Returns:
- how many written
-
xorToContainer
public static void xorToContainer(BitmapStorage32 container, int desiredrlwcount, IteratingRLW32 rlwi, IteratingRLW32 rlwj)
Compute the first few words of the XOR aggregate between two iterators.- Parameters:
container- where to writedesiredrlwcount- number of words to be written (max)rlwi- first iterator to aggregaterlwj- second iterator to aggregate
-
inplaceor
protected static int inplaceor(int[] bitmap, IteratingRLW32 i)
-
inplacexor
protected static int inplacexor(int[] bitmap, IteratingRLW32 i)
-
inplaceand
protected static int inplaceand(int[] bitmap, IteratingRLW32 i)
-
-