Class MatrixMultiplicationPropagator
- java.lang.Object
-
- org.apache.sysds.runtime.privacy.propagation.MatrixMultiplicationPropagator
-
- All Implemented Interfaces:
Propagator
- Direct Known Subclasses:
MatrixMultiplicationPropagatorNaive
,MatrixMultiplicationPropagatorPrivateFirst
,MatrixMultiplicationPropagatorPrivateFirstOptimized
public abstract class MatrixMultiplicationPropagator extends Object implements Propagator
Used for propagating constraints in a matrix multiplication.
-
-
Constructor Summary
Constructors Constructor Description MatrixMultiplicationPropagator()
Constructor for empty instance.MatrixMultiplicationPropagator(MatrixBlock input1, PrivacyConstraint privacyConstraint1, MatrixBlock input2, PrivacyConstraint privacyConstraint2)
Constructs the propagator and initializes the fields used for propagation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OperatorType[]
getOperatorTypesCol()
Gets the operator types of all columns of the right-hand input in the matrix multiplication.OperatorType[]
getOperatorTypesRow()
Gets the operator types of all rows of the left-hand input in the matrix multiplication.PrivacyConstraint
propagate()
Activates the propagation and returns the output privacy constraint.void
setFields(MatrixBlock input1, PrivacyConstraint privacyConstraint1, MatrixBlock input2, PrivacyConstraint privacyConstraint2)
Sets all fields of propagator.
-
-
-
Constructor Detail
-
MatrixMultiplicationPropagator
public MatrixMultiplicationPropagator()
Constructor for empty instance. The fields can later be set with the setFields method.
-
MatrixMultiplicationPropagator
public MatrixMultiplicationPropagator(MatrixBlock input1, PrivacyConstraint privacyConstraint1, MatrixBlock input2, PrivacyConstraint privacyConstraint2)
Constructs the propagator and initializes the fields used for propagation.- Parameters:
input1
- left-hand input in matrix multiplication.privacyConstraint1
- privacy constraint of left-hand input in matrix multiplicationinput2
- right-hand input in matrix multiplicationprivacyConstraint2
- privacy constraint of right-hand input in matrix multiplication
-
-
Method Detail
-
setFields
public void setFields(MatrixBlock input1, PrivacyConstraint privacyConstraint1, MatrixBlock input2, PrivacyConstraint privacyConstraint2)
Sets all fields of propagator.- Parameters:
input1
- left-hand input in matrix multiplication.privacyConstraint1
- privacy constraint of left-hand input in matrix multiplicationinput2
- right-hand input in matrix multiplicationprivacyConstraint2
- privacy constraint of right-hand input in matrix multiplication
-
propagate
public PrivacyConstraint propagate()
Description copied from interface:Propagator
Activates the propagation and returns the output privacy constraint.- Specified by:
propagate
in interfacePropagator
- Returns:
- output privacy constraint.
-
getOperatorTypesRow
public OperatorType[] getOperatorTypesRow()
Gets the operator types of all rows of the left-hand input in the matrix multiplication. An operator type defines if the row will result in an aggregation or not.- Returns:
- array of operator types representing the rows of the left-hand input in the matrix multiplication
-
getOperatorTypesCol
public OperatorType[] getOperatorTypesCol()
Gets the operator types of all columns of the right-hand input in the matrix multiplication. An operator type defines if the column will result in an aggregation or not.- Returns:
- array of operator types representing the columns of the right-hand input in the matrix multiplication.
-
-