Examples of DoubleReducer


Examples of groovyx.gpars.extra166y.Ops.DoubleReducer

     * Returns a reducer returning the maximum of two double elements,
     * using the given comparator.
     */
    public static DoubleReducer doubleMaxReducer
        (final DoubleComparator comparator) {
        return new DoubleReducer() {
                public double op(double a, double b) {
                    return (comparator.compare(a, b) >= 0) ? a : b;
                }
            };
    }
View Full Code Here

Examples of groovyx.gpars.extra166y.Ops.DoubleReducer

     * Returns a reducer returning the minimum of two double elements,
     * using the given comparator.
     */
    public static DoubleReducer doubleMinReducer
        (final DoubleComparator comparator) {
        return new DoubleReducer() {
                public double op(double a, double b) {
                    return (comparator.compare(a, b) <= 0) ? a : b;
                }
            };
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.