use of org.apache.sysml.runtime.compress.utils.DblArrayIntListHashMap in project incubator-systemml by apache.
the class BitmapEncoder method extractBitmap.
private static UncompressedBitmap extractBitmap(int[] colIndices, MatrixBlock rawblock, ReaderColumnSelection rowReader) {
// probe map for distinct items (for value or value groups)
DblArrayIntListHashMap distinctVals = new DblArrayIntListHashMap();
// scan rows and probe/build distinct items
DblArray cellVals = null;
while ((cellVals = rowReader.nextRow()) != null) {
IntArrayList lstPtr = distinctVals.get(cellVals);
if (lstPtr == null) {
// create new objects only on demand
lstPtr = new IntArrayList();
distinctVals.appendValue(new DblArray(cellVals), lstPtr);
}
lstPtr.appendValue(rowReader.getCurrentRowIndex());
}
return new UncompressedBitmap(distinctVals, colIndices.length);
}
use of org.apache.sysml.runtime.compress.utils.DblArrayIntListHashMap in project systemml by apache.
the class BitmapEncoder method extractBitmap.
private static UncompressedBitmap extractBitmap(int[] colIndices, MatrixBlock rawblock, ReaderColumnSelection rowReader) {
// probe map for distinct items (for value or value groups)
DblArrayIntListHashMap distinctVals = new DblArrayIntListHashMap();
// scan rows and probe/build distinct items
DblArray cellVals = null;
while ((cellVals = rowReader.nextRow()) != null) {
IntArrayList lstPtr = distinctVals.get(cellVals);
if (lstPtr == null) {
// create new objects only on demand
lstPtr = new IntArrayList();
distinctVals.appendValue(new DblArray(cellVals), lstPtr);
}
lstPtr.appendValue(rowReader.getCurrentRowIndex());
}
return new UncompressedBitmap(distinctVals, colIndices.length);
}
Aggregations