/**
* Section 1
**/
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
...
/**
* Section 2
**/
String afile = FlinkMain.class.getResource("/txt/a.txt").getFile();
...
/**
* Section 3
**/
DataSet<String> alines = env.readTextFile(afile);
...
/**
* Section 4
**/
DataSet<Tuple2<Integer, DenseMatrix>> aMatrices = alines.map(new StringToTupleFunction())
...
/**
* Section 5
**/
DataSet<Tuple2<Tuple2<Integer, DenseMatrix>, Tuple2<Integer, DenseMatrix>>> groupingADMatrices = aMatrices.join(dMatrices)
.where(0)
.equalTo(0);
DataSet<Tuple2<Integer, DenseMatrix>> adMatrices = groupingADMatrices.map(new MatrixAddFunction());
...
/**
* Section 6
**/
...
... groupingBCMatrices.map(new MatrixMultFunction())
...
/**
* Section 7
**/
... groupingADBCMatrices = adMatrices.join(bcMatrices)
.where(0)
.equalTo(0);
... resultMatrices = groupingADBCMatrices.map(new MatrixAddFunction());
/**
* Section 8
**/
resultMatrices.print();