public abstract class ColGroupDDC extends ColGroupValue
ColGroup.ColGroupRowIterator, ColGroup.CompressionType
_values, LOW_LEVEL_OPT, SORT_VALUES_BY_LENGTH
_colIndexes, _numRows
Modifier | Constructor and Description |
---|---|
|
ColGroupDDC() |
protected |
ColGroupDDC(int[] colIndices,
int numRows,
double[] values) |
|
ColGroupDDC(int[] colIndices,
int numRows,
UncompressedBitmap ubm) |
Modifier and Type | Method and Description |
---|---|
protected void |
computeColSums(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus) |
protected void |
computeRowMxx(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.Builtin builtin,
int rl,
int ru) |
protected void |
computeRowSums(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
int rl,
int ru) |
protected void |
computeSum(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus) |
protected 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.
|
protected abstract int |
getCode(int r) |
protected abstract double |
getData(int r)
Generic get value for byte-length-agnostic access
to first column.
|
protected abstract double |
getData(int r,
int colIx)
Generic get value for byte-length-agnostic access.
|
Iterator<IJV> |
getIterator(int rl,
int ru,
boolean inclZeros,
boolean rowMajor)
Create a column group iterator for a row index range.
|
ColGroup.ColGroupRowIterator |
getRowIterator(int rl,
int ru)
Create a dense row iterator for a row index range.
|
protected void |
postScaling(double[] vals,
double[] c) |
protected abstract void |
setData(int r,
int code)
Generic set value for byte-length-agnostic write
of encoded value.
|
void |
unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock result,
int rl,
int ru) |
allocDVector, allocIVector, applyScalarOp, applyScalarOp, cleanupThreadLocalMemory, computeColMxx, computeMxx, containsAllZeroValue, getCounts, getCounts, getCounts, getCounts, getCounts, getCountsAsBlock, getCountsAsBlock, getNumValues, getValue, getValues, getValuesAsBlock, getValuesSize, leftMultByRowVector, preaggValues, preaggValues, setupThreadLocalMemory, setValues, sumAllValues, sumAllValues, sumValues, sumValues, sumValues, sumValues, unaryAggregateOperations
getColIndex, getColIndices, getCompType, getExactSizeOnDisk, getNumCols, getNumRows, leftMultByRowVector, readFields, readFields, rightMultByVector, scalarOperation, shiftColIndices, write, write
public ColGroupDDC()
public ColGroupDDC(int[] colIndices, int numRows, UncompressedBitmap ubm)
protected ColGroupDDC(int[] colIndices, int numRows, double[] values)
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
protected 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 unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixBlock result, int rl, int ru)
unaryAggregateOperations
in class ColGroupValue
op
- aggregation operatorresult
- output matrix blockrl
- row lower index, inclusiveru
- row upper index, exclusiveprotected void computeSum(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus)
protected void computeColSums(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus)
protected void computeRowSums(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus, int rl, int ru)
protected void computeRowMxx(MatrixBlock result, org.apache.sysml.runtime.functionobjects.Builtin builtin, int rl, int ru)
protected final void postScaling(double[] vals, double[] c)
protected abstract double getData(int r)
r
- global row indexprotected abstract double getData(int r, int colIx)
r
- global row indexcolIx
- local column indexprotected abstract void setData(int r, int code)
r
- global row indexcode
- encoded valueprotected abstract int getCode(int r)
public long estimateInMemorySize()
ColGroup
estimateInMemorySize
in class ColGroupValue
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 ColGroup.ColGroupRowIterator getRowIterator(int rl, int ru)
ColGroup
getRowIterator
in class ColGroup
rl
- row lower index, inclusiveru
- row upper index, exclusiveCopyright © 2018 The Apache Software Foundation. All rights reserved.