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

Class JSci.maths.IntegerDiagonalMatrix

java.lang.Object
   |
   +----JSci.maths.Matrix
           |
           +----JSci.maths.IntegerMatrix
                   |
                   +----JSci.maths.IntegerSquareMatrix
                           |
                           +----JSci.maths.IntegerTridiagonalMatrix
                                   |
                                   +----JSci.maths.IntegerDiagonalMatrix

public final class IntegerDiagonalMatrix
extends IntegerTridiagonalMatrix
The IntegerDiagonalMatrix class provides an object for encapsulating diagonal matrices containing integers.

Constructor Index

 o IntegerDiagonalMatrix(int)
Constructs an empty matrix.
 o IntegerDiagonalMatrix(int[])
Constructs a matrix by wrapping an array containing the diagonal elements.
 o IntegerDiagonalMatrix(int[][])
Constructs a matrix from an array.

Method Index

 o clone()
Creates a clone of this matrix.
 o columns()
Returns the number of columns.
 o determinant()
Returns the determinant.
 o equals(Object)
Compares two integer diagonal matrices for equality.
 o frobeniusNorm()
Returns the Frobenius norm.
 o getElement(int, int)
Returns an element of the matrix.
 o identity(int)
Creates an identity matrix.
 o infNorm()
Returns the l(infinity)-norm.
 o isHermitian()
Returns true if this matrix is hermitian.
 o isUnitary()
Returns true if this matrix is unitary.
 o rows()
Returns the number of rows.
 o setElement(int, int, int)
Sets the value of an element of the matrix.
 o toComplexMatrix()
Converts this matrix to a complex matrix.
 o toDoubleMatrix()
Converts this matrix to a double matrix.
 o trace()
Returns the trace.

Constructors

 o IntegerDiagonalMatrix
  public IntegerDiagonalMatrix(int size)
Constructs an empty matrix.
Parameters:
size - the number of rows/columns
 o IntegerDiagonalMatrix
  public IntegerDiagonalMatrix(int array[][])
Constructs a matrix from an array.
Parameters:
array - an assigned value
Throws: MatrixDimensionException
If the array is not square.
 o IntegerDiagonalMatrix
  public IntegerDiagonalMatrix(int array[])
Constructs a matrix by wrapping an array containing the diagonal elements.
Parameters:
array - an assigned value

Methods

 o identity
  public static IntegerDiagonalMatrix identity(int size)
Creates an identity matrix.
Parameters:
size - the number of rows/columns
 o equals
  public boolean equals(Object m)
Compares two integer diagonal matrices for equality.
Parameters:
m - a integer diagonal matrix
Overrides:
equals in class IntegerTridiagonalMatrix
 o clone
  public Object clone()
Creates a clone of this matrix.
Returns:
a copy of this matrix.
Overrides:
clone in class IntegerTridiagonalMatrix
 o toDoubleMatrix
  public DoubleMatrix toDoubleMatrix()
Converts this matrix to a double matrix.
Returns:
a double diagonal matrix
Overrides:
toDoubleMatrix in class IntegerTridiagonalMatrix
 o toComplexMatrix
  public ComplexMatrix toComplexMatrix()
Converts this matrix to a complex matrix.
Returns:
a complex diagonal matrix
Overrides:
toComplexMatrix in class IntegerTridiagonalMatrix
 o getElement
  public int 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.
Overrides:
getElement in class IntegerTridiagonalMatrix
 o setElement
  public void setElement(int i,
                         int j,
                         int x)
Sets the value of an element of the matrix.
Parameters:
i - row index of the element
j - column index of the element
x - an integer
Throws: MatrixDimensionException
If attempting to access an invalid element.
Overrides:
setElement in class IntegerTridiagonalMatrix
 o isHermitian
  public boolean isHermitian()
Returns true if this matrix is hermitian.
Overrides:
isHermitian in class IntegerMatrix
 o isUnitary
  public boolean isUnitary()
Returns true if this matrix is unitary.
Overrides:
isUnitary in class IntegerSquareMatrix
 o determinant
  public int determinant()
Returns the determinant.
Overrides:
determinant in class IntegerSquareMatrix
 o trace
  public int trace()
Returns the trace.
Overrides:
trace in class IntegerTridiagonalMatrix
 o infNorm
  public int infNorm()
Returns the l(infinity)-norm.
Overrides:
infNorm in class IntegerTridiagonalMatrix
 o frobeniusNorm
  public double frobeniusNorm()
Returns the Frobenius norm.
Overrides:
frobeniusNorm in class IntegerTridiagonalMatrix
 o rows
  public int rows()
Returns the number of rows.
Overrides:
rows in class IntegerTridiagonalMatrix
 o columns
  public int columns()
Returns the number of columns.
Overrides:
columns in class IntegerTridiagonalMatrix

All Packages  Class Hierarchy  This Package  Previous  Next  Index