public class ColGroupUncompressed extends ColGroup
ColGroup.ColGroupRowIterator, ColGroup.CompressionType
_colIndexes, _numRows
Constructor and Description |
---|
ColGroupUncompressed() |
ColGroupUncompressed(int[] colIndices,
int numRows,
MatrixBlock data)
Constructor for internal use.
|
ColGroupUncompressed(List<ColGroup> groupsToDecompress)
Constructor for creating temporary decompressed versions of one or more
compressed column groups.
|
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)
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.
|
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, readFields, shiftColIndices, write
public ColGroupUncompressed()
public ColGroupUncompressed(List<Integer> colIndicesList, MatrixBlock rawblock)
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 calledpublic ColGroupUncompressed(List<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)
ColGroup
rightMultByVector
in class ColGroup
vector
- vector to multiply by (tall vector)result
- accumulator for holding the resultrl
- row lowerru
- row upper
if the internal SystemML code that performs the
multiplication experiences an errorpublic void rightMultByVector(MatrixBlock vector, MatrixBlock result, int k)
public void leftMultByRowVector(MatrixBlock vector, MatrixBlock result)
ColGroup
leftMultByRowVector
in class ColGroup
vector
- row vectorresult
- matrix block resultpublic void leftMultByRowVector(MatrixBlock vector, MatrixBlock result, int k)
public ColGroup scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
ColGroup
scalarOperation
in class ColGroup
op
- operation to performpublic void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixBlock ret)
unaryAggregateOperations
in class ColGroup
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)
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.