/** * Returns the cardinality of the result of a bitwise OR of the values * of the current bitmap with some other bitmap. Avoids allocating * an intermediate bitmap to hold the result of the OR. * * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int orCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); orToContainer(a, counter); return counter.getCount(); }
/** * virtually add several literal words. * * @param buffer the buffer wrapping the literal words * @param start the starting point in the array * @param number the number of literal words to add */ @Override public void addStreamOfLiteralWords(Buffer32 buffer, int start, int number) { for (int i = start; i < start + number; i++) { addLiteralWord(buffer.getWord(i)); } }
/** * virtually add several negated literal words. * * @param buffer the buffer wrapping the literal words * @param start the starting point in the array * @param number the number of literal words to add */ @Override public void addStreamOfNegatedLiteralWords(Buffer32 buffer, int start, int number) { for (int i = start; i < start + number; i++) { addLiteralWord(~buffer.getWord(i)); } }
/** * Returns the cardinality of the result of a bitwise AND of the values * of the current bitmap with some other bitmap. Avoids * allocating an intermediate bitmap to hold the result of the OR. * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int andCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); andToContainer(a, counter); return counter.getCount(); }
/** * virtually add several literal words. * * @param buffer the buffer wrapping the literal words * @param start the starting point in the array * @param number the number of literal words to add */ @Override public void addStreamOfLiteralWords(Buffer32 buffer, int start, int number) { for (int i = start; i < start + number; i++) { addLiteralWord(buffer.getWord(i)); } }
/** * Returns the cardinality of the result of a bitwise XOR of the values * of the current bitmap with some other bitmap. Avoids allocating an * intermediate bitmap to hold the result of the OR. * * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int xorCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); xorToContainer(a, counter); return counter.getCount(); }
/** * virtually add several negated literal words. * * @param buffer the buffer wrapping the literal words * @param start the starting point in the array * @param number the number of literal words to add */ @Override public void addStreamOfNegatedLiteralWords(Buffer32 buffer, int start, int number) { for (int i = start; i < start + number; i++) { addLiteralWord(~buffer.getWord(i)); } }
/** * Returns the cardinality of the result of a bitwise AND NOT of the * values of the current bitmap with some other bitmap. Avoids allocating * an intermediate bitmap to hold the result of the OR. * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int andNotCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); andNotToContainer(a, counter); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise AND NOT of the * values of the current bitmap with some other bitmap. Avoids allocating * an intermediate bitmap to hold the result of the OR. * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int andNotCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); andNotToContainer(a, counter); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise AND of the values * of the current bitmap with some other bitmap. Avoids * allocating an intermediate bitmap to hold the result of the OR. * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int andCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); andToContainer(a, counter); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise OR of the values * of the current bitmap with some other bitmap. Avoids allocating * an intermediate bitmap to hold the result of the OR. * * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int orCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); orToContainer(a, counter); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise XOR of the values * of the current bitmap with some other bitmap. Avoids allocating an * intermediate bitmap to hold the result of the OR. * * The current bitmap is not modified. * * @param a the other bitmap (it will not be modified) * @return the cardinality */ public int xorCardinality(final EWAHCompressedBitmap32 a) { final BitCounter32 counter = new BitCounter32(); xorToContainer(a, counter); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise AND of the values * of the provided bitmaps. Avoids allocating an intermediate * bitmap to hold the result of the AND. * * @param bitmaps bitmaps to AND * @return the cardinality */ public static int andCardinality( final EWAHCompressedBitmap32... bitmaps) { if (bitmaps.length == 1) return bitmaps[0].cardinality(); final BitCounter32 counter = new BitCounter32(); andWithContainer(counter, bitmaps); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise OR of the values * of the provided bitmaps. Avoids allocating an intermediate * bitmap to hold the result of the OR. * * @param bitmaps bitmaps to OR * @return the cardinality */ public static int orCardinality(final EWAHCompressedBitmap32... bitmaps) { if (bitmaps.length == 1) return bitmaps[0].cardinality(); final BitCounter32 counter = new BitCounter32(); orWithContainer(counter, bitmaps); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise OR of the values * of the provided bitmaps. Avoids allocating an intermediate * bitmap to hold the result of the OR. * * @param bitmaps bitmaps to OR * @return the cardinality */ public static int orCardinality(final EWAHCompressedBitmap32... bitmaps) { if (bitmaps.length == 1) return bitmaps[0].cardinality(); final BitCounter32 counter = new BitCounter32(); orWithContainer(counter, bitmaps); return counter.getCount(); }
/** * Returns the cardinality of the result of a bitwise AND of the values * of the provided bitmaps. Avoids allocating an intermediate * bitmap to hold the result of the AND. * * @param bitmaps bitmaps to AND * @return the cardinality */ public static int andCardinality( final EWAHCompressedBitmap32... bitmaps) { if (bitmaps.length == 1) return bitmaps[0].cardinality(); final BitCounter32 counter = new BitCounter32(); andWithContainer(counter, bitmaps); return counter.getCount(); }