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
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sysds.runtime.matrix.data.MatrixValue
MatrixValue.CellIndex -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP) voidappend(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol) binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) intintvoidcopy(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) voidbooleandoubleget(int r, int c) longintintdoublegetValue()inthashCode()voidincrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection) voidincrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep) booleanisEmpty()booleanvoidreadFields(DataInput in) reorgOperations(ReorgOperator op, MatrixValue result, int startRow, int startColumn, int length) replaceOperations(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) scalarOperations(ScalarOperator op, MatrixValue result) voidset(int r, int c, double v) voidsetValue(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.voidvoidunaryOperations(UnaryOperator op, MatrixValue result) voidwrite(DataOutput out) zeroOutOperations(MatrixValue result, IndexRange range) Methods inherited from class org.apache.sysds.runtime.matrix.data.MatrixValue
aggregateUnaryOperations
-
Constructor Details
-
MatrixCell
public MatrixCell() -
MatrixCell
public MatrixCell(double v)
-
-
Method Details
-
setValue
public void setValue(double v) -
getValue
public double getValue() -
copy
Description copied from class:MatrixValueCopy that MatrixValue into this MatrixValue. But select sparse destination block depending on boolean parameter.- Specified by:
copyin classMatrixValue- 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)
-
copy
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 classMatrixValue- Parameters:
that- object to copy the values into.
-
getNonZeros
public long getNonZeros()- Specified by:
getNonZerosin classMatrixValue
-
getNumColumns
public int getNumColumns()- Specified by:
getNumColumnsin classMatrixValue
-
getNumRows
public int getNumRows()- Specified by:
getNumRowsin classMatrixValue
-
get
public double get(int r, int c) - Specified by:
getin classMatrixValue
-
isInSparseFormat
public boolean isInSparseFormat()- Specified by:
isInSparseFormatin classMatrixValue
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin classMatrixValue
-
readFields
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
reset
public void reset()- Specified by:
resetin classMatrixValue
-
reset
public void reset(int rl, int cl) - Specified by:
resetin classMatrixValue
-
reset
public void reset(int rl, int cl, boolean sp) - Specified by:
resetin classMatrixValue
-
reset
public void reset(int rl, int cl, boolean sp, long nnzs) - Specified by:
resetin classMatrixValue
-
reset
public void reset(int rl, int cl, double v) - Specified by:
resetin classMatrixValue
-
set
public void set(int r, int c, double v) - Specified by:
setin classMatrixValue
-
write
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
binaryOperations
- Specified by:
binaryOperationsin classMatrixValue
-
binaryOperationsInPlace
- Specified by:
binaryOperationsInPlacein classMatrixValue
-
denseScalarOperationsInPlace
-
reorgOperations
public MatrixValue reorgOperations(ReorgOperator op, MatrixValue result, int startRow, int startColumn, int length) - Specified by:
reorgOperationsin classMatrixValue
-
scalarOperations
- Specified by:
scalarOperationsin classMatrixValue
-
sparseScalarOperationsInPlace
-
sparseUnaryOperationsInPlace
-
unaryOperations
- Specified by:
unaryOperationsin classMatrixValue
-
compareTo
-
compareTo
- Specified by:
compareToin interfaceComparable
-
equals
-
hashCode
public int hashCode() -
incrementalAggregate
public void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection, boolean deep) - Specified by:
incrementalAggregatein classMatrixValue
-
zeroOutOperations
- Specified by:
zeroOutOperationsin classMatrixValue
-
incrementalAggregate
- Specified by:
incrementalAggregatein classMatrixValue
-
ctableOperations
public void ctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
ctableOperationsin classMatrixValue
-
ctableOperations
public void ctableOperations(Operator op, MatrixValue that, double scalarThat2, boolean ignoreZeros, CTableMap ctableResult, MatrixBlock ctableResultBlock) - Specified by:
ctableOperationsin classMatrixValue
-
ctableOperations
public void ctableOperations(Operator op, double scalarThat, double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
ctableOperationsin classMatrixValue
-
ctableOperations
public void ctableOperations(Operator op, MatrixIndexes ix1, double scalarThat, boolean left, int blen, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
ctableOperationsin classMatrixValue
-
ctableOperations
public void ctableOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) - Specified by:
ctableOperationsin classMatrixValue
-
slice
public 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 classMatrixValue- Parameters:
outlist- The output matrix blocks that is extracted from the matrixrange- 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.
-
replaceOperations
- Specified by:
replaceOperationsin classMatrixValue
-
aggregateUnaryOperations
public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int blen, MatrixIndexes indexesIn, boolean inCP) - Specified by:
aggregateUnaryOperationsin classMatrixValue
-
append
public void append(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist, int blen, boolean cbind, boolean m2IsLast, int nextNCol) - Specified by:
appendin classMatrixValue
-