public class ColGroupSDCSingleZeros extends ColGroupValue
AColGroup.CompressionType
Modifier and Type | Method and Description |
---|---|
AColGroup |
binaryRowOp(BinaryOperator op,
double[] v,
boolean sparseSafe,
boolean left)
Perform a binary row operation.
|
void |
countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
Count the number of non-zeros per row
|
long |
estimateInMemorySize()
Get the upper bound estimate of in memory allocation for the column group.
|
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.
|
int[] |
getCounts(int[] counts) |
int[] |
getCounts(int rl,
int ru,
int[] counts) |
long |
getExactSizeOnDisk()
Returns the exact serialized size of column group.
|
int |
getIndexStructureHash() |
void |
preAggregate(MatrixBlock m,
MatrixBlock preAgg,
int rl,
int ru)
Pre aggregate for left Multiplication.
|
void |
preAggregateDense(MatrixBlock m,
MatrixBlock preAgg,
int rl,
int ru,
int cl,
int cu) |
Dictionary |
preAggregateThatDDCStructure(ColGroupDDC that,
Dictionary ret) |
Dictionary |
preAggregateThatSDCSingleStructure(ColGroupSDCSingle that,
Dictionary ret,
boolean preModified) |
Dictionary |
preAggregateThatSDCSingleZerosStructure(ColGroupSDCSingleZeros that,
Dictionary ret) |
Dictionary |
preAggregateThatSDCStructure(ColGroupSDC that,
Dictionary ret,
boolean preModified) |
Dictionary |
preAggregateThatSDCZerosStructure(ColGroupSDCZeros that,
Dictionary ret) |
void |
readFields(DataInput in)
Deserialize column group from data input.
|
AColGroup |
replace(double pattern,
double replace)
Make a copy of the column group values, and replace all values that match pattern with replacement value.
|
boolean |
sameIndexStructure(ColGroupCompressed that) |
AColGroup |
scalarOperation(ScalarOperator op)
Perform the specified scalar operation directly on the compressed column group, without decompressing individual
cells if possible.
|
String |
toString() |
void |
write(DataOutput out)
Serializes column group to data output.
|
addMatrixToResult, allocatePreAggregate, cleanupThreadLocalMemory, containsValue, copy, copyAndSet, copyAndSet, copyAndSet, copyAndSet, decompressToBlock, getCachedCounts, getCounts, getCounts, getDictionary, getIfCountsType, getNumberNonZeros, getNumRows, getNumValues, getValues, getValuesAsBlock, isDense, isLossy, leftMultByAColGroup, leftMultByMatrix, leftMultByPreAggregateMatrix, leftMultByPreAggregateMatrix, preAggregateThatIndexStructure, rightMultByMatrix, setupLeftMultThreadLocalMemory, setupThreadLocalMemory, tsmmAColGroup
computeColSums, getMax, getMin, tsmm, unaryAggregateOperations
colSum, decompressToBlock, getColIndices, getNumCols, leftMultByMatrix, shiftColIndices, sliceColumn, sliceColumns
public AColGroup.CompressionType getCompType()
AColGroup
getCompType
in class AColGroup
public org.apache.sysds.runtime.compress.colgroup.AColGroup.ColGroupType getColGroupType()
AColGroup
public double get(int r, int c)
AColGroup
public void countNonZerosPerRow(int[] rnnz, int rl, int ru)
AColGroup
countNonZerosPerRow
in class AColGroup
rnnz
- non-zeros per rowrl
- row lower bound, inclusiveru
- row upper bound, exclusivepublic int[] getCounts(int[] counts)
getCounts
in class ColGroupValue
public int[] getCounts(int rl, int ru, int[] counts)
getCounts
in class ColGroupValue
public void preAggregate(MatrixBlock m, MatrixBlock preAgg, int rl, int ru)
ColGroupValue
preAggregate
in class ColGroupValue
m
- Matrix to preAggregatepreAgg
- Matrix to preAggregate intorl
- Start rowru
- End rowpublic void preAggregateDense(MatrixBlock m, MatrixBlock preAgg, int rl, int ru, int cl, int cu)
preAggregateDense
in class ColGroupValue
public long estimateInMemorySize()
AColGroup
estimateInMemorySize
in class ColGroupValue
public AColGroup scalarOperation(ScalarOperator op)
AColGroup
scalarOperation
in class AColGroup
op
- operation to performpublic AColGroup binaryRowOp(BinaryOperator op, double[] v, boolean sparseSafe, boolean left)
AColGroup
binaryRowOp
in class AColGroup
op
- 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 containedpublic void write(DataOutput out) throws IOException
AColGroup
write
in class ColGroupValue
out
- data outputIOException
- if IOException occurspublic void readFields(DataInput in) throws IOException
AColGroup
readFields
in class ColGroupValue
in
- data inputIOException
- if IOException occurspublic long getExactSizeOnDisk()
AColGroup
getExactSizeOnDisk
in class ColGroupValue
public boolean sameIndexStructure(ColGroupCompressed that)
public int getIndexStructureHash()
public String toString()
toString
in class ColGroupValue
public Dictionary preAggregateThatDDCStructure(ColGroupDDC that, Dictionary ret)
public Dictionary preAggregateThatSDCStructure(ColGroupSDC that, Dictionary ret, boolean preModified)
public Dictionary preAggregateThatSDCZerosStructure(ColGroupSDCZeros that, Dictionary ret)
public Dictionary preAggregateThatSDCSingleZerosStructure(ColGroupSDCSingleZeros that, Dictionary ret)
public Dictionary preAggregateThatSDCSingleStructure(ColGroupSDCSingle that, Dictionary ret, boolean preModified)
public AColGroup replace(double pattern, double replace)
AColGroup
replace
in class ColGroupValue
pattern
- The value to look forreplace
- The value to replace the other value withCopyright © 2021 The Apache Software Foundation. All rights reserved.