You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2012/08/28 13:35:36 UTC
svn commit: r1378083 -
/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealVector.java
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) {