# | Line 16 | Line 16 | public class MapReduceDemo { | |
---|---|---|
16 | /** | |
17 | * Sequential version, for performance comparison | |
18 | */ | |
19 | < | static <T, U> U seqMapReduce(T[] array, |
20 | < | Ops.Op<T,U> mapper, |
21 | < | Ops.Reducer<U> reducer, |
22 | < | U base) { |
19 | > | static <T,U> U seqMapReduce(T[] array, |
20 | > | Ops.Op<T,U> mapper, |
21 | > | Ops.Reducer<U> reducer, |
22 | > | U base) { |
23 | int n = array.length; | |
24 | U x = base; | |
25 | for (int i = 0; i < n; ++i) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |