You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by bu...@apache.org on 2015/04/21 22:10:07 UTC
svn commit: r948675 - in /websites/staging/mahout/trunk/content: ./
users/environment/in-core-reference.html
Author: buildbot
Date: Tue Apr 21 20:10:07 2015
New Revision: 948675
Log:
Staging update by buildbot for mahout
Modified:
websites/staging/mahout/trunk/content/ (props changed)
websites/staging/mahout/trunk/content/users/environment/in-core-reference.html
Propchange: websites/staging/mahout/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Apr 21 20:10:07 2015
@@ -1 +1 @@
-1675184
+1675192
Modified: websites/staging/mahout/trunk/content/users/environment/in-core-reference.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/environment/in-core-reference.html (original)
+++ websites/staging/mahout/trunk/content/users/environment/in-core-reference.html Tue Apr 21 20:10:07 2015
@@ -578,15 +578,16 @@ val sparseVec1 = svec((5 -> 1.0) :: (
</pre></div>
-<p>Iterating over non-zero and all elements of a vector:
-<em>Note that Vector.Element also has some implicit syntatic sugar, e.g to add 5.0 to every non-zero element of a matrix, the following code may be used:</em></p>
-<div class="codehilite"><pre><span class="kr">for</span> <span class="p">(</span>row <span class="o"><-</span> m<span class="p">;</span> el <span class="o"><-</span> row.nonZero<span class="p">)</span> el <span class="o">=</span> <span class="m">5.0</span> <span class="o">+</span> el
-<span class="m">...</span> or
-<span class="kr">for</span> <span class="p">(</span>row <span class="o"><-</span> m<span class="p">;</span> el <span class="o"><-</span> row.nonZero<span class="p">)</span> el :<span class="o">=</span> <span class="m">5.0</span> <span class="o">+</span> el
-</pre></div>
+<!--Iterating over non-zero and all elements of a vector:
+*Note that Vector.Element also has some implicit syntatic sugar, e.g to add 5.0 to every non-zero element of a matrix, the following code may be used:*
+
+ for (row <- m; el <- row.nonZero) el = 5.0 + el
+ ... or
+ for (row <- m; el <- row.nonZero) el := 5.0 + el
+Similarly **row.all** produces an iterator over all elements in a row (Vector).
+-->
-<p>Similarly <strong>row.all</strong> produces an iterator over all elements in a row (Vector).</p>
<p>For more information including information on Mahout-Samsara's out-of-core Linear algebra bindings see: <a href="http://mahout.apache.org/users/sparkbindings/ScalaSparkBindings.pdf">Mahout Scala Bindings and Mahout Spark Bindings for Linear Algebra Subroutines</a></p>
</div>
</div>