Package com.googlecode.javaewah
Class IteratorAggregation
java.lang.Object
com.googlecode.javaewah.IteratorAggregation
Set of helper functions to aggregate bitmaps.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic IteratingRLWbufferedand(int bufSize, IteratingRLW... al)Aggregate the iterators using a bitmap buffer.static IteratingRLWbufferedand(IteratingRLW... al)Aggregate the iterators using a bitmap buffer.static IteratingRLWbufferedor(int bufSize, IteratingRLW... al)Aggregate the iterators using a bitmap buffer.static IteratingRLWbufferedor(IteratingRLW... al)Aggregate the iterators using a bitmap buffer.static IteratingRLWbufferedxor(int bufSize, IteratingRLW... al)Aggregate the iterators using a bitmap buffer.static IteratingRLWbufferedxor(IteratingRLW... al)Aggregate the iterators using a bitmap buffer.protected static longdischarge(BitmapStorage container, IteratingRLW i, long max)Write out up to max words, returns how many were writtenprotected static voiddischargeAsEmpty(BitmapStorage container, IteratingRLW i)Write out the content of the iterator, but as if it were all zeros.protected static longdischargeNegated(BitmapStorage container, IteratingRLW i, long max)Write out up to max negated words, returns how many were writtenprotected static intinplaceand(long[] bitmap, IteratingRLW i)protected static intinplaceor(long[] bitmap, IteratingRLW i)protected static intinplacexor(long[] bitmap, IteratingRLW i)static IteratingRLWnot(IteratingRLW x)static voidxorToContainer(BitmapStorage container, int desiredrlwcount, IteratingRLW rlwi, IteratingRLW rlwj)Compute the first few words of the XOR aggregate between two iterators.
-
Field Details
-
DEFAULT_MAX_BUF_SIZE
public static final int DEFAULT_MAX_BUF_SIZEAn optimization option. Larger values may improve speed, but at the expense of memory.- See Also:
- Constant Field Values
-
-
Method Details
-
not
- Parameters:
x- iterator to negate- Returns:
- negated version of the iterator
-
bufferedand
Aggregate the iterators using a bitmap buffer.- Parameters:
al- set of iterators to aggregate- Returns:
- and aggregate
-
bufferedand
Aggregate the iterators using a bitmap buffer.- Parameters:
al- set of iterators to aggregatebufSize- size of the internal buffer used by the iterator in 64-bit words (per input iterator)- Returns:
- and aggregate
-
bufferedor
Aggregate the iterators using a bitmap buffer.- Parameters:
al- set of iterators to aggregate- Returns:
- or aggregate
-
bufferedor
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
Aggregate the iterators using a bitmap buffer.- Parameters:
al- set of iterators to aggregate- Returns:
- xor aggregate
-
bufferedxor
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
Write out the content of the iterator, but as if it were all zeros.- Parameters:
container- where we writei- the iterator
-
discharge
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
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(BitmapStorage container, int desiredrlwcount, IteratingRLW rlwi, IteratingRLW 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
-
inplacexor
-
inplaceand
-