|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.maths.matrices.Matrix JSci.maths.matrices.AbstractComplexMatrix JSci.maths.matrices.AbstractComplexSquareMatrix JSci.maths.matrices.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 double[] |
udiagIm
|
protected double[] |
udiagRe
|
Fields inherited from class JSci.maths.matrices.AbstractComplexSquareMatrix |
---|
luCache |
Fields inherited from class JSci.maths.matrices.Matrix |
---|
numCols, numRows |
Constructor Summary | |
---|---|
ComplexTridiagonalMatrix(Complex[][] array)
Constructs a matrix from an array. |
|
ComplexTridiagonalMatrix(int size)
Constructs an empty matrix. |
Method Summary | |
---|---|
AbstractComplexSquareMatrix |
add(AbstractComplexSquareMatrix m)
Returns the addition of this matrix and another. |
ComplexSquareMatrix |
add(ComplexSquareMatrix m)
|
ComplexTridiagonalMatrix |
add(ComplexTridiagonalMatrix m)
|
AbstractComplexMatrix |
conjugate()
Returns the complex conjugate of this matrix. |
boolean |
equals(AbstractComplexMatrix m,
double tol)
Compares two complex matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius (l2) norm. |
Complex |
getElement(int i,
int j)
Returns an element of the matrix. |
double |
getImagElement(int i,
int j)
Returns the imag part of an element of the matrix. |
double |
getRealElement(int i,
int j)
Returns the real part of an element of the matrix. |
AbstractComplexMatrix |
hermitianAdjoint()
Returns the hermitian adjoint of this matrix. |
AbstractDoubleMatrix |
imag()
Returns the imaginary part of this complex matrix. |
double |
infNorm()
Returns the l-norm. |
AbstractComplexMatrix |
mapElements(ComplexMapping f)
Applies a function on all the matrix elements. |
AbstractComplexSquareMatrix |
multiply(AbstractComplexSquareMatrix m)
Returns the multiplication of this matrix and another. |
AbstractComplexVector |
multiply(AbstractComplexVector v)
Returns the multiplication of a vector by this matrix. |
ComplexSquareMatrix |
multiply(ComplexSquareMatrix m)
|
ComplexSquareMatrix |
multiply(ComplexTridiagonalMatrix m)
Returns the multiplication of this matrix and another. |
double |
operatorNorm()
Returns the operator norm. |
AbstractDoubleMatrix |
real()
Returns the real part of this complex matrix. |
AbstractComplexMatrix |
scalarMultiply(Complex z)
Returns the multiplication of this matrix by a scalar. |
AbstractComplexMatrix |
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. |
AbstractComplexSquareMatrix |
subtract(AbstractComplexSquareMatrix m)
Returns the subtraction of this matrix and another. |
ComplexSquareMatrix |
subtract(ComplexSquareMatrix m)
|
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.matrices.AbstractComplexSquareMatrix |
---|
add, det, directSum, inverse, involution, isHermitian, isUnitary, luDecompose_cache, luDecompose, luDecompose, negate, norm, polarDecompose, scalarDivide, scalarDivide, scalarProduct, scalarProduct, subtract, tensor |
Methods inherited from class JSci.maths.matrices.AbstractComplexMatrix |
---|
add, directSum, equals, equals, getSet, 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 |
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 final double[] ldiagRe
protected final double[] ldiagIm
protected final double[] diagRe
protected final double[] diagIm
protected final double[] udiagRe
protected final double[] udiagIm
Constructor Detail |
---|
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(AbstractComplexMatrix m, double tol)
equals
in class AbstractComplexMatrix
m
- a complex matrixpublic java.lang.String toString()
toString
in class AbstractComplexMatrix
public AbstractDoubleMatrix real()
real
in class AbstractComplexSquareMatrix
public AbstractDoubleMatrix imag()
imag
in class AbstractComplexSquareMatrix
public Complex getElement(int i, int j)
getElement
in class AbstractComplexMatrix
i
- row index of the elementj
- column index of the element
MatrixDimensionException
- If attempting to access an invalid element.public double getRealElement(int i, int j)
AbstractComplexMatrix
getRealElement
in class AbstractComplexMatrix
i
- row index of the elementj
- column index of the elementpublic double getImagElement(int i, int j)
AbstractComplexMatrix
getImagElement
in class AbstractComplexMatrix
i
- row index of the elementj
- column index of the elementpublic void setElement(int i, int j, Complex z)
setElement
in class AbstractComplexMatrix
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 AbstractComplexMatrix
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 AbstractComplexSquareMatrix
public double infNorm()
infNorm
in class AbstractComplexMatrix
public double frobeniusNorm()
frobeniusNorm
in class AbstractComplexMatrix
public double operatorNorm() throws MaximumIterationsExceededException
operatorNorm
in class AbstractComplexSquareMatrix
MaximumIterationsExceededException
- If it takes more than 50 iterations to determine an eigenvalue.public AbstractComplexSquareMatrix add(AbstractComplexSquareMatrix m)
add
in class AbstractComplexSquareMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix add(ComplexSquareMatrix m)
public ComplexTridiagonalMatrix add(ComplexTridiagonalMatrix m)
public AbstractComplexSquareMatrix subtract(AbstractComplexSquareMatrix m)
subtract
in class AbstractComplexSquareMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
public ComplexTridiagonalMatrix subtract(ComplexTridiagonalMatrix m)
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public AbstractComplexMatrix scalarMultiply(Complex z)
scalarMultiply
in class AbstractComplexSquareMatrix
z
- a complex number
public AbstractComplexMatrix scalarMultiply(double x)
scalarMultiply
in class AbstractComplexSquareMatrix
x
- a double
public AbstractComplexVector multiply(AbstractComplexVector v)
multiply
in class AbstractComplexMatrix
v
- a complex vector
DimensionException
- If the matrix and vector are incompatible.public AbstractComplexSquareMatrix multiply(AbstractComplexSquareMatrix m)
multiply
in class AbstractComplexSquareMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
public ComplexSquareMatrix multiply(ComplexTridiagonalMatrix m)
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public AbstractComplexMatrix hermitianAdjoint()
hermitianAdjoint
in class AbstractComplexSquareMatrix
public AbstractComplexMatrix conjugate()
conjugate
in class AbstractComplexSquareMatrix
public Matrix transpose()
transpose
in class AbstractComplexSquareMatrix
public AbstractComplexMatrix mapElements(ComplexMapping f)
mapElements
in class AbstractComplexSquareMatrix
f
- a user-defined function
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |