Class ColGroupDeltaDDC
java.lang.Object
org.apache.sysds.runtime.compress.colgroup.AColGroup
org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
org.apache.sysds.runtime.compress.colgroup.ADictBasedColGroup
org.apache.sysds.runtime.compress.colgroup.AColGroupValue
org.apache.sysds.runtime.compress.colgroup.APreAgg
org.apache.sysds.runtime.compress.colgroup.ColGroupDDC
org.apache.sysds.runtime.compress.colgroup.ColGroupDeltaDDC
- All Implemented Interfaces:
Serializable,IContainADictionary,IMapToDataGroup
Class to encapsulate information about a column group that is first delta encoded then encoded with dense dictionary
encoding (DeltaDDC).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup
AColGroup.CompressionType -
Method Summary
Modifier and TypeMethodDescriptionAppend the other column group to this column group.appendNInternal(AColGroup[] g, int blen, int rlen) booleancontainsValue(double pattern) Detect if the column group contains a specific value.static AColGroupcreate(IColIndex colIndexes, IDictionary dict, AMapToData data, int[] cachedCounts) org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupTypeObtain the compression type.longgetNumberNonZeros(int nRows) Get the number of nonZeros contained in this column group.voidleftMultByMatrixNoPreAgg(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu) Left multiply with this column group.voidpreAggregateDense(MatrixBlock m, double[] preAgg, int rl, int ru, int cl, int cu) Pre aggregate a dense matrix block into a pre aggregate target (first step of left matrix multiplication)voidpreAggregateSparse(SparseBlock sb, double[] preAgg, int rl, int ru, int cl, int cu) voidpreAggregateThatDDCStructure(ColGroupDDC that, Dictionary ret) voidvoidstatic ColGroupDeltaDDCvoidrightDecompressingMult(MatrixBlock right, MatrixBlock ret, int rl, int ru, int nRows, int crl, int cru) Right side Matrix multiplication, iterating though this column group and adding to the retPerform the specified scalar operation directly on the compressed column group, without decompressing individual cells if possible.sliceRows(int rl, int ru) Slice range of rows out of the column group and return a new column group only containing the row segment.Perform unary operation on the column group and return a new column groupMethods inherited from class org.apache.sysds.runtime.compress.colgroup.ColGroupDDC
binaryRowOpLeft, binaryRowOpRight, combineWithSameIndex, combineWithSameIndex, convertToDDCLZW, convertToDeltaDDC, estimateInMemorySize, getCompressionInfo, getCompressionScheme, getCost, getCounts, getEncoding, getExactSizeOnDisk, getIdx, getMapToData, leftMMIdentityPreAggregateDense, morph, recompress, removeEmptyRows, sameIndexStructure, sort, sparseSelection, sparsifyFOR, splitReshape, splitReshapePushDown, toString, writeMethods inherited from class org.apache.sysds.runtime.compress.colgroup.APreAgg
getPreAggregateSize, leftMultByAColGroup, mmWithDictionary, preAggregate, preAggregateThatIndexStructure, tsmmAColGroupMethods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupValue
centralMoment, clear, computeColSums, getCounts, getNumValues, replace, rexpandColsMethods inherited from class org.apache.sysds.runtime.compress.colgroup.ADictBasedColGroup
copyAndSet, copyAndSet, decompressToDenseBlock, decompressToDenseBlockTransposed, decompressToSparseBlock, decompressToSparseBlockTransposed, getDictionary, getSparsity, reduceCols, rightMultByMatrixMethods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
getMax, getMin, getSum, isEmpty, preAggRows, sameIndexStructure, tsmm, unaryAggregateOperations, unaryAggregateOperationsMethods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup
addVector, appendN, colSum, combine, decompressToDenseBlock, decompressToSparseBlock, get, getColIndices, getNumCols, removeEmptyCols, rightMultByMatrix, selectionMultiply, shiftColIndices, sliceColumn, sliceColumns, sortColumnIndexes
-
Method Details
-
create
public static AColGroup create(IColIndex colIndexes, IDictionary dict, AMapToData data, int[] cachedCounts) -
getCompType
Description copied from class:AColGroupObtain the compression type.- Overrides:
getCompTypein classColGroupDDC- Returns:
- How the elements of the column group are compressed.
-
getColGroupType
public org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupType getColGroupType()- Overrides:
getColGroupTypein classColGroupDDC
-
read
- Throws:
IOException
-
scalarOperation
Description copied from class:AColGroupPerform the specified scalar operation directly on the compressed column group, without decompressing individual cells if possible.- Overrides:
scalarOperationin classColGroupDDC- Parameters:
op- operation to perform- Returns:
- version of this column group with the operation applied
-
unaryOperation
Description copied from class:AColGroupPerform unary operation on the column group and return a new column group- Overrides:
unaryOperationin classColGroupDDC- Parameters:
op- The operation to perform- Returns:
- The new column group
-
leftMultByMatrixNoPreAgg
public void leftMultByMatrixNoPreAgg(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu) Description copied from class:AColGroupLeft multiply with this column group.- Overrides:
leftMultByMatrixNoPreAggin classColGroupDDC- Parameters:
matrix- The matrix to multiply with on the leftresult- The result to output the values into, always dense for the purpose of the column groups parallelizingrl- The row to begin the multiplication from on the lhs matrixru- The row to end the multiplication at on the lhs matrixcl- The column to begin the multiplication from on the lhs matrixcu- The column to end the multiplication at on the lhs matrix
-
rightDecompressingMult
public void rightDecompressingMult(MatrixBlock right, MatrixBlock ret, int rl, int ru, int nRows, int crl, int cru) Description copied from class:AColGroupRight side Matrix multiplication, iterating though this column group and adding to the ret- Overrides:
rightDecompressingMultin classColGroupDDC- Parameters:
right- Right side matrix to multiply with.ret- The return matrix to add results torl- The row of this column group to multiply fromru- The row of this column group to multiply to (not inclusive)nRows- The number of rows in this column groupcrl- The right hand side column lowercru- The right hand side column upper
-
preAggregateDense
Description copied from class:APreAggPre aggregate a dense matrix block into a pre aggregate target (first step of left matrix multiplication)- Overrides:
preAggregateDensein classColGroupDDC- Parameters:
m- The matrix to preAggregatepreAgg- The preAggregate targetrl- Row lower on the left side matrixru- Row upper on the left side matrixcl- Column lower on the left side matrix (or row lower in the column group)cu- Column upper on the left side matrix (or row upper in the column group)
-
preAggregateSparse
- Overrides:
preAggregateSparsein classColGroupDDC
-
preAggregateThatDDCStructure
- Overrides:
preAggregateThatDDCStructurein classColGroupDDC
-
preAggregateThatSDCZerosStructure
- Overrides:
preAggregateThatSDCZerosStructurein classColGroupDDC
-
preAggregateThatSDCSingleZerosStructure
- Overrides:
preAggregateThatSDCSingleZerosStructurein classColGroupDDC
-
containsValue
public boolean containsValue(double pattern) Description copied from class:AColGroupDetect if the column group contains a specific value.- Overrides:
containsValuein classColGroupDDC- Parameters:
pattern- The value to look for.- Returns:
- boolean saying true if the value is contained.
-
append
Description copied from class:AColGroupAppend the other column group to this column group. This method tries to combine them to return a new column group containing both. In some cases it is possible in reasonable time, in others it is not. The result is first this column group followed by the other column group in higher row values. If it is not possible or very inefficient null is returned.- Overrides:
appendin classColGroupDDC- Parameters:
g- The other column group- Returns:
- A combined column group or null
-
appendNInternal
- Overrides:
appendNInternalin classColGroupDDC
-
getNumberNonZeros
public long getNumberNonZeros(int nRows) Description copied from class:AColGroupGet the number of nonZeros contained in this column group.- Overrides:
getNumberNonZerosin classAColGroupValue- Parameters:
nRows- The number of rows in the column group, this is used for groups that does not contain information about how many rows they have.- Returns:
- The nnz.
-
sliceRows
Description copied from class:AColGroupSlice range of rows out of the column group and return a new column group only containing the row segment. Note that this slice should maintain pointers back to the original dictionaries and only modify index structures.- Overrides:
sliceRowsin classColGroupDDC- Parameters:
rl- The row to start atru- The row to end at (not included)- Returns:
- A new column group containing the specified row range.
-