src/main/java/org/apache/sysds/runtime/compress/colgroup/ColGroupValue.java
/**
	 * Aggregates a double array, that contains the values to add to the output matrix.
	 * 
	 * Used in right mult by dense matrix
	 * 
	 * @param numVals  The number of values contained in the dictionary.
	 * @param b        The matrix to multiply with
	 * @param dictVals The values contained in the dictionary materialized as doubles
	 * @param cl       Lower column index to aggregate from
	 * @param cu       Upper column index to aggregate to
	 * @param cut      The total number of columns in b.
	 * @param ret      The double list to return.
	 * @return The aggregated matrix output. Note this has to be mapped to the output matrix.
	 */
Aggregates a double array, that contains the values to add to the output matrix.

Used in right mult by dense matrix

@param numVals  The number of values contained in the dictionary.
Aggregates a double array that contains the values to add to the output matrix . Used in right mult by dense matrix @param numVals The number of values contained in the dictionary .
public double[] preaggValues(final int numVals, final double[] b, double[] dictVals, final int cl, final int cu,
		final int cut, double[] ret) {
		final int retRows = (cu - cl);
		for(int k = 0, off = 0; k < numVals * _colIndexes.length; k += _colIndexes.length, off += retRows) {
			for(int h = 0; h < _colIndexes.length; h++) {
				int idb = _colIndexes[h] * cut;
				double v = dictVals[k + h];
				for(int i = cl, n = off; i < cu; i++, n += 1) {
					ret[n] += v * b[idb + i];
				}
			}
		}
		return ret;
	}
public double [ ] preaggValues ( final int numVals , final double [ ] b , double [ ] dictVals , final int cl , final int cu , final int cut , double [ ] ret ) { final int retRows = ( cu - cl ) ; for ( int k = 0 , off = 0 ; k < numVals * _colIndexes . length ; k += _colIndexes . length , off += retRows ) { for ( int h = 0 ; h < _colIndexes . length ; h ++ ) { int idb = _colIndexes [ h ] * cut ; double v = dictVals [ k + h ] ; for ( int i = cl , n = off ; i < cu ; i ++ , n += 1 ) { ret [ n ] += v * b [ idb + i ] ; } } } return ret ; }
Aggregates a double array, that contains the values to add to the output matrix.
Aggregates a double array that contains the values to add to the output matrix .
// TODO: Test if filtering out 0 here is beneficial. // TODO: utilize dictionary quantisation here and dont materialize dictVals beforehand.