|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.maths.matrices.Matrix
JSci.maths.matrices.AbstractDoubleMatrix
JSci.maths.matrices.AbstractDoubleSquareMatrix
JSci.maths.matrices.DoubleTridiagonalMatrix
The DoubleTridiagonalMatrix class provides an object for encapsulating double tridiagonal matrices.
| Field Summary | |
protected double[] |
diag
|
protected double[] |
ldiag
Tridiagonal data. |
protected double[] |
udiag
|
| Fields inherited from class JSci.maths.matrices.AbstractDoubleSquareMatrix |
LU, LUpivot |
| Fields inherited from class JSci.maths.matrices.Matrix |
numCols, numRows |
| Constructor Summary | |
DoubleTridiagonalMatrix(double[][] array)
Constructs a matrix from an array. |
|
DoubleTridiagonalMatrix(int size)
Constructs an empty matrix. |
|
| Method Summary | |
AbstractDoubleSquareMatrix |
add(AbstractDoubleSquareMatrix m)
Returns the addition of this matrix and another. |
DoubleSquareMatrix |
add(DoubleSquareMatrix m)
|
DoubleTridiagonalMatrix |
add(DoubleTridiagonalMatrix m)
Returns the addition of this matrix and another. |
AbstractDoubleSquareMatrix[] |
choleskyDecompose()
Returns the Cholesky decomposition of this matrix. |
boolean |
equals(AbstractDoubleMatrix m)
Compares two ${nativeTyp} matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius (l2) norm. |
double |
getElement(int i,
int j)
Returns an element of the matrix. |
double |
infNorm()
Returns the l -norm. |
boolean |
isSymmetric()
Returns true if this matrix is symmetric. |
AbstractDoubleMatrix |
mapElements(Mapping f)
Applies a function on all the matrix elements. |
AbstractDoubleSquareMatrix |
multiply(AbstractDoubleSquareMatrix m)
Returns the multiplication of this matrix and another. |
AbstractDoubleVector |
multiply(AbstractDoubleVector v)
Returns the multiplication of a vector by this matrix. |
DoubleSquareMatrix |
multiply(DoubleSquareMatrix m)
|
DoubleSquareMatrix |
multiply(DoubleTridiagonalMatrix m)
|
double |
operatorNorm()
Returns the operator norm. |
AbstractDoubleSquareMatrix[] |
qrDecompose()
Returns the QR decomposition of this matrix. |
AbstractDoubleMatrix |
scalarDivide(double x)
Returns the division of this matrix by a scalar. |
AbstractDoubleMatrix |
scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar. |
double |
scalarProduct(AbstractDoubleSquareMatrix m)
Returns the scalar product of this matrix and another. |
double |
scalarProduct(DoubleSquareMatrix m)
|
double |
scalarProduct(DoubleTridiagonalMatrix m)
|
void |
setElement(int i,
int j,
double x)
Sets the value of an element of the matrix. |
AbstractDoubleSquareMatrix[] |
singularValueDecompose()
Returns the singular value decomposition of this matrix. |
AbstractDoubleSquareMatrix |
subtract(AbstractDoubleSquareMatrix m)
Returns the subtraction of this matrix by another. |
DoubleSquareMatrix |
subtract(DoubleSquareMatrix m)
|
DoubleTridiagonalMatrix |
subtract(DoubleTridiagonalMatrix m)
Returns the subtraction of this matrix and another. |
AbstractComplexMatrix |
toComplexMatrix()
Converts this matrix to a complex matrix. |
AbstractIntegerMatrix |
toIntegerMatrix()
Converts this matrix to an integer matrix. |
java.lang.String |
toString()
Returns a string representing this matrix. |
double |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class JSci.maths.matrices.AbstractDoubleSquareMatrix |
add, det, directSum, inverse, isUnitary, luDecompose, negate, polarDecompose, scalarProduct, subtract, tensor |
| Methods inherited from class JSci.maths.matrices.AbstractDoubleMatrix |
add, directSum, equals, hashCode, multiply, multiply, scalarDivide, scalarMultiply, subtract, tensor |
| Methods inherited from class JSci.maths.matrices.Matrix |
columns, getInvalidElementMsg, rows |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final double[] ldiag
protected final double[] diag
protected final double[] udiag
| Constructor Detail |
public DoubleTridiagonalMatrix(int size)
size - the number of rows/columnspublic DoubleTridiagonalMatrix(double[][] array)
array - an assigned value
MatrixDimensionException - If the array is not square.| Method Detail |
public boolean equals(AbstractDoubleMatrix m)
equals in class AbstractDoubleMatrixm - a double matrixpublic java.lang.String toString()
toString in class AbstractDoubleMatrixpublic AbstractIntegerMatrix toIntegerMatrix()
toIntegerMatrix in class AbstractDoubleSquareMatrixpublic AbstractComplexMatrix toComplexMatrix()
toComplexMatrix in class AbstractDoubleSquareMatrix
public double getElement(int i,
int j)
getElement in class AbstractDoubleMatrixi - 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,
double x)
setElement in class AbstractDoubleMatrixi - 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 AbstractDoubleSquareMatrixpublic double trace()
trace in class AbstractDoubleSquareMatrixpublic double infNorm()
-norm.
infNorm in class AbstractDoubleMatrixpublic double frobeniusNorm()
frobeniusNorm in class AbstractDoubleMatrix
public double operatorNorm()
throws MaximumIterationsExceededException
operatorNorm in class AbstractDoubleSquareMatrixMaximumIterationsExceededException - If it takes more than 50 iterations to determine an eigenvalue.public AbstractDoubleSquareMatrix add(AbstractDoubleSquareMatrix m)
add in class AbstractDoubleSquareMatrixm - a double matrix
MatrixDimensionException - If the matrices are different sizes.public DoubleSquareMatrix add(DoubleSquareMatrix m)
public DoubleTridiagonalMatrix add(DoubleTridiagonalMatrix m)
m - a double tridiagonal matrix
MatrixDimensionException - If the matrices are different sizes.public AbstractDoubleSquareMatrix subtract(AbstractDoubleSquareMatrix m)
subtract in class AbstractDoubleSquareMatrixm - a double matrix
MatrixDimensionException - If the matrices are different sizes.public DoubleSquareMatrix subtract(DoubleSquareMatrix m)
public DoubleTridiagonalMatrix subtract(DoubleTridiagonalMatrix m)
m - a double tridiagonal matrix
MatrixDimensionException - If the matrices are different sizes.public AbstractDoubleMatrix scalarMultiply(double x)
scalarMultiply in class AbstractDoubleSquareMatrixx - a double.
public AbstractDoubleMatrix scalarDivide(double x)
scalarDivide in class AbstractDoubleSquareMatrixx - a double.
public double scalarProduct(AbstractDoubleSquareMatrix m)
scalarProduct in class AbstractDoubleSquareMatrixm - a double matrix.
MatrixDimensionException - If the matrices are different sizes.public double scalarProduct(DoubleSquareMatrix m)
public double scalarProduct(DoubleTridiagonalMatrix m)
public AbstractDoubleVector multiply(AbstractDoubleVector v)
multiply in class AbstractDoubleMatrixv - a double vector.
DimensionException - If the matrix and vector are incompatible.public AbstractDoubleSquareMatrix multiply(AbstractDoubleSquareMatrix m)
multiply in class AbstractDoubleSquareMatrixm - a double matrix
MatrixDimensionException - If the matrices are incompatible.public DoubleSquareMatrix multiply(DoubleSquareMatrix m)
public DoubleSquareMatrix multiply(DoubleTridiagonalMatrix m)
public Matrix transpose()
transpose in class AbstractDoubleSquareMatrixpublic AbstractDoubleSquareMatrix[] choleskyDecompose()
choleskyDecompose in class AbstractDoubleSquareMatrixpublic AbstractDoubleSquareMatrix[] qrDecompose()
qrDecompose in class AbstractDoubleSquareMatrixpublic AbstractDoubleSquareMatrix[] singularValueDecompose()
singularValueDecompose in class AbstractDoubleSquareMatrixpublic AbstractDoubleMatrix mapElements(Mapping f)
mapElements in class AbstractDoubleSquareMatrixf - a user-defined function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||