sebwrede commented on a change in pull request #1060:
URL: https://github.com/apache/systemds/pull/1060#discussion_r493274070
##########
File path:
src/main/java/org/apache/sysds/runtime/privacy/propagation/PrivacyPropagator.java
##########
@@ -64,7 +64,61 @@ public static Data parseAndSetPrivacyConstraint(Data cd,
JSONObject mtd)
}
return cd;
}
-
+
+ private static boolean anyInputHasLevel(PrivacyLevel[] inputLevels,
PrivacyLevel targetLevel){
+ return Arrays.stream(inputLevels).anyMatch(i -> i ==
targetLevel);
+ }
+
+ /**
+ * Returns the output privacy level based on the given input privacy
levels and operator type.
+ * It represents the basic logic of privacy propagation:
+ *
+ * Unary input:
+ * Input | NonAggregate | Aggregate
+ * -----------------------------------
+ * priv | priv | priv
+ * privAgg | privAgg | none
+ * none | none | none
+ *
+ * Binary input:
+ * Input | NonAggregate | Aggregate
+ * -----------------------------------
Review comment:
I am not sure, what you believe should be aligned, but now I added
additional "-------".
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]