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
This commit is contained in:
Gilles Sadowski 2011-07-15 10:46:29 +00:00
parent 03f66650d3
commit 1e649ff9f3
2 changed files with 6 additions and 35 deletions

View File

@ -26,15 +26,6 @@ import org.apache.commons.math.exception.DimensionMismatchException;
* @version $Id$ * @version $Id$
*/ */
public abstract class InvertibleRealLinearOperator extends RealLinearOperator { 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 * Computes the matrix-vector product of the inverse of this instance
* with {@code b} and returns the result. * with {@code b} and returns the result.

View File

@ -41,49 +41,29 @@ import org.apache.commons.math.exception.DimensionMismatchException;
* <dl> * <dl>
* <dt><a name="BARR1994">Barret et al. (1994)</a></dt> * <dt><a name="BARR1994">Barret et al. (1994)</a></dt>
* <dd> * <dd>
* R. Barrett, M. Berry, T. F. Chan, J. Demmel, J. M. Donato, J. Dongarra, V. * R. Barrett, M. Berry, T. F. Chan, J. Demmel, J. M. Donato, J. Dongarra,
* Eijkhout, R. Pozo, C. Romine and H. Van der Vorst, * V. Eijkhout, R. Pozo, C. Romine and H. Van der Vorst,
* <em>Templates for the Solution of Linear Systems: Building Blocks for * <em>Templates for the Solution of Linear Systems: Building Blocks for
* Iterative Methods</em>, SIAM</dd> * Iterative Methods</em>, SIAM
* </dd>
* </dl> * </dl>
* *
* @version $Id$ * @version $Id$
*/ */
public abstract class RealLinearOperator { 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. * Returns the dimension of the codomain of this operator.
* *
* @return the number of rows of the underlying matrix. * @return the number of rows of the underlying matrix.
*/ */
public final int getRowDimension() { public abstract int getRowDimension();
return rowDimension;
}
/** /**
* Returns the dimension of the domain of this operator. * Returns the dimension of the domain of this operator.
* *
* @return the number of columns of the underlying matrix. * @return the number of columns of the underlying matrix.
*/ */
public final int getColumnDimension() { public abstract int getColumnDimension();
return columnDimension;
}
/** /**
* Returns the result of multiplying {@code this} by the vector {@code x}. * Returns the result of multiplying {@code this} by the vector {@code x}.