Java Code Examples for com.googlecode.javaewah.EWAHCompressedBitmap#bitmapOf()

The following examples show how to use com.googlecode.javaewah.EWAHCompressedBitmap#bitmapOf() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BitmapFactory.java    From RoaringBitmap with Apache License 2.0 4 votes vote down vote up
public static Bitmap newEwahBitmap(int[] data) {
  EWAHCompressedBitmap ewah = EWAHCompressedBitmap.bitmapOf(data);
  return new EwahBitmapWrapper(ewah);
}
 
Example 2
Source File: SparseBitmap.java    From symbol-sdk-java with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new <code>SparseBitmap</code> that is empty.
 *
 * @return A new <code>SparseBitmap</code> that is empty (no bits set).
 */
public static SparseBitmap createEmpty() {
    return new SparseBitmap(EWAHCompressedBitmap.bitmapOf());
}
 
Example 3
Source File: SparseBitmap.java    From symbol-sdk-java with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new <code>SparseBitmap</code> from data that are already sorted in strictly
 * ascending order (duplicate values are okay).
 *
 * @param bitsToSet The bits to set.
 * @return A new <code>SparseBitmap</code> with the given bits set.
 */
public static SparseBitmap createFromSortedData(final int... bitsToSet) {
    return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet));
}
 
Example 4
Source File: SparseBitmap.java    From symbol-sdk-java with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new <code>SparseBitmap</code> from unsorted data.
 *
 * @param bitsToSet The bits to set.
 * @return A new <code>SparseBitmap</code> with the given bits set.
 */
public static SparseBitmap createFromUnsortedData(final int... bitsToSet) {
    Arrays.sort(bitsToSet);
    return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet));
}
 
Example 5
Source File: SparseBitmap.java    From nem.core with MIT License 2 votes vote down vote up
/**
 * Creates a new <code>SparseBitmap</code> that is empty.
 *
 * @return A new <code>SparseBitmap</code> that is empty (no bits set).
 */
public static SparseBitmap createEmpty() {
	return new SparseBitmap(EWAHCompressedBitmap.bitmapOf());
}
 
Example 6
Source File: SparseBitmap.java    From nem.core with MIT License 2 votes vote down vote up
/**
 * Creates a new <code>SparseBitmap</code> from data that are already sorted
 * in strictly ascending order (duplicate values are okay).
 *
 * @param bitsToSet The bits to set.
 * @return A new <code>SparseBitmap</code> with the given bits set.
 */
public static SparseBitmap createFromSortedData(final int... bitsToSet) {
	return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet));
}
 
Example 7
Source File: SparseBitmap.java    From nem.core with MIT License 2 votes vote down vote up
/**
 * Creates a new <code>SparseBitmap</code> from unsorted data.
 *
 * @param bitsToSet The bits to set.
 * @return A new <code>SparseBitmap</code> with the given bits set.
 */
public static SparseBitmap createFromUnsortedData(final int... bitsToSet) {
	Arrays.sort(bitsToSet);
	return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet));
}