commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1163515 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear: AbstractRealMatrix.java RealLinearOperator.java
Date Wed, 31 Aug 2011 07:41:26 GMT
Author: celestin
Date: Wed Aug 31 07:41:25 2011
New Revision: 1163515

URL: http://svn.apache.org/viewvc?rev=1163515&view=rev
Log:
Removed occurences of double[] from RealLinearOperator (see MATH-653)
method double[] operate(double[]) has been left in AbstractRealMatrix, according to exchanges
on this JIRA ticket.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java?rev=1163515&r1=1163514&r2=1163515&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java
Wed Aug 31 07:41:25 2011
@@ -625,7 +625,6 @@ public abstract class AbstractRealMatrix
     }
 
     /** {@inheritDoc} */
-    @Override
     public double[] operate(final double[] v) {
         final int nRows = getRowDimension();
         final int nCols = getColumnDimension();

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java?rev=1163515&r1=1163514&r2=1163515&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java
Wed Aug 31 07:41:25 2011
@@ -17,8 +17,6 @@
 
 package org.apache.commons.math.linear;
 
-import org.apache.commons.math.exception.DimensionMismatchException;
-
 /**
  * This class defines a linear operator operating on real ({@code double})
  * vector spaces.
@@ -70,24 +68,8 @@ public abstract class RealLinearOperator
      *
      * @param x Vector to operate on.
      * @return the product of {@code this} instance with {@code x}.
-     */
-    public double[] operate(final double[] x) {
-        if (x.length != getColumnDimension()) {
-            throw new DimensionMismatchException(x.length, getColumnDimension());
-        }
-        final RealVector y = operate(new ArrayRealVector(x, false));
-        if (y instanceof ArrayRealVector) {
-            return ((ArrayRealVector) y).getDataRef();
-        } else {
-            return y.getData();
-        }
-    }
-
-    /**
-     * Returns the result of multiplying {@code this} by the vector {@code x}.
-     *
-     * @param x Vector to operate on.
-     * @return the product of {@code this} instance with {@code x}.
+     * @throws org.apache.commons.math.exception.DimensionMismatchException
+     *         if {@code getColumnDimension() != v.getDimension()}
      */
     public abstract RealVector operate(final RealVector x);
 }



Mime
View raw message