Opus5
Interface Matrix

All Known Subinterfaces:
SparseMatrix
All Known Implementing Classes:
DenseMatrix

public interface Matrix

Encapsulates methods for manipulating a two-dimensional matrix of doubles.

Version:
$Id: Matrix.java,v 3.1 1998/07/28 01:32:17 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.

Field Summary
static java.lang.String copyright
           
 
Method Summary
 double get(int i, int j)
          Returns the element of this matrix at position (i,j).
 Matrix plus(Matrix matrix)
          Returns the sum of this matrix and the specified matrix.
 void put(int i, int j, double d)
          Stores a value in this matrix at position (i,j).
 Matrix times(Matrix matrix)
          Returns the product of this matrix and the specified matrix.
 Matrix transpose()
          Returns a matrix that is the transpose of this matrix.
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

get

public double get(int i,
                  int j)
Returns the element of this matrix at position (i,j).
Parameters:
i - The row number.
j - The column number.
Returns:
The matrix element at position (i,j).

put

public void put(int i,
                int j,
                double d)
Stores a value in this matrix at position (i,j).
Parameters:
i - The row number.
j - The column number.
d - The value to be stored at position (i,j).

transpose

public Matrix transpose()
Returns a matrix that is the transpose of this matrix. This matrix remains unchanged.
Returns:
The transpose of this matrix.

times

public Matrix times(Matrix matrix)
Returns the product of this matrix and the specified matrix. This matrix remains unchanged.
Parameters:
matrix - The matrix by which to multiply this matrix.
Returns:
The product of this matrix and the specified matrix.

plus

public Matrix plus(Matrix matrix)
Returns the sum of this matrix and the specified matrix. This matrix remains unchanged.
Parameters:
matrix - The matrix to add to this matrix.
Returns:
The sum of this matrix and the specified matrix.