public class ComplexTridiagonalMatrix extends ComplexSquareMatrix
| Modifier and Type | Field and Description |
|---|---|
protected double[] |
diagIm |
protected double[] |
diagRe |
protected double[] |
ldiagIm
Tridiagonal data.
|
protected double[] |
ldiagRe
Tridiagonal data.
|
protected static int |
TRIDIAGONAL
Storage format identifier.
|
protected double[] |
udiagIm |
protected double[] |
udiagRe |
LU, LUpivotARRAY_2D, matrixIm, matrixReCLASS_SPECIFIC, numCols, numRows, storageFormat| Modifier | Constructor and Description |
|---|---|
|
ComplexTridiagonalMatrix(Complex[][] array)
Constructs a matrix from an array.
|
|
ComplexTridiagonalMatrix(int size)
Constructs an empty matrix.
|
protected |
ComplexTridiagonalMatrix(int size,
int storeID)
Constructs a matrix.
|
| Modifier and Type | Method and Description |
|---|---|
ComplexMatrix |
add(ComplexMatrix m)
Returns the addition of this matrix and another.
|
ComplexSquareMatrix |
add(ComplexSquareMatrix m)
Returns the addition of this matrix and another.
|
ComplexTridiagonalMatrix |
add(ComplexTridiagonalMatrix m)
Returns the addition of this matrix and another.
|
ComplexMatrix |
conjugate()
Returns the complex conjugate of this matrix.
|
boolean |
equals(java.lang.Object m)
Compares two complex tridiagonal matrices for equality.
|
double |
frobeniusNorm()
Returns the Frobenius (l2) norm.
|
Complex |
getElement(int i,
int j)
Returns an element of the matrix.
|
ComplexMatrix |
hermitianAdjoint()
Returns the hermitian adjoint of this matrix.
|
DoubleMatrix |
imag()
Returns the imaginary part of this complex matrix.
|
double |
infNorm()
Returns the l
-norm. |
ComplexSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix.
|
ComplexMatrix |
mapElements(ComplexMapping f)
Applies a function on all the matrix elements.
|
ComplexMatrix |
multiply(ComplexMatrix m)
Returns the multiplication of this matrix and another.
|
ComplexSquareMatrix |
multiply(ComplexSquareMatrix m)
Returns the multiplication of this matrix and another.
|
ComplexSquareMatrix |
multiply(ComplexTridiagonalMatrix m)
Returns the multiplication of this matrix and another.
|
ComplexVector |
multiply(ComplexVector v)
Returns the multiplication of a vector by this matrix.
|
double |
operatorNorm()
Returns the operator norm.
|
DoubleMatrix |
real()
Returns the real part of this complex matrix.
|
ComplexMatrix |
scalarMultiply(Complex z)
Returns the multiplication of this matrix by a scalar.
|
ComplexMatrix |
scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar.
|
void |
setElement(int i,
int j,
Complex z)
Sets the value of an element of the matrix.
|
void |
setElement(int i,
int j,
double x,
double y)
Sets the value of an element of the matrix.
|
ComplexMatrix |
subtract(ComplexMatrix m)
Returns the subtraction of this matrix and another.
|
ComplexSquareMatrix |
subtract(ComplexSquareMatrix m)
Returns the subtraction of this matrix by another.
|
ComplexTridiagonalMatrix |
subtract(ComplexTridiagonalMatrix m)
Returns the subtraction of this matrix and another.
|
java.lang.String |
toString()
Returns a string representing this matrix.
|
Complex |
trace()
Returns the trace.
|
Matrix |
transpose()
Returns the transpose of this matrix.
|
det, inverse, involution, isHermitian, isUnitary, norm, polarDecomposeadd, directSum, finalize, hashCode, multiply, negate, scalarDivide, scalarDivide, scalarDivide, scalarMultiply, subtract, tensorProductcolumns, getInvalidElementMsg, rowsmultiplyscalarDividescalarMultiplyprotected static final int TRIDIAGONAL
protected double[] ldiagRe
protected double[] ldiagIm
protected double[] diagRe
protected double[] diagIm
protected double[] udiagRe
protected double[] udiagIm
protected ComplexTridiagonalMatrix(int size,
int storeID)
public ComplexTridiagonalMatrix(int size)
size - the number of rows/columnspublic ComplexTridiagonalMatrix(Complex[][] array)
array - an assigned valueMatrixDimensionException - If the array is not square.public boolean equals(java.lang.Object m)
equals in class ComplexMatrixm - a complex tridiagonal matrixpublic java.lang.String toString()
toString in class ComplexMatrixpublic DoubleMatrix real()
real in class ComplexMatrixpublic DoubleMatrix imag()
imag in class ComplexMatrixpublic Complex getElement(int i, int j)
getElement in class ComplexMatrixi - row index of the elementj - column index of the elementMatrixDimensionException - If attempting to access an invalid element.public void setElement(int i,
int j,
Complex z)
setElement in class ComplexMatrixi - row index of the elementj - column index of the elementz - a complex numberMatrixDimensionException - If attempting to access an invalid element.public void setElement(int i,
int j,
double x,
double y)
setElement in class ComplexMatrixi - row index of the elementj - column index of the elementx - the real part of a complex numbery - the imaginary part of a complex numberMatrixDimensionException - If attempting to access an invalid element.public Complex trace()
trace in class ComplexSquareMatrixpublic double infNorm()
-norm.infNorm in class ComplexMatrixpublic double frobeniusNorm()
frobeniusNorm in class ComplexMatrixpublic double operatorNorm()
throws MaximumIterationsExceededException
operatorNorm in class ComplexSquareMatrixMaximumIterationsExceededException - If it takes more than 50 iterations to determine an eigenvalue.public ComplexMatrix add(ComplexMatrix m)
add in class ComplexSquareMatrixm - a complex matrixMatrixDimensionException - If the matrices are different sizes.public ComplexSquareMatrix add(ComplexSquareMatrix m)
add in class ComplexSquareMatrixm - a complex square matrixMatrixDimensionException - If the matrices are different sizes.public ComplexTridiagonalMatrix add(ComplexTridiagonalMatrix m)
m - a complex tridiagonal matrixMatrixDimensionException - If the matrices are different sizes.public ComplexMatrix subtract(ComplexMatrix m)
subtract in class ComplexSquareMatrixm - a complex matrixMatrixDimensionException - If the matrices are different sizes.public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
subtract in class ComplexSquareMatrixm - a complex square matrixMatrixDimensionException - If the matrices are different sizes.public ComplexTridiagonalMatrix subtract(ComplexTridiagonalMatrix m)
m - a complex tridiagonal matrixMatrixDimensionException - If the matrices are different sizes.public ComplexMatrix scalarMultiply(Complex z)
scalarMultiply in class ComplexSquareMatrixz - a complex numberpublic ComplexMatrix scalarMultiply(double x)
scalarMultiply in class ComplexSquareMatrixx - a doublepublic ComplexVector multiply(ComplexVector v)
multiply in class ComplexSquareMatrixv - a complex vectorDimensionException - If the matrix and vector are incompatible.public ComplexMatrix multiply(ComplexMatrix m)
multiply in class ComplexMatrixm - a complex matrixMatrixDimensionException - If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
multiply in class ComplexSquareMatrixm - a complex square matrixMatrixDimensionException - If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexTridiagonalMatrix m)
m - a complex tridiagonal matrixMatrixDimensionException - If the matrices are different sizes.public ComplexMatrix hermitianAdjoint()
hermitianAdjoint in class ComplexSquareMatrixpublic ComplexMatrix conjugate()
conjugate in class ComplexSquareMatrixpublic Matrix transpose()
transpose in class ComplexSquareMatrixpublic ComplexSquareMatrix[] luDecompose(int[] pivot)
luDecompose in class ComplexSquareMatrixpublic ComplexMatrix mapElements(ComplexMapping f)
mapElements in class ComplexSquareMatrixf - a user-defined function