|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.algebraic.AbstractHypermatrix
org.jscience.mathematics.algebraic.AbstractMatrix
org.jscience.mathematics.algebraic.matrices.AbstractComplexMatrix
org.jscience.mathematics.algebraic.matrices.AbstractComplexSquareMatrix
org.jscience.mathematics.algebraic.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
DOCUMENT ME! |
protected double[] |
diagRe
DOCUMENT ME! |
protected double[] |
ldiagIm
Tridiagonal data. |
protected double[] |
ldiagRe
Tridiagonal data. |
protected double[] |
udiagIm
DOCUMENT ME! |
protected double[] |
udiagRe
DOCUMENT ME! |
| Fields inherited from class org.jscience.mathematics.algebraic.matrices.AbstractComplexSquareMatrix |
|---|
LU, LUpivot |
| Constructor Summary | |
|---|---|
ComplexTridiagonalMatrix(Complex[][] array)
Constructs a matrix from an array. |
|
ComplexTridiagonalMatrix(ComplexTridiagonalMatrix mat)
Copy constructor. |
|
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)
DOCUMENT ME! |
ComplexTridiagonalMatrix |
add(ComplexTridiagonalMatrix m)
DOCUMENT ME! |
java.lang.Object |
clone()
Clone matrix into a new matrix. |
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. |
double |
getImagElement(int i,
int j)
DOCUMENT ME! |
int |
getK1()
DOCUMENT ME! |
int |
getK2()
DOCUMENT ME! |
Complex |
getPrimitiveElement(int i,
int j)
Returns an element of the matrix. |
double |
getRealElement(int i,
int j)
DOCUMENT ME! |
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. |
boolean |
isSymmetric()
Returns true if this matrix is symmetric. |
AbstractComplexSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
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)
DOCUMENT ME! |
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 |
setAllElements(Complex r)
Sets the value of all elements of the matrix. |
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)
DOCUMENT ME! |
ComplexTridiagonalMatrix |
subtract(ComplexTridiagonalMatrix m)
Returns the subtraction of this matrix and another. |
Complex[][] |
toPrimitiveArray()
Projects the matrix to an array. |
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 org.jscience.mathematics.algebraic.matrices.AbstractComplexSquareMatrix |
|---|
add, det, directSum, inverse, involution, isHermitian, isUnitary, negate, norm, polarDecompose, scalarDivide, scalarDivide, scalarProduct, scalarProduct, subtract, tensorProduct |
| Methods inherited from class org.jscience.mathematics.algebraic.matrices.AbstractComplexMatrix |
|---|
abs, add, directSum, equals, equals, getColumn, getElement, getMatrixAsColumns, getMatrixAsRows, getRow, getSet, getSubMatrix, hashCode, horizontalAxisSymmetry, mass, multiply, multiply, read, reverse, scalarDivide, scalarMultiply, setColumn, setRow, setSubMatrix, subtract, tensorProduct, verticalAxisSymmetry |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix |
|---|
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.Matrix |
|---|
getColumn, getElement, getRow, numColumns, numRows, toArray |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, getElement, numDimensions, numElements, numElements, toArray, toArray |
| Methods inherited from interface org.jscience.mathematics.algebraic.fields.Ring.Member |
|---|
multiply |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.VectorSpace.Member |
|---|
scalarDivide |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.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
IllegalDimensionException - If the array is not square.public ComplexTridiagonalMatrix(ComplexTridiagonalMatrix mat)
mat - an assigned value| Method Detail |
|---|
public boolean equals(AbstractComplexMatrix m,
double tol)
equals in class AbstractComplexMatrixm - a complex matrixtol - DOCUMENT ME!
public java.lang.String toString()
toString in class AbstractComplexMatrixpublic int getK1()
getK1 in interface BandedMatrixpublic int getK2()
getK2 in interface BandedMatrixpublic AbstractDoubleMatrix real()
real in class AbstractComplexSquareMatrixpublic AbstractDoubleMatrix imag()
imag in class AbstractComplexSquareMatrix
public Complex getPrimitiveElement(int i,
int j)
getPrimitiveElement in class AbstractComplexMatrixi - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid
element.
public double getRealElement(int i,
int j)
getRealElement in class AbstractComplexMatrixi - DOCUMENT ME!j - DOCUMENT ME!
public double getImagElement(int i,
int j)
getImagElement in class AbstractComplexMatrixi - DOCUMENT ME!j - DOCUMENT ME!
public void setElement(int i,
int j,
Complex z)
setElement in class AbstractComplexMatrixi - row index of the elementj - column index of the elementz - a complex number
IllegalDimensionException - If attempting to access an invalid
element.
public void setElement(int i,
int j,
double x,
double y)
setElement in class AbstractComplexMatrixi - row index of the elementj - column index of the elementx - the real part of a complex numbery - the imaginary part of a complex number
IllegalDimensionException - If attempting to access an invalid
element.public void setAllElements(Complex r)
setAllElements in class AbstractComplexMatrixr - a Complex element
java.lang.IllegalArgumentException - DOCUMENT ME!public boolean isSymmetric()
isSymmetric in interface SquareMatrixisSymmetric in class AbstractComplexSquareMatrixpublic Complex trace()
trace in class AbstractComplexSquareMatrixjava.lang.ArithmeticException - DOCUMENT ME!public double infNorm()
-norm.
infNorm in class AbstractComplexMatrixjava.lang.ArithmeticException - DOCUMENT ME!public double frobeniusNorm()
frobeniusNorm in class AbstractComplexMatrixjava.lang.ArithmeticException - DOCUMENT ME!
public double operatorNorm()
throws MaximumIterationsExceededException
operatorNorm in class AbstractComplexSquareMatrixMaximumIterationsExceededException - If it takes more than 50
iterations to determine an eigenvalue.
java.lang.ArithmeticException - DOCUMENT ME!public AbstractComplexSquareMatrix add(AbstractComplexSquareMatrix m)
add in class AbstractComplexSquareMatrixm - a complex matrix
IllegalDimensionException - If the matrices are different sizes.public ComplexSquareMatrix add(ComplexSquareMatrix m)
m - DOCUMENT ME!
public ComplexTridiagonalMatrix add(ComplexTridiagonalMatrix m)
m - DOCUMENT ME!
public AbstractComplexSquareMatrix subtract(AbstractComplexSquareMatrix m)
subtract in class AbstractComplexSquareMatrixm - a complex matrix
IllegalDimensionException - If the matrices are different sizes.public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
m - DOCUMENT ME!
public ComplexTridiagonalMatrix subtract(ComplexTridiagonalMatrix m)
m - a complex tridiagonal matrix
IllegalDimensionException - If the matrices are different sizes.public AbstractComplexMatrix scalarMultiply(Complex z)
scalarMultiply in class AbstractComplexSquareMatrixz - a complex number
public AbstractComplexMatrix scalarMultiply(double x)
scalarMultiply in class AbstractComplexSquareMatrixx - a double
public AbstractComplexVector multiply(AbstractComplexVector v)
multiply in class AbstractComplexMatrixv - a complex vector
IllegalDimensionException - If the matrix and vector are
incompatible.public AbstractComplexSquareMatrix multiply(AbstractComplexSquareMatrix m)
multiply in class AbstractComplexSquareMatrixm - a complex matrix
IllegalDimensionException - If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
m - DOCUMENT ME!
public ComplexSquareMatrix multiply(ComplexTridiagonalMatrix m)
m - a complex tridiagonal matrix
IllegalDimensionException - If the matrices are different sizes.public AbstractComplexMatrix hermitianAdjoint()
hermitianAdjoint in class AbstractComplexSquareMatrixpublic AbstractComplexMatrix conjugate()
conjugate in class AbstractComplexSquareMatrixpublic Matrix transpose()
transpose in interface Matrixtranspose in class AbstractComplexSquareMatrixpublic AbstractComplexSquareMatrix[] luDecompose(int[] pivot)
luDecompose in class AbstractComplexSquareMatrixpivot - DOCUMENT ME!
public AbstractComplexMatrix mapElements(ComplexMapping f)
mapElements in class AbstractComplexMatrixf - a user-defined function
public java.lang.Object clone()
clone in class java.lang.Objectpublic Complex[][] toPrimitiveArray()
toPrimitiveArray in class AbstractComplexMatrix
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||