weibozhao commented on code in PR #131:
URL: https://github.com/apache/flink-ml/pull/131#discussion_r925115735


##########
flink-ml-core/src/main/java/org/apache/flink/ml/param/ParamValidators.java:
##########
@@ -38,6 +38,22 @@ public static <T> ParamValidator<T> gtEq(double lowerBound) {
         return (value) -> value != null && ((Number) value).doubleValue() >= 
lowerBound;
     }
 
+    // Checks if all values in the parameter intArray is greater than or equal 
to lowerBound.
+    public static <T> ParamValidator<T> intArrayGtEq(double lowerBound) {
+        return value -> {

Review Comment:
   I think making it more generic is better than introducing a forEach 
function. Introducing a forEach may make the user API more complicated. 
   
   - ParamValidators.numericalArrayGtEq(0))
   - ParamValidators.forEach(ParamValidators.gtEq(0))
   
   What do you think about it? @yunfengzhou-hub 



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to