public class ColGroupEmpty extends ColGroupCompressed
AColGroup.CompressionType| Constructor and Description |
|---|
ColGroupEmpty(int[] colIndices,
int numRows)
Constructs an Constant Colum Group, that contains only one tuple, with the given value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMinMax(double[] ret) |
AColGroup |
binaryRowOp(BinaryOperator op,
double[] v,
boolean sparseSafe,
boolean left)
Perform a binary row operation.
|
boolean |
containsValue(double pattern)
Detect if the column group contains a specific value.
|
AColGroup |
copy()
Get a copy of this column group.
|
void |
countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
Count the number of non-zeros per row
|
void |
decompressToBlockSafe(MatrixBlock target,
int rl,
int ru,
int offT)
Decompress the contents of this column group into the specified full matrix block while managing the number of
non zeros.
|
void |
decompressToBlockUnSafe(MatrixBlock target,
int rl,
int ru,
int offT)
Decompress the contents of the columngroup unsafely, meaning that it does not count nonzero values.
|
static ColGroupEmpty |
generate(int nCol,
int nRow) |
double |
get(int r,
int c)
Get the value at a global row/column position.
|
org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupType |
getColGroupType()
Internally get the specific type of ColGroup, this could be extracted from the object but that does not allow for
nice switches in the code.
|
AColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
long |
getNumberNonZeros()
Get the number of nonZeros contained in this column group.
|
int |
getNumValues()
Obtain number of distinct tuples in contained sets of values associated with this column group.
|
double[] |
getValues()
Get all the values in the colGroup.
|
MatrixBlock |
getValuesAsBlock()
Returns the ColGroup as a MatrixBlock.
|
boolean |
isDense()
Is dense, signals that the entire column group is allocated an processed.
|
boolean |
isLossy()
Is Lossy
|
void |
leftMultByAColGroup(AColGroup lhs,
MatrixBlock c)
Left side matrix multiplication with a column group that is transposed.
|
void |
leftMultByMatrix(MatrixBlock a,
MatrixBlock c,
int rl,
int ru)
Left multiply with this column group.
|
AColGroup |
replace(double pattern,
double replace)
Make a copy of the column group values, and replace all values that match pattern with replacement value.
|
AColGroup |
rightMultByMatrix(MatrixBlock right)
Right matrix multiplication with this column group.
|
AColGroup |
scalarOperation(ScalarOperator op)
Perform the specified scalar operation directly on the compressed column group, without decompressing individual
cells if possible.
|
void |
tsmm(double[] result,
int numColumns)
Do a transposed self matrix multiplication on the left side t(x) %*% x.
|
void |
tsmm(double[] result,
int numColumns,
int idxStart,
int idxEnd)
Do a transposed self matrix multiplication on the left side t(x) %*% x.
|
estimateInMemorySize, getMax, getMin, getNumRows, toString, unaryAggregateOperations, unaryAggregateOperationsdecompressColumnToBlockUnSafe, decompressToBlockUnSafe, getColIndices, getExactSizeOnDisk, getNumCols, leftMultByMatrix, readFields, shiftColIndices, sliceColumn, sliceColumns, writepublic ColGroupEmpty(int[] colIndices,
int numRows)
colIndices - The Colum indexes for the column group.numRows - The number of rows contained in the group.public static ColGroupEmpty generate(int nCol, int nRow)
public AColGroup.CompressionType getCompType()
AColGroupgetCompType in class AColGrouppublic org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupType getColGroupType()
AColGrouppublic void decompressToBlockSafe(MatrixBlock target, int rl, int ru, int offT)
AColGroupdecompressToBlockSafe in class AColGrouptarget - a matrix block where the columns covered by this column group have not yet been filled in.rl - row lowerru - row upperoffT - Offset into target to assign frompublic void decompressToBlockUnSafe(MatrixBlock target, int rl, int ru, int offT)
AColGroupdecompressToBlockUnSafe in class AColGrouptarget - a matrix block where the columns covered by this column group have not yet been filled in.rl - row lowerru - row upperoffT - Offset into target to assign frompublic double get(int r,
int c)
AColGrouppublic void leftMultByMatrix(MatrixBlock a, MatrixBlock c, int rl, int ru)
AColGroupleftMultByMatrix in class AColGroupa - The matrix to multiply with on the leftc - 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 matrixpublic AColGroup scalarOperation(ScalarOperator op)
AColGroupscalarOperation in class AColGroupop - operation to performpublic AColGroup binaryRowOp(BinaryOperator op, double[] v, boolean sparseSafe, boolean left)
AColGroupbinaryRowOp in class AColGroupop - The operation to executev - The vector of values to apply, should be same length as dictionary length.sparseSafe - True if the operation return 0 on all instances of values in v -- op(v[?], 0)left - Specifies if the operation is executed on the left or right side of the values contained.public void countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
AColGroupcountNonZerosPerRow in class AColGrouprnnz - non-zeros per rowrl - row lower bound, inclusiveru - row upper bound, exclusivepublic int getNumValues()
AColGroupgetNumValues in class AColGrouppublic double[] getValues()
AColGroupgetValues in class ColGroupCompressedpublic void addMinMax(double[] ret)
addMinMax in class ColGroupCompressedpublic boolean isLossy()
AColGroupisLossy in class ColGroupCompressedpublic MatrixBlock getValuesAsBlock()
AColGroupgetValuesAsBlock in class AColGrouppublic void tsmm(double[] result,
int numColumns)
AColGrouppublic void tsmm(double[] result,
int numColumns,
int idxStart,
int idxEnd)
AColGrouptsmm in class AColGroupresult - A row major dense allocation of a matrixBlock, of size [numColumns x numColumns]numColumns - The number of columns in the row major result matrix.idxStart - The starting index in the _colIndexes.idxEnd - The ending index in the _colIndexes.public void leftMultByAColGroup(AColGroup lhs, MatrixBlock c)
AColGroupleftMultByAColGroup in class AColGrouplhs - The left hand side Column group to multiply with, the left hand side should be considered
transposed.c - The result matrix to insert the result of the multiplication intopublic boolean isDense()
AColGrouppublic AColGroup copy()
AColGrouppublic boolean containsValue(double pattern)
AColGroupcontainsValue in class AColGrouppattern - The value to look for.public long getNumberNonZeros()
AColGroupgetNumberNonZeros in class AColGrouppublic AColGroup rightMultByMatrix(MatrixBlock right)
AColGrouprightMultByMatrix in class AColGroupright - The matrixBlock on the right of this matrix multiplicationCopyright © 2021 The Apache Software Foundation. All rights reserved.