public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
Modifier and Type | Class and Description |
---|---|
static class |
CompressedMatrixBlock.CompressionStatistics |
MatrixBlock.BlockType, MatrixBlock.SparsityEstimate
MatrixValue.CellIndex
Modifier and Type | Field and Description |
---|---|
protected ArrayList<ColGroup> |
_colGroups |
protected boolean |
_sharedDDC1Dict |
protected CompressedMatrixBlock.CompressionStatistics |
_stats |
static boolean |
ALLOW_DDC_ENCODING |
static boolean |
ALLOW_SHARED_DDC1_DICTIONARY |
static boolean |
INVESTIGATE_ESTIMATES |
static boolean |
MATERIALIZE_ZEROS |
static long |
MIN_PAR_AGG_THRESHOLD |
static boolean |
TRANSPOSE_INPUT |
clen, CONVERT_MCSR_TO_CSR_ON_DEEP_SERIALIZE, DEFAULT_INPLACE_SPARSEBLOCK, DEFAULT_SPARSEBLOCK, denseBlock, diag, estimatedNNzsPerRow, HEADER_SIZE, MAX_SHALLOW_SERIALIZE_OVERHEAD, nonZeros, numGroups, rlen, sparse, sparseBlock, SPARSITY_TURN_POINT, ULTRA_SPARSITY_TURN_POINT
Constructor and Description |
---|
CompressedMatrixBlock() |
CompressedMatrixBlock(int rl,
int cl,
boolean sparse)
Main constructor for building a block from scratch.
|
CompressedMatrixBlock(MatrixBlock mb)
"Copy" constructor to populate this compressed block with the
uncompressed contents of a conventional block.
|
Modifier and Type | Method and Description |
---|---|
MatrixValue |
aggregateBinaryOperations(MatrixIndexes m1Index,
MatrixValue m1Value,
MatrixIndexes m2Index,
MatrixValue m2Value,
MatrixValue result,
org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator op) |
MatrixValue |
aggregateBinaryOperations(MatrixValue mv1,
MatrixValue mv2,
MatrixValue result,
org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator op) |
MatrixBlock |
aggregateTernaryOperations(MatrixBlock m1,
MatrixBlock m2,
MatrixBlock m3,
MatrixBlock ret,
org.apache.sysml.runtime.matrix.operators.AggregateTernaryOperator op,
boolean inCP) |
MatrixValue |
aggregateUnaryOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixValue result,
int blockingFactorRow,
int blockingFactorCol,
MatrixIndexes indexesIn) |
MatrixValue |
aggregateUnaryOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixValue result,
int blockingFactorRow,
int blockingFactorCol,
MatrixIndexes indexesIn,
boolean inCP) |
MatrixBlock |
appendOperations(MatrixBlock that,
MatrixBlock ret) |
MatrixBlock |
appendOperations(MatrixBlock that,
MatrixBlock ret,
boolean cbind) |
void |
appendOperations(MatrixValue v2,
ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outlist,
int blockRowFactor,
int blockColFactor,
boolean cbind,
boolean m2IsLast,
int nextNCol) |
MatrixValue |
binaryOperations(org.apache.sysml.runtime.matrix.operators.BinaryOperator op,
MatrixValue thatValue,
MatrixValue result) |
void |
binaryOperationsInPlace(org.apache.sysml.runtime.matrix.operators.BinaryOperator op,
MatrixValue thatValue) |
MatrixBlock |
chainMatrixMultOperations(MatrixBlock v,
MatrixBlock w,
MatrixBlock out,
org.apache.sysml.lops.MapMultChain.ChainType ctype) |
MatrixBlock |
chainMatrixMultOperations(MatrixBlock v,
MatrixBlock w,
MatrixBlock out,
org.apache.sysml.lops.MapMultChain.ChainType ctype,
int k) |
org.apache.sysml.runtime.instructions.cp.CM_COV_Object |
cmOperations(org.apache.sysml.runtime.matrix.operators.CMOperator op) |
org.apache.sysml.runtime.instructions.cp.CM_COV_Object |
cmOperations(org.apache.sysml.runtime.matrix.operators.CMOperator op,
MatrixBlock weights) |
MatrixBlock |
compress()
Compress the contents of this matrix block.
|
MatrixBlock |
compress(int k)
Compress block.
|
int[] |
countNonZerosPerRow(int rl,
int ru) |
org.apache.sysml.runtime.instructions.cp.CM_COV_Object |
covOperations(org.apache.sysml.runtime.matrix.operators.COVOperator op,
MatrixBlock that) |
org.apache.sysml.runtime.instructions.cp.CM_COV_Object |
covOperations(org.apache.sysml.runtime.matrix.operators.COVOperator op,
MatrixBlock that,
MatrixBlock weights) |
MatrixBlock |
decompress()
Decompress block.
|
MatrixBlock |
decompress(int k)
Decompress block.
|
long |
estimateCompressedSizeInMemory()
Obtain an upper bound on the memory used to store the compressed block.
|
ArrayList<ColGroup> |
getColGroups()
Obtain the column groups.
|
CompressedMatrixBlock.CompressionStatistics |
getCompressionStatistics() |
Iterator<double[]> |
getDenseRowIterator(int rl,
int ru) |
long |
getExactSizeOnDisk()
NOTE: The used estimates must be kept consistent with the respective write functions.
|
Iterator<IJV> |
getIterator(int rl,
int ru,
boolean inclZeros) |
Iterator<IJV> |
getIterator(int rl,
int ru,
int cgl,
int cgu,
boolean inclZeros) |
int |
getNumColGroups() |
Iterator<SparseRow> |
getSparseRowIterator(int rl,
int ru) |
MatrixBlock |
groupedAggOperations(MatrixValue tgt,
MatrixValue wghts,
MatrixValue ret,
int ngroups,
org.apache.sysml.runtime.matrix.operators.Operator op)
Invocation from CP instructions.
|
MatrixBlock |
groupedAggOperations(MatrixValue tgt,
MatrixValue wghts,
MatrixValue ret,
int ngroups,
org.apache.sysml.runtime.matrix.operators.Operator op,
int k) |
boolean |
hasUncompressedColGroup() |
void |
incrementalAggregate(org.apache.sysml.runtime.matrix.operators.AggregateOperator aggOp,
MatrixValue newWithCorrection) |
void |
incrementalAggregate(org.apache.sysml.runtime.matrix.operators.AggregateOperator aggOp,
MatrixValue correction,
MatrixValue newWithCorrection) |
boolean |
isCompressed()
Obtain whether this block is in compressed form or not.
|
boolean |
isEmptyBlock(boolean safe) |
boolean |
isSingleUncompressedGroup() |
MatrixBlock |
leftIndexingOperations(MatrixBlock rhsMatrix,
int rl,
int ru,
int cl,
int cu,
MatrixBlock ret,
org.apache.sysml.runtime.controlprogram.caching.MatrixObject.UpdateType update) |
MatrixBlock |
leftIndexingOperations(org.apache.sysml.runtime.instructions.cp.ScalarObject scalar,
int rl,
int cl,
MatrixBlock ret,
org.apache.sysml.runtime.controlprogram.caching.MatrixObject.UpdateType update)
Explicitly allow left indexing for scalars.
|
void |
permutationMatrixMultOperations(MatrixValue m2Val,
MatrixValue out1Val,
MatrixValue out2Val) |
void |
permutationMatrixMultOperations(MatrixValue m2Val,
MatrixValue out1Val,
MatrixValue out2Val,
int k) |
MatrixValue |
quaternaryOperations(org.apache.sysml.runtime.matrix.operators.QuaternaryOperator qop,
MatrixValue um,
MatrixValue vm,
MatrixValue wm,
MatrixValue out) |
MatrixValue |
quaternaryOperations(org.apache.sysml.runtime.matrix.operators.QuaternaryOperator qop,
MatrixValue um,
MatrixValue vm,
MatrixValue wm,
MatrixValue out,
int k) |
double |
quickGetValue(int r,
int c) |
MatrixBlock |
randOperationsInPlace(RandomMatrixGenerator rgen,
LongStream nnzInBlock,
org.apache.commons.math3.random.Well1024a bigrand,
long bSeed)
Function to generate a matrix of random numbers.
|
MatrixBlock |
randOperationsInPlace(RandomMatrixGenerator rgen,
LongStream nnzInBlock,
org.apache.commons.math3.random.Well1024a bigrand,
long bSeed,
int k)
Function to generate a matrix of random numbers.
|
void |
readExternal(ObjectInput is)
Redirects the default java serialization via externalizable to our default
hadoop writable serialization for efficient broadcast/rdd deserialization.
|
void |
readFields(DataInput in) |
MatrixBlock |
removeEmptyOperations(MatrixBlock ret,
boolean rows) |
MatrixBlock |
removeEmptyOperations(MatrixBlock ret,
boolean rows,
MatrixBlock select) |
MatrixValue |
reorgOperations(org.apache.sysml.runtime.matrix.operators.ReorgOperator op,
MatrixValue ret,
int startRow,
int startColumn,
int length) |
MatrixValue |
replaceOperations(MatrixValue result,
double pattern,
double replacement) |
MatrixBlock |
rexpandOperations(MatrixBlock ret,
double max,
boolean rows,
boolean cast,
boolean ignore,
int k) |
MatrixValue |
scalarOperations(org.apache.sysml.runtime.matrix.operators.ScalarOperator sop,
MatrixValue result) |
MatrixBlock |
seqOperationsInPlace(double from,
double to,
double incr) |
void |
sliceOperations(ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outlist,
org.apache.sysml.runtime.util.IndexRange range,
int rowCut,
int colCut,
int normalBlockRowFactor,
int normalBlockColFactor,
int boundaryRlen,
int boundaryClen) |
MatrixBlock |
sliceOperations(int rl,
int ru,
int cl,
int cu,
org.apache.sysml.runtime.controlprogram.caching.CacheBlock ret)
Slice a sub block out of the current block and write into the given output block.
|
MatrixValue |
sortOperations(MatrixValue weights,
MatrixValue result) |
void |
ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op,
double scalar,
double scalar2,
CTableMap resultMap,
MatrixBlock resultBlock)
D = ctable(A,v2,w)
this <- A; scalar_that <- v2; scalar_that2 <- w; result <- D
(i1,j1,v1) from input1 (this)
(v2) from sclar_input2 (scalarThat)
(w) from scalar_input3 (scalarThat2)
|
void |
ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op,
double scalar,
MatrixValue that,
CTableMap resultMap,
MatrixBlock resultBlock)
D = ctable(A,v2,W)
this <- A; scalarThat <- v2; that2 <- W; result <- D
(i1,j1,v1) from input1 (this)
(v2) from sclar_input2 (scalarThat)
(i3,j3,w) from input3 (that2)
|
void |
ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op,
MatrixIndexes ix1,
double scalar,
boolean left,
int brlen,
CTableMap resultMap,
MatrixBlock resultBlock)
Specific ctable case of ctable(seq(...),X), where X is the only
matrix input.
|
void |
ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op,
MatrixValue that,
double scalar,
boolean ignoreZeros,
CTableMap resultMap,
MatrixBlock resultBlock)
D = ctable(A,B,w)
this <- A; that <- B; scalar_that2 <- w; result <- D
(i1,j1,v1) from input1 (this)
(i1,j1,v2) from input2 (that)
(w) from scalar_input3 (scalarThat2)
NOTE: This method supports both vectors and matrices.
|
void |
ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op,
MatrixValue that,
double scalar,
MatrixBlock resultBlock)
D = ctable(seq,A,w)
this <- seq; thatMatrix <- A; thatScalar <- w; result <- D
(i1,j1,v1) from input1 (this)
(i1,j1,v2) from input2 (that)
(w) from scalar_input3 (scalarThat2)
|
void |
ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op,
MatrixValue that,
MatrixValue that2,
CTableMap resultMap)
D = ctable(A,B,W)
this <- A; that <- B; that2 <- W; result <- D
(i1,j1,v1) from input1 (this)
(i1,j1,v2) from input2 (that)
(i1,j1,w) from input3 (that2)
|
void |
ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op,
MatrixValue that,
MatrixValue that2,
CTableMap resultMap,
MatrixBlock resultBlock) |
MatrixBlock |
transposeSelfMatrixMultOperations(MatrixBlock out,
org.apache.sysml.lops.MMTSJ.MMTSJType tstype) |
MatrixBlock |
transposeSelfMatrixMultOperations(MatrixBlock out,
org.apache.sysml.lops.MMTSJ.MMTSJType tstype,
int k) |
MatrixBlock |
uaggouterchainOperations(MatrixBlock mbLeft,
MatrixBlock mbRight,
MatrixBlock mbOut,
org.apache.sysml.runtime.matrix.operators.BinaryOperator bOp,
org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator uaggOp) |
MatrixValue |
unaryOperations(org.apache.sysml.runtime.matrix.operators.UnaryOperator op,
MatrixValue result) |
void |
unaryOperationsInPlace(org.apache.sysml.runtime.matrix.operators.UnaryOperator op) |
void |
write(DataOutput out) |
void |
writeExternal(ObjectOutput os)
Redirects the default java serialization via externalizable to our default
hadoop writable serialization for efficient broadcast/rdd serialization.
|
MatrixValue |
zeroOutOperations(MatrixValue result,
org.apache.sysml.runtime.util.IndexRange range,
boolean complementary) |
allocateAndResetSparseRowsBlock, allocateBlock, allocateDenseBlock, allocateDenseBlock, allocateDenseBlockUnsafe, allocateSparseRowsBlock, allocateSparseRowsBlock, appendOperations, appendRow, appendRow, appendToSparse, appendToSparse, appendValue, checkNonZeros, checkSparseRows, cleanupBlock, compactEmptyBlock, compareTo, computeIQMCorrection, copy, copy, copy, copyShallow, dropLastRowsOrColumns, equals, estimateSizeDenseInMemory, estimateSizeInMemory, estimateSizeInMemory, estimateSizeOnDisk, estimateSizeOnDisk, estimateSizeSparseInMemory, estimateSizeSparseInMemory, estimateSparsityOnAggBinary, evalSparseFormatInMemory, evalSparseFormatInMemory, evalSparseFormatOnDisk, evalSparseFormatOnDisk, examSparsity, examSparsity, getDenseBlock, getExactSerializedSize, getInMemorySize, getNonZeros, getNumColumns, getNumRows, getSparseBlock, getSparseBlockIterator, getSparseBlockIterator, getSparsity, getValue, getValueDenseUnsafe, getValueSparseUnsafe, hashCode, init, init, interQuartileMean, isAllocated, isDiag, isEmpty, isEmptyBlock, isInSparseFormat, isShallowSerialize, isShallowSerialize, isThreadSafe, isThreadSafe, isUltraSparse, isUltraSparse, isUltraSparsePermutationMatrix, isVector, leftIndexingOperations, leftIndexingOperations, leftIndexingOperations, max, median, merge, merge, min, minNonZero, pickValue, pickValue, pickValues, print, quickSetValue, randOperations, randOperations, randOperations, randOperations, recomputeNonZeros, recomputeNonZeros, recomputeNonZeros, recomputeNonZeros, reset, reset, reset, reset, reset, reset, sampleOperations, seqOperations, setDiag, setNonZeros, setNumColumns, setNumRows, setValue, setValueDenseUnsafe, sliceOperations, sliceOperations, sortSparseRows, sortSparseRows, sparseToDense, sum, sumSq, sumWeightForQuantile, toShallowSerializeBlock, toString
public static final boolean TRANSPOSE_INPUT
public static final boolean MATERIALIZE_ZEROS
public static final long MIN_PAR_AGG_THRESHOLD
public static final boolean INVESTIGATE_ESTIMATES
public static boolean ALLOW_DDC_ENCODING
public static final boolean ALLOW_SHARED_DDC1_DICTIONARY
protected CompressedMatrixBlock.CompressionStatistics _stats
protected boolean _sharedDDC1Dict
public CompressedMatrixBlock()
public CompressedMatrixBlock(int rl, int cl, boolean sparse)
rl
- number of rows in the blockcl
- number of columnssparse
- true if the UNCOMPRESSED representation of the block should be
sparsepublic CompressedMatrixBlock(MatrixBlock mb)
mb
- matrix blockpublic ArrayList<ColGroup> getColGroups()
public int getNumColGroups()
public boolean isCompressed()
public boolean isSingleUncompressedGroup()
public boolean isEmptyBlock(boolean safe)
isEmptyBlock
in class MatrixBlock
public MatrixBlock compress() throws DMLRuntimeException
DMLRuntimeException
- if DMLRuntimeException occurspublic MatrixBlock compress(int k) throws DMLRuntimeException
k
- number of threadsDMLRuntimeException
- if DMLRuntimeException occurspublic CompressedMatrixBlock.CompressionStatistics getCompressionStatistics()
public MatrixBlock decompress() throws DMLRuntimeException
DMLRuntimeException
- if DMLRuntimeException occurspublic MatrixBlock decompress(int k) throws DMLRuntimeException
k
- degree of parallelismDMLRuntimeException
- if DMLRuntimeException occurspublic long estimateCompressedSizeInMemory()
public double quickGetValue(int r, int c)
quickGetValue
in class MatrixBlock
public long getExactSizeOnDisk()
MatrixBlock
getExactSizeOnDisk
in class MatrixBlock
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class MatrixBlock
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class MatrixBlock
IOException
public void readExternal(ObjectInput is) throws IOException
readExternal
in interface Externalizable
readExternal
in class MatrixBlock
is
- object inputIOException
- if IOException occurspublic void writeExternal(ObjectOutput os) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class MatrixBlock
os
- object outputIOException
- if IOException occurspublic Iterator<double[]> getDenseRowIterator(int rl, int ru)
public int[] countNonZerosPerRow(int rl, int ru)
public MatrixValue scalarOperations(org.apache.sysml.runtime.matrix.operators.ScalarOperator sop, MatrixValue result) throws DMLRuntimeException
scalarOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock appendOperations(MatrixBlock that, MatrixBlock ret) throws DMLRuntimeException
appendOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock chainMatrixMultOperations(MatrixBlock v, MatrixBlock w, MatrixBlock out, org.apache.sysml.lops.MapMultChain.ChainType ctype) throws DMLRuntimeException
chainMatrixMultOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock chainMatrixMultOperations(MatrixBlock v, MatrixBlock w, MatrixBlock out, org.apache.sysml.lops.MapMultChain.ChainType ctype, int k) throws DMLRuntimeException
chainMatrixMultOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue aggregateBinaryOperations(MatrixValue mv1, MatrixValue mv2, MatrixValue result, org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator op) throws DMLRuntimeException
aggregateBinaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue aggregateUnaryOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixValue result, int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn, boolean inCP) throws DMLRuntimeException
aggregateUnaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue aggregateUnaryOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixValue result, int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn) throws DMLRuntimeException
aggregateUnaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock transposeSelfMatrixMultOperations(MatrixBlock out, org.apache.sysml.lops.MMTSJ.MMTSJType tstype) throws DMLRuntimeException
transposeSelfMatrixMultOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock transposeSelfMatrixMultOperations(MatrixBlock out, org.apache.sysml.lops.MMTSJ.MMTSJType tstype, int k) throws DMLRuntimeException
transposeSelfMatrixMultOperations
in class MatrixBlock
DMLRuntimeException
public boolean hasUncompressedColGroup()
public MatrixValue unaryOperations(org.apache.sysml.runtime.matrix.operators.UnaryOperator op, MatrixValue result) throws DMLRuntimeException
unaryOperations
in class MatrixBlock
DMLRuntimeException
public void unaryOperationsInPlace(org.apache.sysml.runtime.matrix.operators.UnaryOperator op) throws DMLRuntimeException
unaryOperationsInPlace
in class MatrixBlock
DMLRuntimeException
public MatrixValue binaryOperations(org.apache.sysml.runtime.matrix.operators.BinaryOperator op, MatrixValue thatValue, MatrixValue result) throws DMLRuntimeException
binaryOperations
in class MatrixBlock
DMLRuntimeException
public void binaryOperationsInPlace(org.apache.sysml.runtime.matrix.operators.BinaryOperator op, MatrixValue thatValue) throws DMLRuntimeException
binaryOperationsInPlace
in class MatrixBlock
DMLRuntimeException
public void incrementalAggregate(org.apache.sysml.runtime.matrix.operators.AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection) throws DMLRuntimeException
incrementalAggregate
in class MatrixBlock
DMLRuntimeException
public void incrementalAggregate(org.apache.sysml.runtime.matrix.operators.AggregateOperator aggOp, MatrixValue newWithCorrection) throws DMLRuntimeException
incrementalAggregate
in class MatrixBlock
DMLRuntimeException
public MatrixValue reorgOperations(org.apache.sysml.runtime.matrix.operators.ReorgOperator op, MatrixValue ret, int startRow, int startColumn, int length) throws DMLRuntimeException
reorgOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock appendOperations(MatrixBlock that, MatrixBlock ret, boolean cbind) throws DMLRuntimeException
appendOperations
in class MatrixBlock
DMLRuntimeException
public void appendOperations(MatrixValue v2, ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outlist, int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol) throws DMLRuntimeException
appendOperations
in class MatrixBlock
DMLRuntimeException
public void permutationMatrixMultOperations(MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val) throws DMLRuntimeException
permutationMatrixMultOperations
in class MatrixBlock
DMLRuntimeException
public void permutationMatrixMultOperations(MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val, int k) throws DMLRuntimeException
permutationMatrixMultOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock leftIndexingOperations(MatrixBlock rhsMatrix, int rl, int ru, int cl, int cu, MatrixBlock ret, org.apache.sysml.runtime.controlprogram.caching.MatrixObject.UpdateType update) throws DMLRuntimeException
leftIndexingOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock leftIndexingOperations(org.apache.sysml.runtime.instructions.cp.ScalarObject scalar, int rl, int cl, MatrixBlock ret, org.apache.sysml.runtime.controlprogram.caching.MatrixObject.UpdateType update) throws DMLRuntimeException
MatrixBlock
leftIndexingOperations
in class MatrixBlock
scalar
- scalar objectrl
- row lowercl
- column lowerret
- ?update
- ?DMLRuntimeException
- if DMLRuntimeException occurspublic MatrixBlock sliceOperations(int rl, int ru, int cl, int cu, org.apache.sysml.runtime.controlprogram.caching.CacheBlock ret) throws DMLRuntimeException
org.apache.sysml.runtime.controlprogram.caching.CacheBlock
sliceOperations
in interface org.apache.sysml.runtime.controlprogram.caching.CacheBlock
sliceOperations
in class MatrixBlock
rl
- row lowerru
- row uppercl
- column lowercu
- column upperret
- cache blockDMLRuntimeException
- if DMLRuntimeException occurspublic void sliceOperations(ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outlist, org.apache.sysml.runtime.util.IndexRange range, int rowCut, int colCut, int normalBlockRowFactor, int normalBlockColFactor, int boundaryRlen, int boundaryClen)
sliceOperations
in class MatrixBlock
public MatrixValue zeroOutOperations(MatrixValue result, org.apache.sysml.runtime.util.IndexRange range, boolean complementary) throws DMLRuntimeException
zeroOutOperations
in class MatrixBlock
DMLRuntimeException
public org.apache.sysml.runtime.instructions.cp.CM_COV_Object cmOperations(org.apache.sysml.runtime.matrix.operators.CMOperator op) throws DMLRuntimeException
cmOperations
in class MatrixBlock
DMLRuntimeException
public org.apache.sysml.runtime.instructions.cp.CM_COV_Object cmOperations(org.apache.sysml.runtime.matrix.operators.CMOperator op, MatrixBlock weights) throws DMLRuntimeException
cmOperations
in class MatrixBlock
DMLRuntimeException
public org.apache.sysml.runtime.instructions.cp.CM_COV_Object covOperations(org.apache.sysml.runtime.matrix.operators.COVOperator op, MatrixBlock that) throws DMLRuntimeException
covOperations
in class MatrixBlock
DMLRuntimeException
public org.apache.sysml.runtime.instructions.cp.CM_COV_Object covOperations(org.apache.sysml.runtime.matrix.operators.COVOperator op, MatrixBlock that, MatrixBlock weights) throws DMLRuntimeException
covOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue sortOperations(MatrixValue weights, MatrixValue result) throws DMLRuntimeException
sortOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue aggregateBinaryOperations(MatrixIndexes m1Index, MatrixValue m1Value, MatrixIndexes m2Index, MatrixValue m2Value, MatrixValue result, org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator op) throws DMLRuntimeException
aggregateBinaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock aggregateTernaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret, org.apache.sysml.runtime.matrix.operators.AggregateTernaryOperator op, boolean inCP) throws DMLRuntimeException
aggregateTernaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock uaggouterchainOperations(MatrixBlock mbLeft, MatrixBlock mbRight, MatrixBlock mbOut, org.apache.sysml.runtime.matrix.operators.BinaryOperator bOp, org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator uaggOp) throws DMLRuntimeException
uaggouterchainOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, org.apache.sysml.runtime.matrix.operators.Operator op) throws DMLRuntimeException
MatrixBlock
groupedAggOperations
in class MatrixBlock
tgt
- ?wghts
- ?ret
- ?ngroups
- ?op
- operatorDMLRuntimeException
- if DMLRuntimeException occurspublic MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, org.apache.sysml.runtime.matrix.operators.Operator op, int k) throws DMLRuntimeException
groupedAggOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock removeEmptyOperations(MatrixBlock ret, boolean rows, MatrixBlock select) throws DMLRuntimeException
removeEmptyOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock removeEmptyOperations(MatrixBlock ret, boolean rows) throws DMLRuntimeException
removeEmptyOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock rexpandOperations(MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore, int k) throws DMLRuntimeException
rexpandOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) throws DMLRuntimeException
replaceOperations
in class MatrixBlock
DMLRuntimeException
public void ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op, double scalar, MatrixValue that, CTableMap resultMap, MatrixBlock resultBlock) throws DMLRuntimeException
MatrixBlock
ternaryOperations
in class MatrixBlock
DMLRuntimeException
public void ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op, double scalar, double scalar2, CTableMap resultMap, MatrixBlock resultBlock) throws DMLRuntimeException
MatrixBlock
ternaryOperations
in class MatrixBlock
DMLRuntimeException
public void ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op, MatrixIndexes ix1, double scalar, boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock) throws DMLRuntimeException
MatrixBlock
ternaryOperations
in class MatrixBlock
DMLRuntimeException
public void ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op, MatrixValue that, double scalar, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock) throws DMLRuntimeException
MatrixBlock
ternaryOperations
in class MatrixBlock
DMLRuntimeException
public void ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op, MatrixValue that, double scalar, MatrixBlock resultBlock) throws DMLRuntimeException
MatrixBlock
ternaryOperations
in class MatrixBlock
op
- operatorthat
- matrix valuescalar
- scalar doubleresultBlock
- result matrix blockDMLRuntimeException
- if DMLRuntimeException occurspublic void ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap) throws DMLRuntimeException
MatrixBlock
ternaryOperations
in class MatrixBlock
op
- operatorthat
- matrix value 1that2
- matrix value 2resultMap
- table mapDMLRuntimeException
- if DMLRuntimeException occurspublic void ternaryOperations(org.apache.sysml.runtime.matrix.operators.Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) throws DMLRuntimeException
ternaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue quaternaryOperations(org.apache.sysml.runtime.matrix.operators.QuaternaryOperator qop, MatrixValue um, MatrixValue vm, MatrixValue wm, MatrixValue out) throws DMLRuntimeException
quaternaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixValue quaternaryOperations(org.apache.sysml.runtime.matrix.operators.QuaternaryOperator qop, MatrixValue um, MatrixValue vm, MatrixValue wm, MatrixValue out, int k) throws DMLRuntimeException
quaternaryOperations
in class MatrixBlock
DMLRuntimeException
public MatrixBlock randOperationsInPlace(RandomMatrixGenerator rgen, LongStream nnzInBlock, org.apache.commons.math3.random.Well1024a bigrand, long bSeed) throws DMLRuntimeException
MatrixBlock
bigrand
is passed so that block-level
seeds are generated internally. In case of MR, it generates a single
block for given block-level seed bSeed
.
When pdf="uniform", cell values are drawn from uniform distribution in
range [min,max]
.
When pdf="normal", cell values are drawn from standard normal
distribution N(0,1). The range of generated values will always be
(-Inf,+Inf).randOperationsInPlace
in class MatrixBlock
rgen
- random matrix generatornnzInBlock
- number of nonzeros in blockbigrand
- ?bSeed
- seed valueDMLRuntimeException
- if DMLRuntimeException occurspublic MatrixBlock randOperationsInPlace(RandomMatrixGenerator rgen, LongStream nnzInBlock, org.apache.commons.math3.random.Well1024a bigrand, long bSeed, int k) throws DMLRuntimeException
MatrixBlock
bigrand
is passed so that block-level
seeds are generated internally. In case of MR, it generates a single
block for given block-level seed bSeed
.
When pdf="uniform", cell values are drawn from uniform distribution in
range [min,max]
.
When pdf="normal", cell values are drawn from standard normal
distribution N(0,1). The range of generated values will always be
(-Inf,+Inf).randOperationsInPlace
in class MatrixBlock
rgen
- random matrix generatornnzInBlock
- number of nonzeros in blockbigrand
- ?bSeed
- seed valuek
- ?DMLRuntimeException
- if DMLRuntimeException occurspublic MatrixBlock seqOperationsInPlace(double from, double to, double incr) throws DMLRuntimeException
seqOperationsInPlace
in class MatrixBlock
DMLRuntimeException
Copyright © 2017 The Apache Software Foundation. All rights reserved.