MatrixAddFunction implements
   PairFunction<Tuple2<Integer, Tuple2<DenseMatrix, DenseMatrix>>, Integer,DenseMatrix> {
   @Override
   public Tuple2<Integer, DenseMatrix> call(Tuple2<Integer, Tuple2<DenseMatrix, DenseMatrix>> integerTuple2Tuple2) throws Exception {
      Integer index = integerTuple2Tuple2._1;
      double[] array1 = integerTuple2Tuple2._2._1.toArray();
      double[] array2 = integerTuple2Tuple2._2._2.toArray();
      ...