public class ReduceOperationFunction extends java.lang.Object implements ReduceFunction
Constructor and Description |
---|
ReduceOperationFunction(Op operation,
MessageType dtype) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
applyOp(java.lang.Object data1,
java.lang.Object data2,
AbstractOp op)
Applying the operation on data
|
void |
init(Config cfg,
DataFlowOperation op,
java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
Initialize the function
|
java.lang.Object |
reduce(java.lang.Object data1,
java.lang.Object data2)
Reduce t1 and t2 to a single value
|
public ReduceOperationFunction(Op operation, MessageType dtype)
public void init(Config cfg, DataFlowOperation op, java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> expectedIds)
ReduceFunction
init
in interface ReduceFunction
cfg
- configurationop
- optionsexpectedIds
- for each target, expected source idspublic java.lang.Object applyOp(java.lang.Object data1, java.lang.Object data2, AbstractOp op)
public java.lang.Object reduce(java.lang.Object data1, java.lang.Object data2)
ReduceFunction
reduce
in interface ReduceFunction
data1
- first valuedata2
- second value