incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r731854 - /incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixMultiplication.java
Date Tue, 06 Jan 2009 07:18:37 GMT
Author: edwardyoon
Date: Mon Jan  5 23:18:36 2009
New Revision: 731854

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

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

Modified: incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixMultiplication.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixMultiplication.java?rev=731854&r1=731853&r2=731854&view=diff
==============================================================================
--- incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixMultiplication.java (original)
+++ incubator/hama/trunk/src/examples/org/apache/hama/examples/MatrixMultiplication.java Mon
Jan  5 23:18:36 2009
@@ -27,7 +27,8 @@
 public class MatrixMultiplication extends AbstractExample {
   public static void main(String[] args) throws IOException {
     if (args.length < 2) {
-      System.out.println("mult  [-m maps] [-r reduces] <matrix_A> <matrix_B>
[blocks]");
+      System.out
+          .println("mult  [-m maps] [-r reduces] <matrix_A> <matrix_B> [blocks]");
       System.exit(-1);
     } else {
       parseArgs(args);
@@ -35,16 +36,21 @@
 
     String matrixA = ARGS.get(0);
     String matrixB = ARGS.get(1);
-    
+
     DenseMatrix a = new DenseMatrix(conf, matrixA, false);
     DenseMatrix b = new DenseMatrix(conf, matrixB, false);
-    
-    if(ARGS.size() > 2) {
+
+    if (ARGS.size() > 2) {
       a.blocking_mapred(Integer.parseInt(ARGS.get(2)));
       b.blocking_mapred(Integer.parseInt(ARGS.get(2)));
     }
-    
+
     Matrix c = a.mult(b);
-    c.close();
+    for (int i = 0; i < 2; i++) {
+      for (int j = 0; j < 2; j++) {
+        System.out.println("c(" + i + ", " + j + ")" + c.get(i, j));
+      }
+    }
+    System.out.println("...");
   }
 }



Mime
View raw message