src/main/java/org/apache/sysds/runtime/compress/BitmapEncoder.java
/**
	 * Make the multi column Bitmap.
	 * 
	 * @param distinctVals The distinct values fround in the columns selected.
	 * @param numColumns   Number of columns
	 * @param numZeros     Number of zero rows. aka rows only containing zero values.
	 * @return The Bitmap.
	 */
Make the multi column Bitmap.

@param distinctVals The distinct values fround in the columns selected.
@param numColumns   Number of columns
@param numZeros     Number of zero rows. aka rows only containing zero values.
@return The Bitmap.
Make the multi column Bitmap . @param distinctVals The distinct values fround in the columns selected . @param numColumns Number of columns @param numZeros Number of zero rows . aka rows only containing zero values . @return The Bitmap .
private static Bitmap makeBitmap(DblArrayIntListHashMap distinctVals, int numColumns, int numZeros) {
		int numVals = distinctVals.size();
		int numCols = numColumns;
		double[] values = new double[numVals * numCols];
		IntArrayList[] offsetsLists = new IntArrayList[numVals];
		int bitmapIx = 0;
		for(DArrayIListEntry val : distinctVals.extractValues()) {
			System.arraycopy(val.key.getData(), 0, values, bitmapIx * numCols, numCols);
			offsetsLists[bitmapIx++] = val.value;
		}
		numZeros = (numColumns > 1) ? numZeros + 1 : numZeros;
		return new Bitmap(numCols, offsetsLists, numZeros, values);
	}
private static Bitmap makeBitmap ( DblArrayIntListHashMap distinctVals , int numColumns , int numZeros ) { int numVals = distinctVals . size ( ) ; int numCols = numColumns ; double [ ] values = new double [ numVals * numCols ] ; IntArrayList [ ] offsetsLists = new IntArrayList [ numVals ] ; int bitmapIx = 0 ; for ( DArrayIListEntry val : distinctVals . extractValues ( ) ) { System . arraycopy ( val . key . getData ( ) , 0 , values , bitmapIx * numCols , numCols ) ; offsetsLists [ bitmapIx ++ ] = val . value ; } numZeros = ( numColumns > 1 ) ? numZeros + 1 : numZeros ; return new Bitmap ( numCols , offsetsLists , numZeros , values ) ; }
Make the multi column Bitmap.
Make the multi column Bitmap .
// added for one pass bitmap construction // Convert inputs to arrays // HACK; we make sure that the first sparse unsafe operation assume // that we have entries with zero values. This makes the first sparse // unsafe operation slightly slower, if the input compressed matrix is // fully dense, aka containing no zero values. // This is required for multi-column colGroups.