From 1e649ff9f324b372d0734789bd207dbbcd7e0e63 Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Fri, 15 Jul 2011 10:46:29 +0000 Subject: [PATCH] MATH-581 Made accessors "abstract" (a per the conclusion of the thread "RealLinearOperator and AbstractRealMatrix" on the dev ML). Removed constructors. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1147081 13f79535-47bb-0310-9956-ffa450edef68 --- .../linear/InvertibleRealLinearOperator.java | 9 ------ .../math/linear/RealLinearOperator.java | 32 ++++--------------- 2 files changed, 6 insertions(+), 35 deletions(-) diff --git a/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java b/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java index 828b926b1..44fa60192 100644 --- a/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java +++ b/src/main/java/org/apache/commons/math/linear/InvertibleRealLinearOperator.java @@ -26,15 +26,6 @@ import org.apache.commons.math.exception.DimensionMismatchException; * @version $Id$ */ public abstract class InvertibleRealLinearOperator extends RealLinearOperator { - /** - * Creates a new instance of this class with the specified dimension. - * - * @param dim Common dimension of the domain and codomain. - */ - public InvertibleRealLinearOperator(final int dim) { - super(dim, dim); - } - /** * Computes the matrix-vector product of the inverse of this instance * with {@code b} and returns the result. 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 9ed3ed2d5..1c2065f3b 100644 --- a/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java +++ b/src/main/java/org/apache/commons/math/linear/RealLinearOperator.java @@ -41,49 +41,29 @@ import org.apache.commons.math.exception.DimensionMismatchException; *
*
Barret et al. (1994)
*
- * R. Barrett, M. Berry, T. F. Chan, J. Demmel, J. M. Donato, J. Dongarra, V. - * Eijkhout, R. Pozo, C. Romine and H. Van der Vorst, + * R. Barrett, M. Berry, T. F. Chan, J. Demmel, J. M. Donato, J. Dongarra, + * V. Eijkhout, R. Pozo, C. Romine and H. Van der Vorst, * Templates for the Solution of Linear Systems: Building Blocks for - * Iterative Methods, SIAM
+ * Iterative Methods, SIAM + * *
* * @version $Id$ */ public abstract class RealLinearOperator { - /** The dimension of the codomain. */ - private final int rowDimension; - /** The dimension of the domain. */ - private final int columnDimension; - - /** - * Creates a new instance of this class, with specified dimensions - * of the domain and codomain. - * - * @param rowDimension Dimension of the codomain (number of rows). - * @param columnDimension Dimension of the domain (number of columns). - */ - public RealLinearOperator(final int rowDimension, final int columnDimension) { - this.columnDimension = columnDimension; - this.rowDimension = rowDimension; - } - /** * Returns the dimension of the codomain of this operator. * * @return the number of rows of the underlying matrix. */ - public final int getRowDimension() { - return rowDimension; - } + public abstract int getRowDimension(); /** * Returns the dimension of the domain of this operator. * * @return the number of columns of the underlying matrix. */ - public final int getColumnDimension() { - return columnDimension; - } + public abstract int getColumnDimension(); /** * Returns the result of multiplying {@code this} by the vector {@code x}.