Class MatrixCell
- java.lang.Object
- 
- org.apache.sysds.runtime.matrix.data.MatrixValue
- 
- org.apache.sysds.runtime.matrix.data.MatrixCell
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable,- org.apache.hadoop.io.Writable,- org.apache.hadoop.io.WritableComparable
 - Direct Known Subclasses:
- WeightedCell
 
 public class MatrixCell extends MatrixValue implements Serializable - See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.sysds.runtime.matrix.data.MatrixValueMatrixValue.CellIndex
 
- 
 - 
Constructor SummaryConstructors Constructor Description MatrixCell()MatrixCell(double v)MatrixCell(MatrixCell that)MatrixCell(MatrixValue that)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description MatrixValueaggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn)MatrixValueaggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP)voidappend(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol)MatrixValuebinaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result)MatrixValuebinaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue)intcompareTo(Object o)intcompareTo(MatrixCell o)voidcopy(MatrixValue that)Copy that MatrixValue into this MatrixValue.voidcopy(MatrixValue that, boolean sp)Copy that MatrixValue into this MatrixValue.voidctableOperations(Operator op, double scalarThat, double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock)voidctableOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)voidctableOperations(Operator op, MatrixIndexes ix1, double scalarThat, boolean left, int blen, CTableMap resultMap, MatrixBlock resultBlock)voidctableOperations(Operator op, MatrixValue that, double scalarThat2, boolean ignoreZeros, CTableMap ctableResult, MatrixBlock ctableResultBlock)voidctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)voiddenseScalarOperationsInPlace(ScalarOperator op)booleanequals(Object o)longgetNonZeros()intgetNumColumns()intgetNumRows()doublegetValue()doublegetValue(int r, int c)inthashCode()voidincrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection)voidincrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep)booleanisEmpty()booleanisInSparseFormat()voidreadFields(DataInput in)MatrixValuereorgOperations(ReorgOperator op, MatrixValue result, int startRow, int startColumn, int length)MatrixValuereplaceOperations(MatrixValue result, double pattern, double replacement)voidreset()voidreset(int rl, int cl)voidreset(int rl, int cl, boolean sp)voidreset(int rl, int cl, boolean sp, long nnzs)voidreset(int rl, int cl, double v)MatrixValuescalarOperations(ScalarOperator op, MatrixValue result)voidsetValue(double v)voidsetValue(int r, int c, double v)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.voidsparseScalarOperationsInPlace(ScalarOperator op)voidsparseUnaryOperationsInPlace(UnaryOperator op)MatrixValueunaryOperations(UnaryOperator op, MatrixValue result)voidwrite(DataOutput out)MatrixValuezeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
 
- 
- 
- 
Constructor Detail- 
MatrixCellpublic MatrixCell() 
 - 
MatrixCellpublic MatrixCell(MatrixCell that) 
 - 
MatrixCellpublic MatrixCell(MatrixValue that) 
 - 
MatrixCellpublic MatrixCell(double v) 
 
- 
 - 
Method Detail- 
setValuepublic void setValue(double v) 
 - 
getValuepublic double getValue() 
 - 
copypublic void copy(MatrixValue that, boolean sp) Description copied from class:MatrixValueCopy that MatrixValue into this MatrixValue. But select sparse destination block depending on boolean parameter.- Specified by:
- copyin class- MatrixValue
- 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)
 
 - 
copypublic void copy(MatrixValue that) Description copied from class:MatrixValueCopy 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.- Specified by:
- copyin class- MatrixValue
- Parameters:
- that- object to copy the values into.
 
 - 
getNonZerospublic long getNonZeros() - Specified by:
- getNonZerosin class- MatrixValue
 
 - 
getNumColumnspublic int getNumColumns() - Specified by:
- getNumColumnsin class- MatrixValue
 
 - 
getNumRowspublic int getNumRows() - Specified by:
- getNumRowsin class- MatrixValue
 
 - 
getValuepublic double getValue(int r, int c)- Specified by:
- getValuein class- MatrixValue
 
 - 
isInSparseFormatpublic boolean isInSparseFormat() - Specified by:
- isInSparseFormatin class- MatrixValue
 
 - 
isEmptypublic boolean isEmpty() - Specified by:
- isEmptyin class- MatrixValue
 
 - 
