/** * This file contains the definition of the GeneralizedReduceApp interface. * Any parallel reduction implementation (such as SumReduction) must implement * this interface. * * Interface uses a generic to define the type of object * that will be reduced and combined * * Do not alter this file for your homework submission. * * @author Vivek Sarkar (vsarkar@rice.edu) */ public interface GeneralizedReduceApp { /** * return identity element for clients reduction operation * @return The identity element */ T init(); /** * perform associative operation on left and right operands, in accordance with the * clients reduction operation, and return the result * @param left - One of the elements to be combined * @param right - The other element to be combined * @return - The combination of the two elements */ T combine(T left, T right); }