Package com.googlecode.javaewah
Class FastAggregation
- java.lang.Object
-
- com.googlecode.javaewah.FastAggregation
-
public class FastAggregation extends java.lang.Object
Fast algorithms to aggregate many bitmaps. These algorithms are just given as reference. They may not be faster than the corresponding methods in the EWAHCompressedBitmap class.- Author:
- Daniel Lemire
-
-
Constructor Summary
Constructors Constructor Description FastAggregation()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static EWAHCompressedBitmap
bufferedand(int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the and aggregate using a temporary uncompressed bitmap.static void
bufferedandWithContainer(BitmapStorage container, int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the and aggregate using a temporary uncompressed bitmap.static EWAHCompressedBitmap
bufferedor(int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the or aggregate using a temporary uncompressed bitmap.static void
bufferedorWithContainer(BitmapStorage container, int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the or aggregate using a temporary uncompressed bitmap.static EWAHCompressedBitmap
bufferedxor(int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the xor aggregate using a temporary uncompressed bitmap.static void
bufferedxorWithContainer(BitmapStorage container, int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the xor aggregate using a temporary uncompressed bitmap.static void
legacy_orWithContainer(BitmapStorage container, EWAHCompressedBitmap... bitmaps)
Deprecated.use EWAHCompressedBitmap.or insteadstatic <T extends LogicalElement>
Tor(T... bitmaps)
Uses a priority queue to compute the or aggregate.static void
orToContainer(BitmapStorage container, EWAHCompressedBitmap... bitmaps)
Uses a priority queue to compute the or aggregate.static <T extends LogicalElement>
Txor(T... bitmaps)
Uses a priority queue to compute the xor aggregate.static void
xorToContainer(BitmapStorage container, EWAHCompressedBitmap... bitmaps)
Uses a priority queue to compute the xor aggregate.
-
-
-
Method Detail
-
bufferedand
public static EWAHCompressedBitmap bufferedand(int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the and aggregate using a temporary uncompressed bitmap.- Parameters:
bitmaps
- the source bitmapsbufsize
- buffer size used during the computation in 64-bit words (per input bitmap)- Returns:
- the or aggregate.
-
bufferedandWithContainer
public static void bufferedandWithContainer(BitmapStorage container, int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the and aggregate using a temporary uncompressed bitmap.- Parameters:
container
- where the aggregate is writtenbufsize
- buffer size used during the computation in 64-bit words (per input bitmap)bitmaps
- the source bitmaps
-
bufferedor
public static EWAHCompressedBitmap bufferedor(int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the or aggregate using a temporary uncompressed bitmap.- Parameters:
bitmaps
- the source bitmapsbufsize
- buffer size used during the computation in 64-bit words- Returns:
- the or aggregate.
-
bufferedorWithContainer
public static void bufferedorWithContainer(BitmapStorage container, int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the or aggregate using a temporary uncompressed bitmap.- Parameters:
container
- where the aggregate is writtenbufsize
- buffer size used during the computation in 64-bit wordsbitmaps
- the source bitmaps
-
bufferedxor
public static EWAHCompressedBitmap bufferedxor(int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the xor aggregate using a temporary uncompressed bitmap.- Parameters:
bitmaps
- the source bitmapsbufsize
- buffer size used during the computation in 64-bit words- Returns:
- the xor aggregate.
-
bufferedxorWithContainer
public static void bufferedxorWithContainer(BitmapStorage container, int bufsize, EWAHCompressedBitmap... bitmaps)
Compute the xor aggregate using a temporary uncompressed bitmap.- Parameters:
container
- where the aggregate is writtenbufsize
- buffer size used during the computation in 64-bit wordsbitmaps
- the source bitmaps
-
or
public static <T extends LogicalElement> T or(T... bitmaps)
Uses a priority queue to compute the or aggregate.- Type Parameters:
T
- a class extending LogicalElement (like a compressed bitmap)- Parameters:
bitmaps
- bitmaps to be aggregated- Returns:
- the or aggregate
-
orToContainer
public static void orToContainer(BitmapStorage container, EWAHCompressedBitmap... bitmaps)
Uses a priority queue to compute the or aggregate.- Parameters:
container
- where we write the resultbitmaps
- to be aggregated
-
xor
public static <T extends LogicalElement> T xor(T... bitmaps)
Uses a priority queue to compute the xor aggregate.- Type Parameters:
T
- a class extending LogicalElement (like a compressed bitmap)- Parameters:
bitmaps
- bitmaps to be aggregated- Returns:
- the xor aggregate
-
xorToContainer
public static void xorToContainer(BitmapStorage container, EWAHCompressedBitmap... bitmaps)
Uses a priority queue to compute the xor aggregate.- Parameters:
container
- where we write the resultbitmaps
- to be aggregated
-
legacy_orWithContainer
@Deprecated public static void legacy_orWithContainer(BitmapStorage container, EWAHCompressedBitmap... bitmaps)
Deprecated.use EWAHCompressedBitmap.or insteadFor internal use. Computes the bitwise or of the provided bitmaps and stores the result in the container. (This used to be the default.)- Parameters:
container
- where store the resultbitmaps
- to be aggregated- Since:
- 0.4.0
-
-