JSci.maths.matrices
Class Matrix

java.lang.Object
  extended byJSci.maths.matrices.Matrix
All Implemented Interfaces:
AbelianGroup.Member, Algebra.Member, Member, Module.Member, Ring.Member, java.io.Serializable, VectorSpace.Member
Direct Known Subclasses:
AbstractComplexMatrix, AbstractDoubleMatrix, AbstractIntegerMatrix, RingMatrix

public abstract class Matrix
extends java.lang.Object
implements Algebra.Member

The Matrix superclass provides an abstract encapsulation for matrices.

See Also:
Serialized Form
PlanetMath references:
Matrix

Field Summary
protected  int numCols
          The number of columns.
protected  int numRows
          The number of rows.
 
Constructor Summary
Matrix(int rows, int cols)
          Constructs a matrix.
 
Method Summary
 int columns()
          Returns the number of columns.
protected static java.lang.String getInvalidElementMsg(int i, int j)
          Returns an "invalid element" error message.
 int rows()
          Returns the number of rows.
abstract  Matrix transpose()
          Returns the transpose of this matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface JSci.maths.algebras.VectorSpace.Member
scalarDivide
 
Methods inherited from interface JSci.maths.algebras.Module.Member
scalarMultiply
 
Methods inherited from interface JSci.maths.groups.AbelianGroup.Member
add, negate, subtract
 
Methods inherited from interface JSci.maths.fields.Ring.Member
multiply
 

Field Detail

numRows

protected final int numRows
The number of rows.


numCols

protected final int numCols
The number of columns.

Constructor Detail

Matrix

public Matrix(int rows,
              int cols)
Constructs a matrix.

Method Detail

rows

public final int rows()
Returns the number of rows.


columns

public final int columns()
Returns the number of columns.


transpose

public abstract Matrix transpose()
Returns the transpose of this matrix.

PlanetMath references:
Transpose

getInvalidElementMsg

protected static java.lang.String getInvalidElementMsg(int i,
                                                       int j)
Returns an "invalid element" error message.

Parameters:
i - row index of the element
j - column index of the element