public abstract class ColGroupDDC extends ColGroupValue
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.
|
double |
get(int r,
int c)
Get the value at a global row/column position.
|
ColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
int[] |
getCounts(int[] counts) |
int[] |
getCounts(int rl,
int ru,
int[] counts) |
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.
|
void |
leftMultByMatrix(double[] a,
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 |
leftMultByRowVector(double[] a,
double[] result,
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[] a,
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 |
postScaling(double[] values,
double[] vals,
double[] c,
int numVals) |
void |
postScaling(double[] values,
double[] vals,
double[] c,
int numVals,
int i,
int totalCols) |
double[] |
preAggregate(double[] a,
int numVals) |
double[] |
preAggregate(double[] a,
int numVals,
int aRows)
Pre aggregates a specific row from the input a which can be a row or a matrix.
|
void |
rightMultByMatrix(double[] b,
double[] c,
int numVals,
double[] values,
int rl,
int ru,
int vOff) |
String |
toString() |
cleanupThreadLocalMemory, getByteValues, getCounts, getCounts, getExactSizeOnDisk, getIfCountsType, getNumValues, getValues, getValuesAsBlock, isLossy, readFields, setupThreadLocalMemory, unaryAggregateOperations, unaryAggregateOperations, write
estimateInMemorySize, getColIndex, getColIndices, getNumCols, getNumRows, rightMultByVector, scalarOperation, shiftColIndices
public ColGroup.CompressionType getCompType()
ColGroup
getCompType
in class ColGroup
public void decompressToBlock(MatrixBlock target, int rl, int ru)
ColGroup
decompressToBlock
in class ColGroup
target
- 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)
ColGroup
decompressToBlock
in class ColGroup
target
- 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)
ColGroup
decompressToBlock
in class ColGroup
target
- dense output vectorcolpos
- column to decompress, error if larger or equal numColspublic double get(int r, int c)
ColGroup
public void countNonZerosPerRow(int[] rnnz, int rl, int ru)
ColGroup
countNonZerosPerRow
in class ColGroup
rnnz
- non-zeros per rowrl
- row lower bound, inclusiveru
- row upper bound, exclusivepublic void postScaling(double[] values, double[] vals, double[] c, int numVals)
public void postScaling(double[] values, double[] vals, double[] c, int numVals, int i, int totalCols)
public int[] getCounts(int[] counts)
getCounts
in class ColGroupValue
public int[] getCounts(int rl, int ru, int[] counts)
getCounts
in class ColGroupValue
public void rightMultByMatrix(double[] b, double[] c, int numVals, double[] values, int rl, int ru, int vOff)
rightMultByMatrix
in class ColGroup
public void leftMultByMatrix(double[] a, double[] c, int numVals, double[] values, int numRows, int numCols, int rl, int ru, int voff)
ColGroup
leftMultByMatrix
in class ColGroup
a
- 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 leftMultByRowVector(double[] a, double[] result, int numVals)
ColGroup
leftMultByRowVector
in class ColGroup
a
- row vectorresult
- matrix block resultnumVals
- The Number of values contained in the Column.public double[] preAggregate(double[] a, int numVals)
public double[] preAggregate(double[] a, int numVals, int aRows)
a
- the input vector or matrix to multiply withnumVals
- the number of values contained in the dictionaryaRows
- the row index from apublic void leftMultByRowVector(double[] a, double[] c, int numVals, double[] values)
ColGroup
leftMultByRowVector
in class ColGroup
a
- row vectorc
- matrix block resultnumVals
- The Number of values contained in the Column.values
- The materialized list of values contained in the dictionary.public Iterator<IJV> getIterator(int rl, int ru, boolean inclZeros, boolean rowMajor)
ColGroup
getIterator
in class ColGroup
rl
- 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)
ColGroup
getRowIterator
in class ColGroup
rl
- row lower index, inclusiveru
- row upper index, exclusivepublic String toString()
toString
in class ColGroupValue
Copyright © 2020 The Apache Software Foundation. All rights reserved.