Class ColGroupOLE
- java.lang.Object
- 
- org.apache.sysds.runtime.compress.colgroup.AColGroup
- 
- org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
- 
- org.apache.sysds.runtime.compress.colgroup.AColGroupValue
- 
- org.apache.sysds.runtime.compress.colgroup.AColGroupOffset
- 
- org.apache.sysds.runtime.compress.colgroup.ColGroupOLE
 
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable,- Cloneable
 
 public class ColGroupOLE extends AColGroupOffset Class to encapsulate information about a column group that is encoded with simple lists of offsets for each set of distinct values.- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupAColGroup.CompressionType
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AColGroupbinaryRowOpLeft(BinaryOperator op, double[] v, boolean isRowSafe)Perform a binary row operation.AColGroupbinaryRowOpRight(BinaryOperator op, double[] v, boolean isRowSafe)Perform a binary row operation.voidcountNonZerosPerRow(int[] rnnz, int rl, int ru)static char[]genOffsetBitmap(int[] offsets, int len)Encodes the bitmap in blocks of offsets.org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupTypegetColGroupType()AColGroup.CompressionTypegetCompType()Obtain the compression type.int[]getCounts(int[] counts)doublegetIdx(int r, int colIdx)Get the value at a colGroup specific row/column index position.voidleftMultByAColGroup(AColGroup lhs, MatrixBlock result)Left side matrix multiplication with a column group that is transposed.voidleftMultByMatrixNoPreAgg(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu)Left multiply with this column group.AColGroupscalarOperation(ScalarOperator op)Perform the specified scalar operation directly on the compressed column group, without decompressing individual cells if possible.StringtoString()voidtsmmAColGroup(AColGroup other, MatrixBlock result)Matrix multiply with this other column group, but: 1.AColGroupunaryOperation(UnaryOperator op)- 
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupOffsetestimateInMemorySize, getBitmapOffsets, getBitmaps, getCost, getExactSizeOnDisk, hasZeros, readFields, write
 - 
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupValuecentralMoment, computeColSums, containsValue, copy, decompressToDenseBlock, decompressToSparseBlock, forceMatrixBlockDictionary, getCachedCounts, getCounts, getDictionary, getNumberNonZeros, getNumValues, replace, rexpandCols, rightMultByMatrix
 - 
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupCompressedgetMax, getMin, preAggRows, tsmm, unaryAggregateOperations, unaryAggregateOperations
 - 
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupcolSum, decompressToDenseBlock, decompressToSparseBlock, get, getColIndices, getNumCols, shiftColIndices, sliceColumn, sliceColumns
 
- 
 
- 
- 
- 
Method Detail- 
getCompTypepublic AColGroup.CompressionType getCompType() Description copied from class:AColGroupObtain the compression type.- Specified by:
- getCompTypein class- AColGroup
- Returns:
- How the elements of the column group are compressed.
 
 - 
getColGroupTypepublic org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupType getColGroupType() 
 - 
getCountspublic int[] getCounts(int[] counts) - Specified by:
- getCountsin class- AColGroupValue
 
 - 
scalarOperationpublic AColGroup scalarOperation(ScalarOperator op) Description copied from class:AColGroupPerform the specified scalar operation directly on the compressed column group, without decompressing individual cells if possible.- Specified by:
- scalarOperationin class- AColGroup
- Parameters:
- op- operation to perform
- Returns:
- version of this column group with the operation applied
 
 - 
unaryOperationpublic AColGroup unaryOperation(UnaryOperator op) - Specified by:
- unaryOperationin class- AColGroup
 
 - 
binaryRowOpLeftpublic AColGroup binaryRowOpLeft(BinaryOperator op, double[] v, boolean isRowSafe) Description copied from class:AColGroupPerform a binary row operation.- Specified by:
- binaryRowOpLeftin class- AColGroup
- Parameters:
- op- The operation to execute
- v- The vector of values to apply, should be same length as dictionary length.
- isRowSafe- True if the binary op is applied to an entire zero row and all results are zero
- Returns:
- A updated column group with the new values.
 
 - 
binaryRowOpRightpublic AColGroup binaryRowOpRight(BinaryOperator op, double[] v, boolean isRowSafe) Description copied from class:AColGroupPerform a binary row operation.- Specified by:
- binaryRowOpRightin class- AColGroup
- Parameters:
- op- The operation to execute
- v- The vector of values to apply, should be same length as dictionary length.
- isRowSafe- True if the binary op is applied to an entire zero row and all results are zero
- Returns:
- A updated column group with the new values.
 
 - 
countNonZerosPerRowpublic void countNonZerosPerRow(int[] rnnz, int rl, int ru)- Specified by:
- countNonZerosPerRowin class- AColGroupOffset
 
 - 
getIdxpublic double getIdx(int r, int colIdx)Description copied from class:AColGroupGet the value at a colGroup specific row/column index position.
 - 
leftMultByMatrixNoPreAggpublic void leftMultByMatrixNoPreAgg(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu) Description copied from class:AColGroupLeft multiply with this column group.- Specified by:
- leftMultByMatrixNoPreAggin class- AColGroup
- Parameters:
- matrix- The matrix to multiply with on the left
- result- The result to output the values into, always dense for the purpose of the column groups parallelizing
- rl- The row to begin the multiplication from on the lhs matrix
- ru- The row to end the multiplication at on the lhs matrix
- cl- The column to begin the multiplication from on the lhs matrix
- cu- The column to end the multiplication at on the lhs matrix
 
 - 
leftMultByAColGrouppublic void leftMultByAColGroup(AColGroup lhs, MatrixBlock result) Description copied from class:AColGroupLeft side matrix multiplication with a column group that is transposed.- Specified by:
- leftMultByAColGroupin class- AColGroup
- Parameters:
- lhs- The left hand side Column group to multiply with, the left hand side should be considered transposed.
- result- The result matrix to insert the result of the multiplication into
 
 - 
tsmmAColGrouppublic void tsmmAColGroup(AColGroup other, MatrixBlock result) Description copied from class:AColGroupMatrix multiply with this other column group, but: 1. Only output upper triangle values. 2. Multiply both ways with "this" being on the left and on the right. It should be guaranteed that the input is not the same as the caller of the method. The second step is achievable by treating the initial multiplied matrix, and adding its values to the correct locations in the output.- Specified by:
- tsmmAColGroupin class- AColGroup
- Parameters:
- other- The other Column group to multiply with
- result- The result matrix to put the results into
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- AColGroupOffset
 
 - 
genOffsetBitmappublic static char[] genOffsetBitmap(int[] offsets, int len)Encodes the bitmap in blocks of offsets. Within each block, the bits are stored as absolute offsets from the start of the block.- Parameters:
- offsets- uncompressed offset list
- len- logical length of the given offset list
- Returns:
- compressed version of said bitmap
 
 
- 
 
-