com.googlecode.javaewah32
Class IteratorUtil32

java.lang.Object
  extended by com.googlecode.javaewah32.IteratorUtil32

public class IteratorUtil32
extends Object

Convenience functions for working over iterators


Constructor Summary
IteratorUtil32()
           
 
Method Summary
static int cardinality(IteratingRLW32 i)
           
static EWAHCompressedBitmap32 materialize(IteratingRLW32 i)
          Turn an iterator into a bitmap
static void materialize(IteratingRLW32 i, BitmapStorage32 c)
          Turn an iterator into a bitmap
static long materialize(IteratingRLW32 i, BitmapStorage32 c, int Max)
          Turn an iterator into a bitmap
static IteratingRLW32[] toIterators(EWAHCompressedBitmap32... x)
           
static IntIterator toSetBitsIntIterator(IteratingRLW32 i)
           
static Iterator<Integer> toSetBitsIterator(IteratingRLW32 i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorUtil32

public IteratorUtil32()
Method Detail

toSetBitsIntIterator

public static IntIterator toSetBitsIntIterator(IteratingRLW32 i)
Parameters:
i - iterator we wish to iterate over
Returns:
an iterator over the set bits corresponding to the iterator

toSetBitsIterator

public static Iterator<Integer> toSetBitsIterator(IteratingRLW32 i)
Parameters:
i - iterator we wish to iterate over
Returns:
an iterator over the set bits corresponding to the iterator

materialize

public static void materialize(IteratingRLW32 i,
                               BitmapStorage32 c)
Turn an iterator into a bitmap

Parameters:
i - iterator we wish to materialize
c - where we write

cardinality

public static int cardinality(IteratingRLW32 i)
Parameters:
i - iterator we wish to iterate over
Returns:
the cardinality (number of set bits) corresponding to the iterator

toIterators

public static IteratingRLW32[] toIterators(EWAHCompressedBitmap32... x)
Parameters:
x - set of bitmaps we wish to iterate over
Returns:
an array of iterators corresponding to the array of bitmaps

materialize

public static long materialize(IteratingRLW32 i,
                               BitmapStorage32 c,
                               int Max)
Turn an iterator into a bitmap

Parameters:
i - iterator we wish to materialize
c - where we write
Max - maximum number of words to materialize
Returns:
how many words were actually materialized

materialize

public static EWAHCompressedBitmap32 materialize(IteratingRLW32 i)
Turn an iterator into a bitmap

Parameters:
i - iterator we wish to materialize
Returns:
materialized version of the iterator


Copyright © 2014. All Rights Reserved.