Top Description Constructors Methods
org.apache.commons.math3.linear

public abstract Class RealLinearOperator

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.commons.math3.linear.AbstractRealMatrix, org.apache.commons.math3.linear.JacobiPreconditioner
Imports
org.apache.commons.math3.exception.DimensionMismatchException

This class defines a linear operator operating on real (double) vector spaces. No direct access to the coefficients of the underlying matrix is provided. The motivation for such an interface is well stated by Barrett et al. (1994):
We restrict ourselves to iterative methods, which work by repeatedly improving an approximate solution until it is accurate enough. These methods access the coefficient matrix A of the linear system only via the matrix-vector product y = A · x (and perhaps z = AT · x). Thus the user need only supply a subroutine for computing y (and perhaps z) given x, which permits full exploitation of the sparsity or other special structure of A.

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, Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, SIAM
Since
3.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract int

Returns:

the number of columns of the underlying matrix
getColumnDimension
()

Returns the dimension of the domain of this operator.

public abstract int

Returns:

the number of rows of the underlying matrix
getRowDimension
()

Returns the dimension of the codomain of this operator.

public boolean

Returns:

false
isTransposable
()

Returns true if this operator supports operateTranspose(RealVector).

public abstract RealVector

Returns:

the product of this instance with x
operate
(final RealVector
the vector to operate on
x
)

Returns the result of multiplying this by the vector x.

public RealVector

Returns:

the product of the transpose of this instance with x
operateTranspose
(final RealVector
the vector to operate on
x
)

Returns the result of multiplying the transpose of this operator by the vector x (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RealLinearOperatorback to summary
public RealLinearOperator()

Method Detail

getColumnDimensionback to summary
public abstract int getColumnDimension()

Returns the dimension of the domain of this operator.

Returns:int

the number of columns of the underlying matrix

getRowDimensionback to summary
public abstract int getRowDimension()

Returns the dimension of the codomain of this operator.

Returns:int

the number of rows of the underlying matrix

isTransposableback to summary
public boolean isTransposable()

Returns true if this operator supports operateTranspose(RealVector). If true is returned, operateTranspose(RealVector) should not throw UnsupportedOperationException. The default implementation returns false.

Returns:boolean

false

operateback to summary
public abstract RealVector operate(final RealVector x) throws DimensionMismatchException

Returns the result of multiplying this by the vector x.

Parameters
x:RealVector

the vector to operate on

Returns:RealVector

the product of this instance with x

Exceptions
DimensionMismatchException:
if the column dimension does not match the size of x
operateTransposeback to summary
public RealVector operateTranspose(final RealVector x) throws DimensionMismatchException, UnsupportedOperationException

Returns the result of multiplying the transpose of this operator by the vector x (optional operation). The default implementation throws an UnsupportedOperationException. Users overriding this method must also override isTransposable().

Parameters
x:RealVector

the vector to operate on

Returns:RealVector

the product of the transpose of this instance with x

Exceptions
DimensionMismatchException:
if the row dimension does not match the size of x
UnsupportedOperationException:
if this operation is not supported by this operator