You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2009/04/25 21:39:38 UTC

svn commit: r768591 - /commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealVector.java

Author: luc
Date: Sat Apr 25 19:39:38 2009
New Revision: 768591

URL: http://svn.apache.org/viewvc?rev=768591&view=rev
Log:
added javadoc

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealVector.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealVector.java?rev=768591&r1=768590&r2=768591&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealVector.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealVector.java Sat Apr 25 19:39:38 2009
@@ -467,6 +467,14 @@
         return entries.get(index);
     }
 
+    /**
+     * Distance between two vectors.
+     * <p>This method computes the distance consistent with
+     * L<sub>1</sub> norm, i.e. the sum of the absolute values of
+     * elements differences.</p>
+     * @param v vector to which distance is requested
+     * @return distance between two vectors.
+     */
     public double getL1Distance(SparseRealVector v) {
         double max = 0;
         Iterator iter = entries.iterator();