commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1378083 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealVector.java
Date Tue, 28 Aug 2012 11:35:36 GMT
Author: erans
Date: Tue Aug 28 11:35:35 2012
New Revision: 1378083

URL: http://svn.apache.org/viewvc?rev=1378083&view=rev
Log:
Re-instated "dotProduct" method whose removal breaks backward compatibility.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealVector.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealVector.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealVector.java?rev=1378083&r1=1378082&r2=1378083&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealVector.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealVector.java
Tue Aug 28 11:35:35 2012
@@ -304,6 +304,26 @@ public class OpenMapRealVector extends S
         return new OpenMapRealVector(this);
     }
 
+    /**
+     * Computes the dot product.
+     * Note that the computation is now performed in the parent class: no
+     * performance improvement is to be expected from this overloaded
+     * method.
+     * The previous implementation was buggy and cannot be easily fixed
+     * (see MATH-795).
+     *
+     * @param v Vector.
+     * @return the dot product of this vector with {@code v}.
+     *
+     * @deprecated as of 3.1 (to be removed in 4.0). The computation is
+     * performed by the parent class. The method must be kept to maintain
+     * backwards compatibility.
+     */
+    @Deprecated
+    public double dotProduct(OpenMapRealVector v) {
+        return dotProduct((RealVector) v);
+    }
+
     /** {@inheritDoc} */
     @Override
     public OpenMapRealVector ebeDivide(RealVector v) {



Mime
View raw message