readFieldspublic void readFields(DataInput in) throws IOException - Specified by:
- readFieldsin interface- org.apache.hadoop.io.Writable
- Throws:
- IOException
 
 - 
resetpublic void reset() - Specified by:
- resetin class- MatrixValue
 
 - 
resetpublic void reset(int rl, int cl)- Specified by:
- resetin class- MatrixValue
 
 - 
resetpublic void reset(int rl, int cl, boolean sp)- Specified by:
- resetin class- MatrixValue
 
 - 
resetpublic void reset(int rl, int cl, boolean sp, long nnzs)- Specified by:
- resetin class- MatrixValue
 
 - 
resetpublic void reset(int rl, int cl, double v)- Specified by:
- resetin class- MatrixValue
 
 - 
setValuepublic void setValue(int r, int c, double v)- Specified by:
- setValuein class- MatrixValue
 
 - 
writepublic void write(DataOutput out) throws IOException - Specified by:
- writein interface- org.apache.hadoop.io.Writable
- Throws:
- IOException
 
 - 
aggregateUnaryOperationspublic MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn) - Specified by:
- aggregateUnaryOperationsin class- MatrixValue
 
 - 
binaryOperationspublic MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) - Specified by:
- binaryOperationsin class- MatrixValue
 
 - 
binaryOperationsInPlacepublic MatrixValue binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) - Specified by:
- binaryOperationsInPlacein class- MatrixValue
 
 - 
denseScalarOperationsInPlacepublic void denseScalarOperationsInPlace(ScalarOperator op) 
 - 
reorgOperationspublic MatrixValue reorgOperations(ReorgOperator op, MatrixValue result, int startRow, int startColumn, int length) - Specified by:
- reorgOperationsin class- MatrixValue
 
 - 
scalarOperationspublic MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) - Specified by:
- scalarOperationsin class- MatrixValue
 
 - 
sparseScalarOperationsInPlacepublic void sparseScalarOperationsInPlace(ScalarOperator op) 
 - 
sparseUnaryOperationsInPlacepublic void sparseUnaryOperationsInPlace(UnaryOperator op) 
 - 
unaryOperationspublic MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) - Specified by:
- unaryOperationsin class- MatrixValue
 
 - 
compareTopublic int compareTo(MatrixCell o) 
 - 
compareTopublic int compareTo(Object o) - Specified by:
- compareToin interface- Comparable
 
 - 
incrementalAggregatepublic void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep) - Specified by:
- incrementalAggregatein class- MatrixValue
 
 - 
zeroOutOperationspublic MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary) - Specified by:
- zeroOutOperationsin class- MatrixValue
 
 - 
incrementalAggregatepublic void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection) - Specified by:
- incrementalAggregatein class- MatrixValue
 
 - 
ctableOperationspublic void ctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
- ctableOperationsin class- MatrixValue
 
 - 
ctableOperationspublic void ctableOperations(Operator op, MatrixValue that, double scalarThat2, boolean ignoreZeros, CTableMap ctableResult, MatrixBlock ctableResultBlock) - Specified by:
- ctableOperationsin class- MatrixValue
 
 - 
ctableOperationspublic void ctableOperations(Operator op, double scalarThat, double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
- ctableOperationsin class- MatrixValue
 
 - 
ctableOperationspublic void ctableOperations(Operator op, MatrixIndexes ix1, double scalarThat, boolean left, int blen, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
- ctableOperationsin class- MatrixValue
 
 - 
ctableOperationspublic void ctableOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
- ctableOperationsin class- MatrixValue
 
 - 
slicepublic void slice(ArrayList<IndexedMatrixValue> outlist, IndexRange range, int rowCut, int colCut, int blen, int boundaryRlen, int boundaryClen) Description copied from class:MatrixValueSlice 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.- Specified by:
- slicein class- MatrixValue
- 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 MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) - Specified by:
- replaceOperationsin class- MatrixValue
 
 - 
aggregateUnaryOperationspublic MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP) - Specified by:
- aggregateUnaryOperationsin class- MatrixValue
 
 - 
appendpublic void append(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol) - Specified by:
- appendin class- MatrixValue
 
 
- 
 
-