incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r708073 - /incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixAddition.java
Date Mon, 27 Oct 2008 02:17:30 GMT
Author: edwardyoon
Date: Sun Oct 26 19:17:30 2008
New Revision: 708073

URL: http://svn.apache.org/viewvc?rev=708073&view=rev
Log: (empty)

Modified:
    incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixAddition.java

Modified: incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixAddition.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixAddition.java?rev=708073&r1=708072&r2=708073&view=diff
==============================================================================
--- incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixAddition.java (original)
+++ incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixAddition.java Sun Oct
26 19:17:30 2008
@@ -43,13 +43,8 @@
     Matrix a = DenseMatrix.random(conf, row, column);
     Matrix b = DenseMatrix.random(conf, row, column);
 
-    printMatrix("Matrix A", a);
-    printMatrix("Matrix B", b);
-
     Matrix c = a.add(b);
 
-    printMatrix("C = A + B", c);
-
     a.close();
     b.close();
     c.close();
@@ -77,15 +72,4 @@
     row = Integer.parseInt(other_args.get(0));
     column = Integer.parseInt(other_args.get(1));
   }
-
-  private static void printMatrix(String string, Matrix matrix)
-      throws IOException {
-    System.out.println("\n" + string);
-    System.out.println("----------------------");
-    for (int i = 0; i < matrix.getRows(); i++) {
-      for (int j = 0; j < matrix.getColumns(); j++) {
-        System.out.println(matrix.get(i, j));
-      }
-    }
-  }
 }



Mime
View raw message