hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r695736 - /incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java
Date Tue, 16 Sep 2008 05:58:36 GMT
Author: edwardyoon
Date: Mon Sep 15 22:58:36 2008
New Revision: 695736

URL: http://svn.apache.org/viewvc?rev=695736&view=rev
Log:
Trivial changes.

Modified:
    incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java

Modified: incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java?rev=695736&r1=695735&r2=695736&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/DenseMatrix.java Mon Sep 15 22:58:36 2008
@@ -121,9 +121,11 @@
     String name = RandomVariable.randMatrixName();
     Matrix rand = new DenseMatrix(conf, name);
     for (int i = 0; i < m; i++) {
+      DenseVector vector = new DenseVector();
       for (int j = 0; j < n; j++) {
-        rand.set(i, j, RandomVariable.rand());
+        vector.set(j, RandomVariable.rand());
       }
+      rand.setRow(i, vector);
     }
 
     rand.setDimension(m, n);
@@ -207,7 +209,6 @@
   public void setRow(int row, Vector vector) throws IOException {
     VectorUpdate update = new VectorUpdate(row);
     update.putAll(((DenseVector) vector).getEntries().entrySet());
-
     table.commit(update.getBatchUpdate());
   }
 



Mime
View raw message