Class ADictBasedColGroup
java.lang.Object
org.apache.sysds.runtime.compress.colgroup.AColGroup
org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
org.apache.sysds.runtime.compress.colgroup.ADictBasedColGroup
- All Implemented Interfaces:
Serializable,IContainADictionary
- Direct Known Subclasses:
AColGroupValue,ColGroupConst
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup
AColGroup.CompressionType -
Method Summary
Modifier and TypeMethodDescriptionfinal AColGroupcopyAndSet(IDictionary newDictionary) This method copies the column group and sets the dictionary to another dictionary.final AColGroupcopyAndSet(IColIndex colIndexes) Copy the content of the column group with pointers to the previous content but with new column given Note this method does not verify if the colIndexes specified are valid and correct dimensions for the underlying column groups.final voiddecompressToDenseBlock(DenseBlock db, int rl, int ru, int offR, int offC) Decompress into the DenseBlock.final voiddecompressToDenseBlockTransposed(DenseBlock db, int rl, int ru) Decompress a range of rows into a dense transposed block.final voiddecompressToSparseBlock(SparseBlock sb, int rl, int ru, int offR, int offC) Decompress into the SparseBlock.voiddecompressToSparseBlockTransposed(SparseBlockMCSR sb, int nColOut) Decompress the column group to the sparse transposed block.longGet the upper bound estimate of in memory allocation for the column group.longReturns the exact serialized size of column group.doubleGet an approximate sparsity of this column groupPerform row sum on the internal dictionaries, and return the same index structure.final AColGrouprightMultByMatrix(MatrixBlock right, IColIndex allCols, int k) Right matrix multiplication with this column group.voidwrite(DataOutput out) Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
getMax, getMin, getSum, isEmpty, preAggRows, sameIndexStructure, sameIndexStructure, tsmm, unaryAggregateOperations, unaryAggregateOperationsMethods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup
addVector, append, appendN, binaryRowOpLeft, binaryRowOpRight, centralMoment, clear, colSum, combine, combineWithSameIndex, combineWithSameIndex, computeColSums, containsValue, decompressToDenseBlock, decompressToSparseBlock, get, getColIndices, getCompressionInfo, getCompressionScheme, getCompType, getCost, getEncoding, getIdx, getNumberNonZeros, getNumCols, getNumValues, leftMultByAColGroup, leftMultByMatrixNoPreAgg, morph, recompress, removeEmptyCols, removeEmptyRows, replace, rexpandCols, rightDecompressingMult, rightMultByMatrix, scalarOperation, selectionMultiply, shiftColIndices, sliceColumn, sliceColumns, sliceRows, sort, sortColumnIndexes, splitReshape, splitReshapePushDown, toString, tsmmAColGroup, unaryOperation
-
Method Details
-
getDictionary
- Specified by:
getDictionaryin interfaceIContainADictionary
-
decompressToDenseBlockTransposed
Description copied from class:AColGroupDecompress a range of rows into a dense transposed block.- Specified by:
decompressToDenseBlockTransposedin classAColGroup- Parameters:
db- Dense target blockrl- Row in this column group to start at.ru- Row in this column group to end at.
-
decompressToSparseBlockTransposed
Description copied from class:AColGroupDecompress the column group to the sparse transposed block. Note that the column groups would only need to decompress into specific sub rows of the Sparse block- Specified by:
decompressToSparseBlockTransposedin classAColGroup- Parameters:
sb- Sparse target blocknColOut- The number of columns in the sb.
-
decompressToDenseBlock
Description copied from class:AColGroupDecompress into the DenseBlock. (no NNZ handling)- Specified by:
decompressToDenseBlockin classAColGroup- Parameters:
db- Target DenseBlockrl- Row to start decompression fromru- Row to end decompression at (not inclusive)offR- Row offset into the target to decompressoffC- Column offset into the target to decompress
-
decompressToSparseBlock
Description copied from class:AColGroupDecompress into the SparseBlock. (no NNZ handling) Note this method is allowing to calls to append since it is assumed that the sparse column indexes are sorted afterwards- Specified by:
decompressToSparseBlockin classAColGroup- Parameters:
sb- Target SparseBlockrl- Row to start decompression fromru- Row to end decompression at (not inclusive)offR- Row offset into the target to decompressoffC- Column offset into the target to decompress
-
write
- Throws:
IOException
-
getExactSizeOnDisk
public long getExactSizeOnDisk()Description copied from class:AColGroupReturns the exact serialized size of column group. This can be used for example for buffer preallocation.- Overrides:
getExactSizeOnDiskin classAColGroup- Returns:
- exact serialized size for column group
-
estimateInMemorySize
public long estimateInMemorySize()Description copied from class:AColGroupGet the upper bound estimate of in memory allocation for the column group.- Overrides:
estimateInMemorySizein classAColGroup- Returns:
- an upper bound on the number of bytes used to store this ColGroup in memory.
-
rightMultByMatrix
Description copied from class:AColGroupRight matrix multiplication with this column group. This method can return null, meaning that the output overlapping group would have been empty.- Specified by:
rightMultByMatrixin classAColGroup- Parameters:
right- The MatrixBlock on the right of this matrix multiplicationallCols- A pre-materialized list of all col indexes, that can be shared across all column groups if use full, can be set to null.k- The parallelization degree allowed internally in this operation.- Returns:
- The new Column Group or null that is the result of the matrix multiplication.
-
copyAndSet
Description copied from class:AColGroupCopy the content of the column group with pointers to the previous content but with new column given Note this method does not verify if the colIndexes specified are valid and correct dimensions for the underlying column groups.- Specified by:
copyAndSetin classAColGroup- Parameters:
colIndexes- the new indexes to use in the copy- Returns:
- a new object with pointers to underlying data.
-
copyAndSet
This method copies the column group and sets the dictionary to another dictionary. The method shallow copies underlying data structures. NOTE: Be very carefull with this since it invalidate the contracts maintained via standard compression.- Parameters:
newDictionary- A new dictionary to point to.- Returns:
- A new shallow copy of the column group
-
reduceCols
Description copied from class:AColGroupPerform row sum on the internal dictionaries, and return the same index structure. This method returns null on empty column groups. Note this method does not guarantee correct behavior if the given group is AMorphingGroup, instead it should be morphed to a valid columngroup via extractCommon first.- Specified by:
reduceColsin classAColGroup- Returns:
- The reduced colgroup.
-
getSparsity
public double getSparsity()Description copied from class:AColGroupGet an approximate sparsity of this column group- Specified by:
getSparsityin classAColGroup- Returns:
- the approximate sparsity of this columngroup
-