src/main/java/org/apache/sysds/runtime/compress/BitmapEncoder.java
/**
	 * Generate uncompressed bitmaps for a set of columns in an uncompressed matrix block.
	 * 
	 * @param colIndices   Indexes (within the block) of the columns to extract
	 * @param rawBlock     An uncompressed matrix block; can be dense or sparse
	 * @param compSettings The compression settings used for the compression.
	 * @return uncompressed bitmap representation of the columns
	 */
Generate uncompressed bitmaps for a set of columns in an uncompressed matrix block.

@param colIndices   Indexes (within the block) of the columns to extract
@param rawBlock     An uncompressed matrix block; can be dense or sparse
@param compSettings The compression settings used for the compression.
@return uncompressed bitmap representation of the columns
Generate uncompressed bitmaps for a set of columns in an uncompressed matrix block . @param colIndices Indexes ( within the block ) of the columns to extract @param rawBlock An uncompressed matrix block ; can be dense or sparse @param compSettings The compression settings used for the compression . @return uncompressed bitmap representation of the columns
public static ABitmap extractBitmap(int[] colIndices, MatrixBlock rawBlock, CompressionSettings compSettings) {
		Bitmap res = null;
		if(colIndices.length == 1) {
			res = extractBitmap(colIndices[0], rawBlock, compSettings);
		}
		else {
			ReaderColumnSelection reader = null;
			if(rawBlock.isInSparseFormat() && compSettings.transposeInput)
				reader = new ReaderColumnSelectionSparse(rawBlock, colIndices, compSettings);
			else
				reader = new ReaderColumnSelectionDense(rawBlock, colIndices, compSettings);
			res = extractBitmap(colIndices, reader);
		}
		if(compSettings.lossy) {
			return makeBitmapLossy(res);
		}
		else {
			return res;
		}
	}
public static ABitmap extractBitmap ( int [ ] colIndices , MatrixBlock rawBlock , CompressionSettings compSettings ) { Bitmap res = null ; if ( colIndices . length == 1 ) { res = extractBitmap ( colIndices [ 0 ] , rawBlock , compSettings ) ; } else { ReaderColumnSelection reader = null ; if ( rawBlock . isInSparseFormat ( ) && compSettings . transposeInput ) reader = new ReaderColumnSelectionSparse ( rawBlock , colIndices , compSettings ) ; else reader = new ReaderColumnSelectionDense ( rawBlock , colIndices , compSettings ) ; res = extractBitmap ( colIndices , reader ) ; } if ( compSettings . lossy ) { return makeBitmapLossy ( res ) ; } else { return res ; } }
Generate uncompressed bitmaps for a set of columns in an uncompressed matrix block.
Generate uncompressed bitmaps for a set of columns in an uncompressed matrix block .
// note: no sparse column selection reader because low potential // single column selection // multiple column selection (general case)