public class ColGroupUncompressed extends ColGroup
ColGroup.CompressionType_colIndexes, _numRows| Constructor and Description |
|---|
ColGroupUncompressed() |
ColGroupUncompressed(ArrayList<ColGroup> groupsToDecompress)
Constructor for creating temporary decompressed versions of one or more
compressed column groups.
|
ColGroupUncompressed(int[] colIndices,
int numRows,
MatrixBlock data)
Constructor for internal use.
|
ColGroupUncompressed(List<Integer> colIndicesList,
MatrixBlock rawblock)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
MatrixBlock |
getData()
Access for superclass
|
long |
getExactSizeOnDisk()
Returns the exact serialized size of column group.
|
void |
leftMultByRowVector(MatrixBlock vector,
MatrixBlock result)
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(MatrixBlock vector,
MatrixBlock result,
int k) |
void |
readFields(DataInput in)
Deserializes column group from data input.
|
void |
rightMultByVector(MatrixBlock vector,
MatrixBlock result,
int rl,
int ru)
Multiply the slice of the matrix that this column group represents by a
vector on the right.
|
ColGroup |
scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
Perform the specified scalar operation directly on the compressed column
group, without decompressing individual cells if possible.
|
void |
unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock ret) |
void |
write(DataOutput out)
Serializes column group to data output.
|
getColIndex, getColIndices, getCompType, getNumCols, getNumRows, shiftColIndicespublic ColGroupUncompressed()
public ColGroupUncompressed(List<Integer> colIndicesList, MatrixBlock rawblock) throws DMLRuntimeException
colIndicesList - indices (relative to the current block) of the columns that
this column group represents.rawblock - the uncompressed block; uncompressed data must be present at
the time that the constructor is calledDMLRuntimeException - if DMLRuntimeException occurspublic ColGroupUncompressed(ArrayList<ColGroup> groupsToDecompress)
groupsToDecompress - compressed columns to subsume. Must contain at least one
element.public ColGroupUncompressed(int[] colIndices,
int numRows,
MatrixBlock data)
colIndices - column mapping for this column groupnumRows - number of rows in the column, for passing to the superclassdata - matrix blockpublic 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(MatrixBlock vector, MatrixBlock result, int rl, int ru) throws DMLRuntimeException
ColGrouprightMultByVector in class ColGroupvector - vector to multiply by (tall vector)result - accumulator for holding the resultrl - row lowerru - row upperDMLRuntimeException - if the internal SystemML code that performs the
multiplication experiences an errorpublic void leftMultByRowVector(MatrixBlock vector, MatrixBlock result) throws DMLRuntimeException
ColGroupleftMultByRowVector in class ColGroupvector - row vectorresult - matrix block resultDMLRuntimeException - if DMLRuntimeException occurspublic void leftMultByRowVector(MatrixBlock vector, MatrixBlock result, int k) throws DMLRuntimeException
DMLRuntimeExceptionpublic ColGroup scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op) throws DMLRuntimeException
ColGroupscalarOperation in class ColGroupop - operation to performDMLRuntimeException - if DMLRuntimeException occurspublic void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock ret)
throws DMLRuntimeException
unaryAggregateOperations in class ColGroupDMLRuntimeExceptionpublic 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 ColGroupprotected void countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
ColGroupcountNonZerosPerRow in class ColGrouprnnz - non-zeros per rowrl - row lower bound, inclusiveru - row upper bound, exclusiveCopyright © 2017 The Apache Software Foundation. All rights reserved.