Package com.googlecode.javaewah32
Class IteratorUtil32
java.lang.Object
com.googlecode.javaewah32.IteratorUtil32
Convenience functions for working over iterators
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
static EWAHCompressedBitmap32
Turn an iterator into a bitmap This can be used to effectively clone a bitmap in the following manner:EWAHCompressedBitmap32 n = IteratorUtil32.materialize(bitmap.getIteratingRLW())); n.setSizeInBitsWithinLastWord(bitmap.sizeInBits());
static void
Turn an iterator into a bitmapstatic long
materialize(IteratingRLW32 i, BitmapStorage32 c, int max)
Turn an iterator into a bitmapstatic IteratingRLW32[]
static IntIterator
-
Method Details
-
toSetBitsIntIterator
- Parameters:
i
- iterator we wish to iterate over- Returns:
- an iterator over the set bits corresponding to the iterator
-
toSetBitsIterator
- Parameters:
i
- iterator we wish to iterate over- Returns:
- an iterator over the set bits corresponding to the iterator
-
materialize
Turn an iterator into a bitmap- Parameters:
i
- iterator we wish to materializec
- where we write
-
cardinality
- Parameters:
i
- iterator we wish to iterate over- Returns:
- the cardinality (number of set bits) corresponding to the iterator
-
toIterators
- Parameters:
x
- set of bitmaps we wish to iterate over- Returns:
- an array of iterators corresponding to the array of bitmaps
-
materialize
Turn an iterator into a bitmap- Parameters:
i
- iterator we wish to materializec
- where we writemax
- maximum number of words to materialize- Returns:
- how many words were actually materialized
-
materialize
Turn an iterator into a bitmap This can be used to effectively clone a bitmap in the following manner:EWAHCompressedBitmap32 n = IteratorUtil32.materialize(bitmap.getIteratingRLW())); n.setSizeInBitsWithinLastWord(bitmap.sizeInBits());
- Parameters:
i
- iterator we wish to materialize- Returns:
- materialized version of the iterator
-