|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.maths.Matrix
JSci.maths.IntegerMatrix
JSci.maths.IntegerSquareMatrix
JSci.maths.IntegerTridiagonalMatrix
public class IntegerTridiagonalMatrix
The IntegerTridiagonalMatrix class provides an object for encapsulating tridiagonal matrices containing integers. Uses compressed diagonal storage.
| Field Summary | |
|---|---|
protected int[] |
diag
|
protected int[] |
ldiag
Tridiagonal data. |
protected static int |
TRIDIAGONAL
Storage format identifier. |
protected int[] |
udiag
|
| Fields inherited from class JSci.maths.IntegerSquareMatrix |
|---|
LU, LUpivot |
| Fields inherited from class JSci.maths.IntegerMatrix |
|---|
ARRAY_2D, matrix |
| Fields inherited from class JSci.maths.Matrix |
|---|
CLASS_SPECIFIC, numCols, numRows, storageFormat |
| Constructor Summary | |
|---|---|
|
IntegerTridiagonalMatrix(int size)
Constructs an empty matrix. |
|
IntegerTridiagonalMatrix(int[][] array)
Constructs a matrix from an array. |
protected |
IntegerTridiagonalMatrix(int size,
int storeID)
Constructs a matrix. |
| Method Summary | |
|---|---|
IntegerMatrix |
add(IntegerMatrix m)
Returns the addition of this matrix and another. |
IntegerSquareMatrix |
add(IntegerSquareMatrix m)
Returns the addition of this matrix and another. |
IntegerTridiagonalMatrix |
add(IntegerTridiagonalMatrix m)
Returns the addition of this matrix and another. |
DoubleSquareMatrix[] |
choleskyDecompose()
Returns the Cholesky decomposition of this matrix. |
boolean |
equals(java.lang.Object m)
Compares two integer tridiagonal matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius (l2) norm. |
int |
getElement(int i,
int j)
Returns an element of the matrix. |
int |
infNorm()
Returns the l -norm. |
boolean |
isSymmetric()
Returns true if this matrix is symmetric. |
DoubleSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
IntegerMatrix |
multiply(IntegerMatrix m)
Returns the multiplication of this matrix and another. |
IntegerSquareMatrix |
multiply(IntegerSquareMatrix m)
Returns the multiplication of this matrix and another. |
IntegerSquareMatrix |
multiply(IntegerTridiagonalMatrix m)
Returns the multiplication of this matrix and another. |
IntegerVector |
multiply(IntegerVector v)
Returns the multiplication of a vector by this matrix. |
IntegerMatrix |
scalarMultiply(int x)
Returns the multiplication of this matrix by a scalar. |
void |
setElement(int i,
int j,
int x)
Sets the value of an element of the matrix. |
IntegerMatrix |
subtract(IntegerMatrix m)
Returns the subtraction of this matrix and another. |
IntegerSquareMatrix |
subtract(IntegerSquareMatrix m)
Returns the subtraction of this matrix by another. |
IntegerTridiagonalMatrix |
subtract(IntegerTridiagonalMatrix m)
Returns the subtraction of this matrix by another. |
ComplexMatrix |
toComplexMatrix()
Converts this matrix to a complex matrix. |
DoubleMatrix |
toDoubleMatrix()
Converts this matrix to a double matrix. |
java.lang.String |
toString()
Returns a string representing this matrix. |
int |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class JSci.maths.IntegerSquareMatrix |
|---|
choleskyDecomposition, det, isUnitary |
| Methods inherited from class JSci.maths.IntegerMatrix |
|---|
add, finalize, hashCode, multiply, negate, scalarDivide, scalarMultiply, subtract |
| Methods inherited from class JSci.maths.Matrix |
|---|
columns, getInvalidElementMsg, rows |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int TRIDIAGONAL
protected int[] ldiag
protected int[] diag
protected int[] udiag
| Constructor Detail |
|---|
protected IntegerTridiagonalMatrix(int size,
int storeID)
public IntegerTridiagonalMatrix(int size)
size - the number of rows/columnspublic IntegerTridiagonalMatrix(int[][] array)
array - an assigned value
MatrixDimensionException - If the array is not square.| Method Detail |
|---|
public boolean equals(java.lang.Object m)
equals in class IntegerMatrixm - a integer tridiagonal matrixpublic java.lang.String toString()
toString in class IntegerMatrixpublic DoubleMatrix toDoubleMatrix()
toDoubleMatrix in class IntegerMatrixpublic ComplexMatrix toComplexMatrix()
toComplexMatrix in class IntegerMatrix
public int getElement(int i,
int j)
getElement in class IntegerMatrixi - row index of the elementj - column index of the element
MatrixDimensionException - If attempting to access an invalid element.
public void setElement(int i,
int j,
int x)
setElement in class IntegerMatrixi - row index of the elementj - column index of the elementx - a number
MatrixDimensionException - If attempting to access an invalid element.public boolean isSymmetric()
isSymmetric in class IntegerSquareMatrixpublic int trace()
trace in class IntegerSquareMatrixpublic int infNorm()
-norm.
infNorm in class IntegerMatrixpublic double frobeniusNorm()
frobeniusNorm in class IntegerMatrixpublic IntegerMatrix add(IntegerMatrix m)
add in class IntegerSquareMatrixm - an integer matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix add(IntegerSquareMatrix m)
add in class IntegerSquareMatrixm - an integer square matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerTridiagonalMatrix add(IntegerTridiagonalMatrix m)
m - an integer tridiagonal matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerMatrix subtract(IntegerMatrix m)
subtract in class IntegerSquareMatrixm - an integer matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix subtract(IntegerSquareMatrix m)
subtract in class IntegerSquareMatrixm - an integer square matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerTridiagonalMatrix subtract(IntegerTridiagonalMatrix m)
m - an integer tridiagonal matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerMatrix scalarMultiply(int x)
scalarMultiply in class IntegerSquareMatrixx - an integer
public IntegerVector multiply(IntegerVector v)
multiply in class IntegerSquareMatrixv - an integer vector
DimensionException - If the matrix and vector are incompatible.public IntegerMatrix multiply(IntegerMatrix m)
multiply in class IntegerMatrixm - an integer matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix multiply(IntegerSquareMatrix m)
multiply in class IntegerSquareMatrixm - an integer square matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix multiply(IntegerTridiagonalMatrix m)
m - an integer tridiagonal matrix
MatrixDimensionException - If the matrices are different sizes.public Matrix transpose()
transpose in class IntegerSquareMatrixpublic DoubleSquareMatrix[] luDecompose(int[] pivot)
luDecompose in class IntegerSquareMatrixpivot - an empty array of length rows()+1
to hold the pivot information (null if not interested).
The last array element will contain the parity.
public DoubleSquareMatrix[] choleskyDecompose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||