commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1178071 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java
Date Sat, 01 Oct 2011 19:05:11 GMT
Author: celestin
Date: Sat Oct  1 19:05:11 2011
New Revision: 1178071

URL: http://svn.apache.org/viewvc?rev=1178071&view=rev
Log:
Removed method double[] solve(double[]), because double[] is no longer considered as equivalent
to RealVector (use ArrayRealVector instead).

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java?rev=1178071&r1=1178070&r2=1178071&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java
Sat Oct  1 19:05:11 2011
@@ -17,34 +17,15 @@
 
 package org.apache.commons.math.linear;
 
-import org.apache.commons.math.exception.DimensionMismatchException;
 
 /**
  * This interface defines a {@link RealLinearOperator} which can be inverted.
  * Preconditioners typically fall into this category.
  *
  * @version $Id$
+ * @since 3.0
  */
 public abstract class InvertibleRealLinearOperator extends RealLinearOperator {
-    /**
-     * Computes the matrix-vector product of the inverse of this instance
-     * with {@code b} and returns the result.
-     *
-     * @param b Right-hand side vector.
-     * @return the left-hand side vector.
-     */
-    public double[] solve(final double[] b) {
-        if (b.length != getRowDimension()) {
-            throw new DimensionMismatchException(b.length,
-                                                 getRowDimension());
-        }
-        final RealVector x = solve(new ArrayRealVector(b, false));
-        if (x instanceof ArrayRealVector) {
-            return ((ArrayRealVector) x).getDataRef();
-        } else {
-            return x.toArray();
-        }
-    }
 
     /**
      * Computes the matrix-vector product of the inverse of this instance



Mime
View raw message