Class LibMatrixBincell
- java.lang.Object
- 
- org.apache.sysds.runtime.matrix.data.LibMatrixBincell
 
- 
 public class LibMatrixBincell extends Object Library for binary cellwise operations (incl arithmetic, relational, etc). Currently, we don't have dedicated support for the individual operations but for categories of operations and combinations of dense/sparse and MM/MV. Safe/unsafe refer to sparse-safe and sparse-unsafe operations.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classLibMatrixBincell.BinaryAccessType
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbincellOp(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op)matrix-matrix binary operations, MM, MVstatic voidbincellOp(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op, int k)static voidbincellOp(MatrixBlock m1, MatrixBlock ret, ScalarOperator op)matrix-scalar, scalar-matrix binary operations.static voidbincellOp(MatrixBlock m1, MatrixBlock ret, ScalarOperator op, int k)static MatrixBlockbincellOpInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op)NOTE: operations in place always require m1 and m2 to be of equal dimensions defaults to right side operations, updating the m1 matrix with like: m1ret op m2static MatrixBlockbincellOpInPlaceLeft(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op)Left side operations, updating the m1 matrix like: m2 op m1retstatic MatrixBlockbincellOpInPlaceRight(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op)Right side operations, updating the m1 matrix like: m1ret op m2static LibMatrixBincell.BinaryAccessTypegetBinaryAccessType(MatrixBlock m1, MatrixBlock m2)static LibMatrixBincell.BinaryAccessTypegetBinaryAccessTypeExtended(MatrixBlock m1, MatrixBlock m2)static booleanisAllDense(MatrixBlock... mb)static booleanisSparseSafeDivide(BinaryOperator op, MatrixBlock rhs)static voidisValidDimensionsBinary(MatrixBlock m1, MatrixBlock m2)static voidisValidDimensionsBinaryExtended(MatrixBlock m1, MatrixBlock m2)
 
- 
- 
- 
Method Detail- 
bincellOppublic static void bincellOp(MatrixBlock m1, MatrixBlock ret, ScalarOperator op) matrix-scalar, scalar-matrix binary operations.- Parameters:
- m1- input matrix
- ret- result matrix
- op- scalar operator
 
 - 
bincellOppublic static void bincellOp(MatrixBlock m1, MatrixBlock ret, ScalarOperator op, int k) 
 - 
bincellOppublic static void bincellOp(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) matrix-matrix binary operations, MM, MV- Parameters:
- m1- input matrix 1
- m2- input matrix 2
- ret- result matrix
- op- binary operator
 
 - 
bincellOppublic static void bincellOp(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op, int k) 
 - 
bincellOpInPlacepublic static MatrixBlock bincellOpInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) NOTE: operations in place always require m1 and m2 to be of equal dimensions defaults to right side operations, updating the m1 matrix with like: m1ret op m2- Parameters:
- m1ret- result matrix updated in place
- m2- matrix block the other matrix to take values from
- op- binary operator the operator that is placed in the middle of m1ret and m2
- Returns:
- The same pointer to m1ret argument, and the updated result.
 
 - 
bincellOpInPlaceRightpublic static MatrixBlock bincellOpInPlaceRight(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) Right side operations, updating the m1 matrix like: m1ret op m2- Parameters:
- m1ret- result matrix updated in place
- m2- matrix block the other matrix to take values from
- op- binary operator the operator that is placed in the middle of m1ret and m2
- Returns:
- The result MatrixBlock (same object pointer to m1ret argument)
 
 - 
bincellOpInPlaceLeftpublic static MatrixBlock bincellOpInPlaceLeft(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) Left side operations, updating the m1 matrix like: m2 op m1ret- Parameters:
- m1ret- result matrix updated in place
- m2- matrix block the other matrix to take values from
- op- binary operator the operator that is placed in the middle of m1ret and m2
- Returns:
- The result MatrixBlock (same object pointer to m1ret argument)
 
 - 
getBinaryAccessTypepublic static LibMatrixBincell.BinaryAccessType getBinaryAccessType(MatrixBlock m1, MatrixBlock m2) 
 - 
getBinaryAccessTypeExtendedpublic static LibMatrixBincell.BinaryAccessType getBinaryAccessTypeExtended(MatrixBlock m1, MatrixBlock m2) 
 - 
isValidDimensionsBinarypublic static void isValidDimensionsBinary(MatrixBlock m1, MatrixBlock m2) 
 - 
isValidDimensionsBinaryExtendedpublic static void isValidDimensionsBinaryExtended(MatrixBlock m1, MatrixBlock m2) 
 - 
isSparseSafeDividepublic static boolean isSparseSafeDivide(BinaryOperator op, MatrixBlock rhs) 
 - 
isAllDensepublic static boolean isAllDense(MatrixBlock... mb) 
 
- 
 
-