Class MatrixValue
- java.lang.Object
- 
- org.apache.sysds.runtime.matrix.data.MatrixValue
 
- 
- All Implemented Interfaces:
- Comparable,- org.apache.hadoop.io.Writable,- org.apache.hadoop.io.WritableComparable
 - Direct Known Subclasses:
- CM_N_COVCell,- MatrixBlock,- MatrixCell
 
 public abstract class MatrixValue extends Object implements org.apache.hadoop.io.WritableComparable 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMatrixValue.CellIndex
 - 
Constructor SummaryConstructors Constructor Description MatrixValue()MatrixValue(MatrixValue that)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract MatrixValueaggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn)abstract MatrixValueaggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP)abstract voidappend(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol)abstract MatrixValuebinaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result)abstract MatrixValuebinaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue)abstract voidcopy(MatrixValue that)Copy that MatrixValue into this MatrixValue.abstract voidcopy(MatrixValue that, boolean sp)Copy that MatrixValue into this MatrixValue.abstract voidctableOperations(Operator op, double scalar_that, double scalar_that2, CTableMap resultMap, MatrixBlock resultBlock)abstract voidctableOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap ctableResult, MatrixBlock ctableResultBlock)abstract voidctableOperations(Operator op, MatrixIndexes ix1, double scalar_that, boolean left, int blen, CTableMap resultMap, MatrixBlock resultBlock)abstract voidctableOperations(Operator op, MatrixValue that, double scalar_that2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock)abstract voidctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)abstract longgetNonZeros()abstract intgetNumColumns()abstract intgetNumRows()abstract doublegetValue(int r, int c)abstract voidincrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection)abstract voidincrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep)abstract booleanisEmpty()abstract booleanisInSparseFormat()abstract MatrixValuereorgOperations(ReorgOperator op, MatrixValue result, int startRow, int startColumn, int length)abstract MatrixValuereplaceOperations(MatrixValue result, double pattern, double replacement)abstract voidreset()abstract voidreset(int rl, int cl)abstract voidreset(int rl, int cl, boolean sp)abstract voidreset(int rl, int cl, boolean sp, long nnzs)abstract voidreset(int rl, int cl, double v)abstract MatrixValuescalarOperations(ScalarOperator op, MatrixValue result)abstract voidsetValue(int r, int c, double v)abstract voidslice(ArrayList<IndexedMatrixValue> outlist, IndexRange range, int rowCut, int colCut, int blen, int boundaryRlen, int boundaryClen)Slice out up to 4 matrixBlocks that are separated by the row and col Cuts.abstract MatrixValueunaryOperations(UnaryOperator op, MatrixValue result)abstract MatrixValuezeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)- 
Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.ComparablecompareTo
 
- 
 
- 
- 
- 
Constructor Detail- 
MatrixValuepublic MatrixValue() 
 - 
MatrixValuepublic MatrixValue(MatrixValue that) 
 
- 
 - 
Method Detail- 
getNumRowspublic abstract int getNumRows() 
 - 
getNumColumnspublic abstract int getNumColumns() 
 - 
getNonZerospublic abstract long getNonZeros() 
 - 
setValuepublic abstract void setValue(int r, int c, double v)
 - 
getValuepublic abstract double getValue(int r, int c)
 - 
isInSparseFormatpublic abstract boolean isInSparseFormat() 
 - 
isEmptypublic abstract boolean isEmpty() 
 - 
resetpublic abstract void reset() 
 - 
resetpublic abstract void reset(int rl, int cl)
 - 
resetpublic abstract void reset(int rl, int cl, boolean sp)
 - 
resetpublic abstract void reset(int rl, int cl, boolean sp, long nnzs)
 - 
resetpublic abstract void reset(int rl, int cl, double v)
 - 
copypublic abstract void copy(MatrixValue that) Copy that MatrixValue into this MatrixValue. If the MatrixValue is a MatrixBlock evaluate the sparsity of the original matrix, and copy into either a sparse or a dense matrix.- Parameters:
- that- object to copy the values into.
 
 - 
copypublic abstract void copy(MatrixValue that, boolean sp) Copy that MatrixValue into this MatrixValue. But select sparse destination block depending on boolean parameter.- Parameters:
- that- object to copy the values into.
- sp- boolean specifying if output should be forced sparse or dense. (only applicable if the 'that' is a MatrixBlock)
 
 - 
scalarOperationspublic abstract MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) 
 - 
binaryOperationspublic abstract MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) 
 - 
binaryOperationsInPlacepublic abstract MatrixValue binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) 
 - 
reorgOperationspublic abstract MatrixValue reorgOperations(ReorgOperator op, MatrixValue result, int startRow, int startColumn, int length) 
 - 
ctableOperationspublic abstract void ctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) 
 - 
ctableOperationspublic abstract void ctableOperations(Operator op, MatrixValue that, double scalar_that2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock) 
 - 
ctableOperationspublic abstract void ctableOperations(Operator op, double scalar_that, double scalar_that2, CTableMap resultMap, MatrixBlock resultBlock) 
 - 
ctableOperationspublic abstract void ctableOperations(Operator op, MatrixIndexes ix1, double scalar_that, boolean left, int blen, CTableMap resultMap, MatrixBlock resultBlock) 
 - 
ctableOperationspublic abstract void ctableOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap ctableResult, MatrixBlock ctableResultBlock) 
 - 
aggregateUnaryOperationspublic abstract MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn) 
 - 
aggregateUnaryOperationspublic abstract MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP) 
 - 
unaryOperationspublic abstract MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) 
 - 
incrementalAggregatepublic abstract void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep) 
 - 
incrementalAggregatepublic abstract void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection) 
 - 
zeroOutOperationspublic abstract MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary) 
 - 
slicepublic abstract void slice(ArrayList<IndexedMatrixValue> outlist, IndexRange range, int rowCut, int colCut, int blen, int boundaryRlen, int boundaryClen) Slice out up to 4 matrixBlocks that are separated by the row and col Cuts. This is used in the context of spark execution to distributed sliced out matrix blocks of correct block size.- Parameters:
- outlist- The output matrix blocks that is extracted from the matrix
- range- An index range containing overlapping information.
- rowCut- The row to cut and split the matrix.
- colCut- The column to cut ans split the matrix.
- blen- The Block size of the output matrices.
- boundaryRlen- The row length of the edge case matrix block, used for the final blocks that does not have enough rows to construct a full block.
- boundaryClen- The col length of the edge case matrix block, used for the final blocks that does not have enough cols to construct a full block.
 
 - 
replaceOperationspublic abstract MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) 
 - 
appendpublic abstract void append(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol) 
 
- 
 
-