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.
-
IntegerDiagonalMatrix(int)
- Constructs an empty matrix.
-
IntegerDiagonalMatrix(int[])
- Constructs a matrix by wrapping an array containing the diagonal elements.
-
IntegerDiagonalMatrix(int[][])
- Constructs a matrix from an array.
-
clone()
- Creates a clone of this matrix.
-
columns()
- Returns the number of columns.
-
determinant()
- Returns the determinant.
-
equals(Object)
- Compares two integer diagonal matrices for equality.
-
frobeniusNorm()
- Returns the Frobenius norm.
-
getElement(int, int)
- Returns an element of the matrix.
-
identity(int)
- Creates an identity matrix.
-
infNorm()
- Returns the l(infinity)-norm.
-
isHermitian()
- Returns true if this matrix is hermitian.
-
isUnitary()
- Returns true if this matrix is unitary.
-
rows()
- Returns the number of rows.
-
setElement(int, int, int)
- Sets the value of an element of the matrix.
-
toComplexMatrix()
- Converts this matrix to a complex matrix.
-
toDoubleMatrix()
- Converts this matrix to a double matrix.
-
trace()
- Returns the trace.
IntegerDiagonalMatrix
public IntegerDiagonalMatrix(int size)
- Constructs an empty matrix.
- Parameters:
- size - the number of rows/columns
IntegerDiagonalMatrix
public IntegerDiagonalMatrix(int array[][])
- Constructs a matrix from an array.
- Parameters:
- array - an assigned value
- Throws: MatrixDimensionException
- If the array is not square.
IntegerDiagonalMatrix
public IntegerDiagonalMatrix(int array[])
- Constructs a matrix by wrapping an array containing the diagonal elements.
- Parameters:
- array - an assigned value
identity
public static IntegerDiagonalMatrix identity(int size)
- Creates an identity matrix.
- Parameters:
- size - the number of rows/columns
equals
public boolean equals(Object m)
- Compares two integer diagonal matrices for equality.
- Parameters:
- m - a integer diagonal matrix
- Overrides:
- equals in class IntegerTridiagonalMatrix
clone
public Object clone()
- Creates a clone of this matrix.
- Returns:
- a copy of this matrix.
- Overrides:
- clone in class IntegerTridiagonalMatrix
toDoubleMatrix
public DoubleMatrix toDoubleMatrix()
- Converts this matrix to a double matrix.
- Returns:
- a double diagonal matrix
- Overrides:
- toDoubleMatrix in class IntegerTridiagonalMatrix
toComplexMatrix
public ComplexMatrix toComplexMatrix()
- Converts this matrix to a complex matrix.
- Returns:
- a complex diagonal matrix
- Overrides:
- toComplexMatrix in class IntegerTridiagonalMatrix
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
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
isHermitian
public boolean isHermitian()
- Returns true if this matrix is hermitian.
- Overrides:
- isHermitian in class IntegerMatrix
isUnitary
public boolean isUnitary()
- Returns true if this matrix is unitary.
- Overrides:
- isUnitary in class IntegerSquareMatrix
determinant
public int determinant()
- Returns the determinant.
- Overrides:
- determinant in class IntegerSquareMatrix
trace
public int trace()
- Returns the trace.
- Overrides:
- trace in class IntegerTridiagonalMatrix
infNorm
public int infNorm()
- Returns the l(infinity)-norm.
- Overrides:
- infNorm in class IntegerTridiagonalMatrix
frobeniusNorm
public double frobeniusNorm()
- Returns the Frobenius norm.
- Overrides:
- frobeniusNorm in class IntegerTridiagonalMatrix
rows
public int rows()
- Returns the number of rows.
- Overrides:
- rows in class IntegerTridiagonalMatrix
columns
public int columns()
- Returns the number of columns.
- Overrides:
- columns in class IntegerTridiagonalMatrix
All Packages Class Hierarchy This Package Previous Next Index