Removed method double[] solve(double[]), because double[] is no longer considered as equivalent to RealVector (use ArrayRealVector instead).

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1178071 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastien Brisard 2011-10-01 19:05:11 +00:00
parent e364018316
commit 82ca8bca63
1 changed files with 1 additions and 20 deletions

View File

@ -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