src/main/java/org/apache/sysds/runtime/compress/colgroup/ColGroupFactory.java
/**
	 * Method for compressing an ColGroup.
	 * 
	 * @param colIndexes     The Column indexes to compress
	 * @param rlen           The number of rows in the columns
	 * @param ubm            The Bitmap containing all the data needed for the compression (unless Uncompressed
	 *                       ColGroup)
	 * @param compType       The CompressionType selected
	 * @param cs             The compression Settings used for the given compression
	 * @param rawMatrixBlock The copy of the original input (maybe transposed) MatrixBlock
	 * @return A Compressed ColGroup
	 */
Method for compressing an ColGroup.


Method for compressing an ColGroup .
public static ColGroup compress(int[] colIndexes, int rlen, ABitmap ubm, CompressionType compType,
		CompressionSettings cs, MatrixBlock rawMatrixBlock) {
		switch(compType) {
			case DDC:
				if(ubm.getNumValues() < 256) {
					return new ColGroupDDC1(colIndexes, rlen, ubm, cs);
				}
				else {
					return new ColGroupDDC2(colIndexes, rlen, ubm, cs);
				}
			case RLE:
				return new ColGroupRLE(colIndexes, rlen, ubm, cs);
			case OLE:
				return new ColGroupOLE(colIndexes, rlen, ubm, cs);
			case UNCOMPRESSED:
				return new ColGroupUncompressed(colIndexes, rawMatrixBlock, cs);
			default:
				throw new DMLCompressionException("Not implemented ColGroup Type compressed in factory.");
		}
	}
public static ColGroup compress ( int [ ] colIndexes , int rlen , ABitmap ubm , CompressionType compType , CompressionSettings cs , MatrixBlock rawMatrixBlock ) { switch ( compType ) { case DDC : if ( ubm . getNumValues ( ) < 256 ) { return new ColGroupDDC1 ( colIndexes , rlen , ubm , cs ) ; } else { return new ColGroupDDC2 ( colIndexes , rlen , ubm , cs ) ; } case RLE : return new ColGroupRLE ( colIndexes , rlen , ubm , cs ) ; case OLE : return new ColGroupOLE ( colIndexes , rlen , ubm , cs ) ; case UNCOMPRESSED : return new ColGroupUncompressed ( colIndexes , rawMatrixBlock , cs ) ; default : throw new DMLCompressionException ( "Not implemented ColGroup Type compressed in factory." ) ; } }
Method for compressing an ColGroup.
Method for compressing an ColGroup .