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.
|
ColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
MatrixBlock |
getData()
Access for superclass
|
long |
getExactSizeOnDisk()
Returns the exact serialized size of column group.
|
Iterator<IJV> |
getIterator(int rl,
int ru,
boolean inclZeros,
boolean rowMajor) |
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 k) |
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, getNumCols, getNumRows, shiftColIndices
public 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 ColGroup.CompressionType getCompType()
ColGroup
getCompType
in class ColGroup
public MatrixBlock getData()
public long estimateInMemorySize()
ColGroup
estimateInMemorySize
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 rightMultByVector(MatrixBlock vector, MatrixBlock result, int rl, int ru) throws DMLRuntimeException
ColGroup
rightMultByVector
in class ColGroup
vector
- 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 rightMultByVector(MatrixBlock vector, MatrixBlock result, int k) throws DMLRuntimeException
DMLRuntimeException
public void leftMultByRowVector(MatrixBlock vector, MatrixBlock result) throws DMLRuntimeException
ColGroup
leftMultByRowVector
in class ColGroup
vector
- row vectorresult
- matrix block resultDMLRuntimeException
- if DMLRuntimeException occurspublic void leftMultByRowVector(MatrixBlock vector, MatrixBlock result, int k) throws DMLRuntimeException
DMLRuntimeException
public ColGroup scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op) throws DMLRuntimeException
ColGroup
scalarOperation
in class ColGroup
op
- operation to performDMLRuntimeException
- if DMLRuntimeException occurspublic void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixBlock ret) throws DMLRuntimeException
unaryAggregateOperations
in class ColGroup
DMLRuntimeException
public void readFields(DataInput in) throws IOException
ColGroup
readFields
in class ColGroup
in
- data inputIOException
- if IOException occurspublic void write(DataOutput out) throws IOException
ColGroup
write
in class ColGroup
out
- data outputIOException
- if IOException occurspublic long getExactSizeOnDisk()
ColGroup
getExactSizeOnDisk
in class 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 Iterator<IJV> getIterator(int rl, int ru, boolean inclZeros, boolean rowMajor)
getIterator
in class ColGroup
Copyright © 2017 The Apache Software Foundation. All rights reserved.