Class BinaryOperator
java.lang.Object
org.apache.sysds.runtime.matrix.operators.Operator
org.apache.sysds.runtime.matrix.operators.MultiThreadedOperator
org.apache.sysds.runtime.matrix.operators.BinaryOperator
- All Implemented Interfaces:
Serializable
BinaryOperator class for operations that have two inputs.
For instance
BinaryOperator op = new BinaryOperator(Plus.getPlusFnObject()); double r = op.execute(5.0, 8.2)
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.sysds.runtime.matrix.operators.Operator
sparseSafe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethod for getting the hop binary operator type for a given function object.booleanbooleanisIntroducingZerosLeft(double[] row) Check if the operation returns zeros if the input is contained in row.booleanCheck if the operation returns zeros if the input is contained in row.booleanisIntroducingZerosRight(double[] row) Check if the operation returns zeros if the input is contained in row.booleanCheck if the operation returns zeros if the input is contained in row.booleanisRowSafeLeft(double[] row) Check if the operation returns zeros if the input zero.booleanisRowSafeLeft(MatrixBlock row) Check if the operation returns zeros if the input zero.booleanisRowSafeRight(double[] row) Check if the operation returns zeros if the input zero.booleanCheck if the operation returns zeros if the input zero.toString()Methods inherited from class org.apache.sysds.runtime.matrix.operators.MultiThreadedOperator
getNumThreads, setNumThreads
-
Field Details
-
fn
-
commutative
public final boolean commutative
-
-
Constructor Details
-
BinaryOperator
-
BinaryOperator
-
-
Method Details
-
getBinaryOperatorOpOp2
Method for getting the hop binary operator type for a given function object. This is used in order to use a common code path for consistency between compiler and runtime.- Returns:
- binary operator type for a function object
-
isCommutative
public boolean isCommutative() -
isRowSafeLeft
public boolean isRowSafeLeft(double[] row) Check if the operation returns zeros if the input zero.- Parameters:
row- The values to check- Returns:
- If the output is always zero if other value is zero
-
isRowSafeLeft
Check if the operation returns zeros if the input zero.- Parameters:
row- The values to check- Returns:
- If the output is always zero if other value is zero
-
isIntroducingZerosLeft
Check if the operation returns zeros if the input is contained in row.- Parameters:
row- The values to check- Returns:
- If the output contains zeros
-
isIntroducingZerosLeft
public boolean isIntroducingZerosLeft(double[] row) Check if the operation returns zeros if the input is contained in row.- Parameters:
row- The values to check- Returns:
- If the output contains zeros
-
isRowSafeRight
public boolean isRowSafeRight(double[] row) Check if the operation returns zeros if the input zero.- Parameters:
row- The values to check- Returns:
- If the output is always zero if other value is zero
-
isRowSafeRight
Check if the operation returns zeros if the input zero.- Parameters:
row- The values to check- Returns:
- If the output is always zero if other value is zero
-
isIntroducingZerosRight
Check if the operation returns zeros if the input is contained in row.- Parameters:
row- The values to check- Returns:
- If the output contains zeros
-
isIntroducingZerosRight
public boolean isIntroducingZerosRight(double[] row) Check if the operation returns zeros if the input is contained in row.- Parameters:
row- The values to check- Returns:
- If the output contains zeros
-
toString
-