Class JSci.maths.DoubleMatrix
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.DoubleMatrix

java.lang.Object
   |
   +----JSci.maths.Matrix
           |
           +----JSci.maths.DoubleMatrix

public class DoubleMatrix
extends Matrix
The DoubleMatrix class provides an object for encapsulating matrices containing doubles.

Variable Index

 o matrix
Array containing the elements of the matrix.

Constructor Index

 o DoubleMatrix()
Constructs a matrix.
 o DoubleMatrix(double[][])
Constructs a matrix by wrapping an array.
 o DoubleMatrix(DoubleVector[])
Constructs a matrix from an array of vectors.
 o DoubleMatrix(int, int)
Constructs an empty matrix.

Method Index

 o clone()
Creates a clone of this matrix.
 o columns()
Returns the number of columns.
 o equals(Object)
Compares two double matrices for equality.
 o frobeniusNorm()
Returns the Frobenius norm.
 o getElement(int, int)
Returns an element of the matrix.
 o hashCode()
Returns a hashcode for this matrix.
 o infNorm()
Returns the l(infinity)-norm.
 o isHermitian()
Returns true if this matrix is hermitian.
 o rows()
Returns the number of rows.
 o setElement(int, int, double)
Sets the value of an element of the matrix.
 o toComplexMatrix()
Converts this matrix to a complex matrix.
 o toIntegerMatrix()
Converts this matrix to an integer matrix.
 o toString()
Returns a string representing this matrix.

Variables

 o matrix
  protected double matrix[][]
Array containing the elements of the matrix.

Constructors

 o DoubleMatrix
  protected DoubleMatrix()
Constructs a matrix.
 o DoubleMatrix
  public DoubleMatrix(int row,
                      int col)
Constructs an empty matrix.
Parameters:
row - the number of rows
col - the number of columns
 o DoubleMatrix
  public DoubleMatrix(double array[][])
Constructs a matrix by wrapping an array.
Parameters:
array - an assigned value
 o DoubleMatrix
  public DoubleMatrix(DoubleVector array[])
Constructs a matrix from an array of vectors.
Parameters:
array - an assigned value

Methods

 o equals
  public boolean equals(Object m)
Compares two double matrices for equality.
Parameters:
m - a double matrix
Overrides:
equals in class Object
 o clone
  public Object clone()
Creates a clone of this matrix.
Returns:
a copy of this matrix.
Overrides:
clone in class Object
 o toString
  public String toString()
Returns a string representing this matrix.
Overrides:
toString in class Object
 o hashCode
  public int hashCode()
Returns a hashcode for this matrix.
Overrides:
hashCode in class Object
 o toIntegerMatrix
  public IntegerMatrix toIntegerMatrix()
Converts this matrix to an integer matrix.
Returns:
an integer matrix
 o toComplexMatrix
  public ComplexMatrix toComplexMatrix()
Converts this matrix to a complex matrix.
Returns:
a complex matrix
 o isHermitian
  public boolean isHermitian()
Returns true if this matrix is hermitian.
 o getElement
  public double getElement(int i,
                           int j)
Returns an element of the matrix.
Parameters:
i - row index of the element
j - column index of the element
Throws: MatrixDimensionException
If attempting to access an invalid element.
 o setElement
  public void setElement(int i,
                         int j,
                         double x)
Sets the value of an element of the matrix.
Parameters:
i - row index of the element
j - column index of the element
x - a number
Throws: MatrixDimensionException
If attempting to access an invalid element.
 o infNorm
  public double infNorm()
Returns the l(infinity)-norm.
 o frobeniusNorm
  public double frobeniusNorm()
Returns the Frobenius norm.
 o rows
  public int rows()
Returns the number of rows.
Overrides:
rows in class Matrix
 o columns
  public int columns()
Returns the number of columns.
Overrides:
columns in class Matrix

All Packages  Class Hierarchy  This Package  Previous  Next  Index