public class ColGroupUncompressed extends ColGroup
ColGroup.CompressionType| Modifier and Type | Method and Description |
|---|---|
void |
countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
Count the number of non-zeros per row
|
void |
decompressToBlock(MatrixBlock target,
int colpos)
Decompress to block.
|
void |
decompressToBlock(MatrixBlock target,
int[] colIndexTargets)
Decompress the contents of this column group into uncompressed packed columns
|
void |
decompressToBlock(MatrixBlock target,
int rl,
int ru)
Decompress the contents of this column group into the specified full matrix block.
|
long |
estimateInMemorySize()
Note: Must be overridden by child classes to account for additional data and metadata
|
double |
get(int r,
int c)
Get the value at a global row/column position.
|
ColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
MatrixBlock |
getData()
Access for superclass
|
long |
getExactSizeOnDisk()
Returns the exact serialized size of column group.
|
boolean |
getIfCountsType()
Returns true if in the getValuesAsBlock method returns values in groups (that needs to be counted) or
individually potentially repeated values
|
Iterator<IJV> |
getIterator(int rl,
int ru,
boolean inclZeros,
boolean rowMajor)
Create a column group iterator for a row index range.
|
org.apache.sysds.runtime.compress.colgroup.ColGroup.ColGroupRowIterator |
getRowIterator(int rl,
int ru)
Create a dense row iterator for a row index range.
|
double[] |
getValues()
Get all the values in the colGroup.
|
MatrixBlock |
getValuesAsBlock()
Returns the ColGroup as a MatrixBlock.
|
long |
getValuesSize() |
boolean |
isLossy()
Is Lossy
|
void |
leftMultByMatrix(double[] vector,
double[] c,
int numVals,
double[] values,
int numRows,
int numCols,
int rl,
int ru,
int vOff)
Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
column vector is assumed to be transposed already i.e.
|
void |
leftMultByMatrix(MatrixBlock matrix,
MatrixBlock result) |
void |
leftMultByRowVector(double[] vector,
double[] c,
int numVals)
Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
column vector is assumed to be transposed already i.e.
|
void |
leftMultByRowVector(double[] vector,
double[] c,
int numVals,
double[] values)
Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
column vector is assumed to be transposed already i.e.
|
void |
readFields(DataInput in)
Deserialize column group from data input.
|
void |
rightMultByMatrix(double[] matrix,
double[] result,
int numVals,
double[] values,
int rl,
int ru,
int vOff) |
void |
rightMultByMatrix(MatrixBlock vector,
MatrixBlock result,
int rl,
int ru) |
void |
rightMultByVector(double[] b,
double[] c,
int rl,
int ru,
double[] dictVals)
Multiply the slice of the matrix that this column group represents by a vector on the right.
|
void |
rightMultByVector(MatrixBlock vector,
MatrixBlock result,
int rl,
int ru) |
ColGroup |
scalarOperation(ScalarOperator op)
Perform the specified scalar operation directly on the compressed column group, without decompressing individual
cells if possible.
|
String |
toString() |
void |
unaryAggregateOperations(AggregateUnaryOperator op,
double[] ret)
Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed
matrix.
|
void |
unaryAggregateOperations(AggregateUnaryOperator op,
double[] result,
int rl,
int ru)
Unary Aggregate operator, since aggregate operators require new object output, the output becomes an uncompressed
matrix.
|
void |
unaryAggregateOperations(AggregateUnaryOperator op,
MatrixBlock ret) |
void |
write(DataOutput out)
Serializes column group to data output.
|
getColIndex, getColIndices, getNumCols, getNumRows, shiftColIndicespublic long getValuesSize()
public ColGroup.CompressionType getCompType()
ColGroupgetCompType in class ColGrouppublic MatrixBlock getData()
public long estimateInMemorySize()
ColGroupestimateInMemorySize in class ColGrouppublic void decompressToBlock(MatrixBlock target, int rl, int ru)
ColGroupdecompressToBlock in class ColGrouptarget - a matrix block where the columns covered by this column group have not yet been filled in.rl - row lowerru - row upperpublic void decompressToBlock(MatrixBlock target, int[] colIndexTargets)
ColGroupdecompressToBlock in class ColGrouptarget - a dense matrix block. The block must have enough space to hold the contents of this column
group.colIndexTargets - array that maps column indices in the original matrix block to columns of target.public void decompressToBlock(MatrixBlock target, int colpos)
ColGroupdecompressToBlock in class ColGrouptarget - dense output vectorcolpos - column to decompress, error if larger or equal numColspublic double get(int r,
int c)
ColGrouppublic void rightMultByVector(double[] b,
double[] c,
int rl,
int ru,
double[] dictVals)
ColGrouprightMultByVector in class ColGroupb - vector to multiply by (tall vector)c - accumulator for holding the resultrl - row lowerru - row upper if the internal SystemML code that performs the multiplication experiences an errordictVals - The dictionary values materializedpublic void rightMultByVector(MatrixBlock vector, MatrixBlock result, int rl, int ru)
public void rightMultByMatrix(MatrixBlock vector, MatrixBlock result, int rl, int ru)
public void rightMultByMatrix(double[] matrix,
double[] result,
int numVals,
double[] values,
int rl,
int ru,
int vOff)
rightMultByMatrix in class ColGrouppublic void leftMultByRowVector(double[] vector,
double[] c,
int numVals)
ColGroupleftMultByRowVector in class ColGroupvector - row vectorc - matrix block resultnumVals - The Number of values contained in the Column.public void leftMultByRowVector(double[] vector,
double[] c,
int numVals,
double[] values)
ColGroupleftMultByRowVector in class ColGroupvector - row vectorc - matrix block resultnumVals - The Number of values contained in the Column.values - The materialized list of values contained in the dictionary.public void leftMultByMatrix(double[] vector,
double[] c,
int numVals,
double[] values,
int numRows,
int numCols,
int rl,
int ru,
int vOff)
ColGroupleftMultByMatrix in class ColGroupvector - matrix to left multiplyc - matrix block resultnumVals - The Number of values contained in the Column.values - The materialized list of values contained in the dictionary.numRows - The number of rows in the matrix inputnumCols - The number of columns in the colGroups parent matrix.rl - The row to start the matrix multiplication fromru - The row to stop the matrix multiplication at.vOff - The offset into the first argument matrix to start at.public void leftMultByMatrix(MatrixBlock matrix, MatrixBlock result)
public ColGroup scalarOperation(ScalarOperator op)
ColGroupscalarOperation in class ColGroupop - operation to performpublic void unaryAggregateOperations(AggregateUnaryOperator op, double[] ret)
ColGroupunaryAggregateOperations in class ColGroupop - The operator usedret - Rhe output matrix block.public void unaryAggregateOperations(AggregateUnaryOperator op, MatrixBlock ret)
public void unaryAggregateOperations(AggregateUnaryOperator op, double[] result, int rl, int ru)
ColGroupunaryAggregateOperations in class ColGroupop - The operator usedresult - The output matrix block.rl - The Starting Row to do aggregation fromru - The last Row to do aggregation to (not included)public void readFields(DataInput in) throws IOException
ColGroupreadFields in class ColGroupin - data inputIOException - if IOException occurspublic void write(DataOutput out) throws IOException
ColGroupwrite in class ColGroupout - data outputIOException - if IOException occurspublic long getExactSizeOnDisk()
ColGroupgetExactSizeOnDisk in class ColGrouppublic void countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
ColGroupcountNonZerosPerRow in class ColGrouprnnz - non-zeros per rowrl - row lower bound, inclusiveru - row upper bound, exclusivepublic Iterator<IJV> getIterator(int rl, int ru, boolean inclZeros, boolean rowMajor)
ColGroupgetIterator in class ColGrouprl - row lower index, inclusiveru - row upper index, exclusiveinclZeros - include zero values into scope of iteratorrowMajor - use a row major iteration orderpublic org.apache.sysds.runtime.compress.colgroup.ColGroup.ColGroupRowIterator getRowIterator(int rl,
int ru)
ColGroupgetRowIterator in class ColGrouprl - row lower index, inclusiveru - row upper index, exclusivepublic MatrixBlock getValuesAsBlock()
ColGroupgetValuesAsBlock in class ColGrouppublic boolean getIfCountsType()
ColGroupgetIfCountsType in class ColGrouppublic double[] getValues()
ColGroupCopyright © 2020 The Apache Software Foundation. All rights reserved.