From 918377f18998e6e287487a784edb3cb96a9c6714 Mon Sep 17 00:00:00 2001 From: Sebastien Brisard Date: Wed, 31 Aug 2011 07:41:25 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1163515 13f79535-47bb-0310-9956-ffa450edef68 --- .../math/linear/AbstractRealMatrix.java | 1 - .../math/linear/RealLinearOperator.java | 22 ++----------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java b/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java index 3d31a6f52..85aa85c62 100644 --- a/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java +++ b/src/main/java/org/apache/commons/math/linear/AbstractRealMatrix.java @@ -625,7 +625,6 @@ public abstract class AbstractRealMatrix } /** {@inheritDoc} */ - @Override public double[] operate(final double[] v) { final int nRows = getRowDimension(); final int nCols = getColumnDimension(); diff --git a/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java b/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java index 1c2065f3b..0dda5796f 100644 --- a/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java +++ b/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java @@ -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); }