|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSci.maths.Matrix
JSci.maths.ComplexMatrix
JSci.maths.ComplexSquareMatrix
JSci.maths.ComplexTridiagonalMatrix
public class ComplexTridiagonalMatrix
The ComplexTridiagonalMatrix class provides an object for encapsulating tridiagonal matrices containing complex numbers. Uses compressed diagonal storage.
Field Summary | |
---|---|
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
|
Fields inherited from class JSci.maths.ComplexSquareMatrix |
---|
LU, LUpivot |
Fields inherited from class JSci.maths.ComplexMatrix |
---|
ARRAY_2D, matrixIm, matrixRe |
Fields inherited from class JSci.maths.Matrix |
---|
CLASS_SPECIFIC, numCols, numRows, storageFormat |
Constructor Summary | |
---|---|
|
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. |
Method Summary | |
---|---|
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 ![]() |
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. |
Methods inherited from class JSci.maths.ComplexSquareMatrix |
---|
det, inverse, involution, isHermitian, isUnitary, norm, polarDecompose |
Methods inherited from class JSci.maths.ComplexMatrix |
---|
add, directSum, finalize, hashCode, multiply, negate, scalarDivide, scalarDivide, scalarDivide, scalarMultiply, subtract, tensorProduct |
Methods inherited from class JSci.maths.Matrix |
---|
columns, getInvalidElementMsg, rows |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface JSci.maths.fields.Ring.Member |
---|
multiply |
Methods inherited from interface JSci.maths.algebras.VectorSpace.Member |
---|
scalarDivide |
Methods inherited from interface JSci.maths.algebras.Module.Member |
---|
scalarMultiply |
Field Detail |
---|
protected static final int TRIDIAGONAL
protected double[] ldiagRe
protected double[] ldiagIm
protected double[] diagRe
protected double[] diagIm
protected double[] udiagRe
protected double[] udiagIm
Constructor Detail |
---|
protected ComplexTridiagonalMatrix(int size, int storeID)
public ComplexTridiagonalMatrix(int size)
size
- the number of rows/columnspublic ComplexTridiagonalMatrix(Complex[][] array)
array
- an assigned value
MatrixDimensionException
- If the array is not square.Method Detail |
---|
public boolean equals(java.lang.Object m)
equals
in class ComplexMatrix
m
- a complex tridiagonal matrixpublic java.lang.String toString()
toString
in class ComplexMatrix
public DoubleMatrix real()
real
in class ComplexMatrix
public DoubleMatrix imag()
imag
in class ComplexMatrix
public Complex getElement(int i, int j)
getElement
in class ComplexMatrix
i
- 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, Complex z)
setElement
in class ComplexMatrix
i
- row index of the elementj
- column index of the elementz
- a complex number
MatrixDimensionException
- If attempting to access an invalid element.public void setElement(int i, int j, double x, double y)
setElement
in class ComplexMatrix
i
- row index of the elementj
- column index of the elementx
- the real part of a complex numbery
- the imaginary part of a complex number
MatrixDimensionException
- If attempting to access an invalid element.public Complex trace()
trace
in class ComplexSquareMatrix
public double infNorm()
infNorm
in class ComplexMatrix
public double frobeniusNorm()
frobeniusNorm
in class ComplexMatrix
public double operatorNorm() throws MaximumIterationsExceededException
operatorNorm
in class ComplexSquareMatrix
MaximumIterationsExceededException
- If it takes more than 50 iterations to determine an eigenvalue.public ComplexMatrix add(ComplexMatrix m)
add
in class ComplexSquareMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix add(ComplexSquareMatrix m)
add
in class ComplexSquareMatrix
m
- a complex square matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexTridiagonalMatrix add(ComplexTridiagonalMatrix m)
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexMatrix subtract(ComplexMatrix m)
subtract
in class ComplexSquareMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
subtract
in class ComplexSquareMatrix
m
- a complex square matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexTridiagonalMatrix subtract(ComplexTridiagonalMatrix m)
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexMatrix scalarMultiply(Complex z)
scalarMultiply
in class ComplexSquareMatrix
z
- a complex number
public ComplexMatrix scalarMultiply(double x)
scalarMultiply
in class ComplexSquareMatrix
x
- a double
public ComplexVector multiply(ComplexVector v)
multiply
in class ComplexSquareMatrix
v
- a complex vector
DimensionException
- If the matrix and vector are incompatible.public ComplexMatrix multiply(ComplexMatrix m)
multiply
in class ComplexMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
multiply
in class ComplexSquareMatrix
m
- a complex square matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexTridiagonalMatrix m)
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexMatrix hermitianAdjoint()
hermitianAdjoint
in class ComplexSquareMatrix
public ComplexMatrix conjugate()
conjugate
in class ComplexSquareMatrix
public Matrix transpose()
transpose
in class ComplexSquareMatrix
public ComplexSquareMatrix[] luDecompose(int[] pivot)
luDecompose
in class ComplexSquareMatrix
public ComplexMatrix mapElements(ComplexMapping f)
mapElements
in class ComplexSquareMatrix
f
- a user-defined function
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |