* 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;
}
};
}