public abstract class ColGroupValue extends ColGroup
ColGroup.CompressionType
Modifier and Type | Field and Description |
---|---|
protected double[] |
_values
Distinct values associated with individual bitmaps.
|
static boolean |
LOW_LEVEL_OPT |
static boolean |
SORT_VALUES_BY_LENGTH |
_colIndexes, _numRows
Modifier | Constructor and Description |
---|---|
|
ColGroupValue() |
protected |
ColGroupValue(int[] colIndices,
int numRows,
double[] values)
Constructor for subclass methods that need to create shallow copies
|
|
ColGroupValue(int[] colIndices,
int numRows,
UncompressedBitmap ubm)
Stores the headers for the individual bitmaps.
|
Modifier and Type | Method and Description |
---|---|
protected double[] |
applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
Method for use by subclasses.
|
protected double[] |
applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op,
double newVal,
int numCols) |
protected void |
computeColMxx(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.Builtin builtin,
boolean zeros)
NOTE: Shared across OLE/RLE/DDC because value-only computation.
|
protected void |
computeMxx(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.Builtin builtin,
boolean zeros)
NOTE: Shared across OLE/RLE/DDC because value-only computation.
|
protected int |
containsAllZeroValue() |
long |
estimateInMemorySize()
Note: Must be overridden by child classes to account for additional data
and metadata
|
int |
getNumValues()
Obtain number of distrinct sets of values associated with the bitmaps in this column group.
|
double[] |
getValues() |
protected double[] |
preaggValues(int numVals,
double[] b) |
protected double[] |
sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff) |
protected double |
sumValues(int valIx) |
protected double |
sumValues(int valIx,
double[] b) |
protected double |
sumValues(int valIx,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff) |
void |
unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock result) |
abstract void |
unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock result,
int rl,
int ru) |
countNonZerosPerRow, decompressToBlock, decompressToBlock, decompressToBlock, get, getColIndex, getColIndices, getCompType, getExactSizeOnDisk, getNumCols, getNumRows, leftMultByRowVector, readFields, rightMultByVector, scalarOperation, shiftColIndices, write
public static boolean LOW_LEVEL_OPT
public static final boolean SORT_VALUES_BY_LENGTH
protected double[] _values
public ColGroupValue()
public ColGroupValue(int[] colIndices, int numRows, UncompressedBitmap ubm)
colIndices
- indices (within the block) of the columns included in this
columnnumRows
- total number of rows in the parent blockubm
- Uncompressed bitmap representation of the blockprotected ColGroupValue(int[] colIndices, int numRows, double[] values)
colIndices
- raw column index informationnumRows
- number of rows in the blockvalues
- set of distinct values for the block (associated bitmaps are
kept in the subclass)public long estimateInMemorySize()
ColGroup
estimateInMemorySize
in class ColGroup
public int getNumValues()
public double[] getValues()
protected int containsAllZeroValue()
protected final double sumValues(int valIx)
protected final double sumValues(int valIx, org.apache.sysml.runtime.functionobjects.KahanFunction kplus, org.apache.sysml.runtime.instructions.cp.KahanObject kbuff)
protected final double[] sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus, org.apache.sysml.runtime.instructions.cp.KahanObject kbuff)
protected final double sumValues(int valIx, double[] b)
protected final double[] preaggValues(int numVals, double[] b)
protected void computeMxx(MatrixBlock result, org.apache.sysml.runtime.functionobjects.Builtin builtin, boolean zeros)
result
- output matrix blockbuiltin
- function objectzeros
- indicator if column group contains zero valuesprotected void computeColMxx(MatrixBlock result, org.apache.sysml.runtime.functionobjects.Builtin builtin, boolean zeros)
result
- output matrix blockbuiltin
- function objectzeros
- indicator if column group contains zero valuesprotected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op) throws DMLRuntimeException
op
- scalar operation to performDMLRuntimeException
- if DMLRuntimeException occursprotected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op, double newVal, int numCols) throws DMLRuntimeException
DMLRuntimeException
public void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixBlock result) throws DMLRuntimeException
unaryAggregateOperations
in class ColGroup
DMLRuntimeException
public abstract void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixBlock result, int rl, int ru) throws DMLRuntimeException
op
- aggregation operatorresult
- output matrix blockrl
- row lower index, inclusiveru
- row upper index, exclusiveDMLRuntimeException
- on invalid inputsCopyright © 2017 The Apache Software Foundation. All rights reserved.