All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.ComplexTridiagonalMatrix

java.lang.Object
   |
   +----JSci.maths.Matrix
           |
           +----JSci.maths.ComplexMatrix
                   |
                   +----JSci.maths.ComplexSquareMatrix
                           |
                           +----JSci.maths.ComplexTridiagonalMatrix

public class ComplexTridiagonalMatrix
extends ComplexSquareMatrix
The ComplexTridiagonalMatrix class provides an object for encapsulating tridiagonal matrices containing complex numbers. Uses compressed diagonal storage.


Variable Index

 o storageFormat
 o TRIDIAGONAL
Storage format identifier.

Constructor Index

 o ComplexTridiagonalMatrix()
Constructs a matrix.
 o ComplexTridiagonalMatrix(Complex[][])
Constructs a matrix from an array.
 o ComplexTridiagonalMatrix(int)
Constructs an empty matrix.

Method Index

 o add(ComplexMatrix)
Returns the addition of this matrix and another.
 o add(ComplexSquareMatrix)
Returns the addition of this matrix and another.
 o add(ComplexTridiagonalMatrix)
Returns the addition of this matrix and another.
 o columns()
Returns the number of columns.
 o conjugate()
Returns the complex conjugate of this matrix.
 o equals(Object)
Compares two complex tridiagonal matrices for equality.
 o frobeniusNorm()
Returns the Frobenius norm.
 o getElement(int, int)
Returns an element of the matrix.
 o hermitianAdjoint()
Returns the hermitian adjoint of this matrix.
 o imag()
Returns the imaginary part of this complex matrix.
 o infNorm()
Returns the l(infinity)-norm.
 o luDecompose()
Returns the LU decomposition of this matrix.
 o mapElements(Mapping)
Applies a function on all the matrix elements.
 o multiply(ComplexMatrix)
Returns the multiplication of this matrix and another.
 o multiply(ComplexSquareMatrix)
Returns the multiplication of this matrix and another.
 o multiply(ComplexTridiagonalMatrix)
Returns the multiplication of this matrix and another.
 o multiply(ComplexVector)
Returns the multiplication of a vector by this matrix.
 o real()
Returns the real part of this complex matrix.
 o rows()
Returns the number of rows.
 o scalarMultiply(Complex)
Returns the multiplication of this matrix by a scalar.
 o scalarMultiply(double)
Returns the multiplication of this matrix by a scalar.
 o setElement(int, int, Complex)
Sets the value of an element of the matrix.
 o subtract(ComplexMatrix)
Returns the subtraction of this matrix and another.
 o subtract(ComplexSquareMatrix)
Returns the subtraction of this matrix by another.
 o subtract(ComplexTridiagonalMatrix)
Returns the subtraction of this matrix and another.
 o toString()
Returns a string representing this matrix.
 o trace()
Returns the trace.
 o transpose()
Returns the transpose of this matrix.

Variables

 o TRIDIAGONAL
 protected static final int TRIDIAGONAL
Storage format identifier.

 o storageFormat
 protected static final int storageFormat

Constructors

 o ComplexTridiagonalMatrix
 protected ComplexTridiagonalMatrix()
Constructs a matrix.

 o ComplexTridiagonalMatrix
 public ComplexTridiagonalMatrix(int size)
Constructs an empty matrix.

Parameters:
size - the number of rows/columns
 o ComplexTridiagonalMatrix
 public ComplexTridiagonalMatrix(Complex array[][])
Constructs a matrix from an array. Any non-tridiagonal elements in the array are ignored.

Parameters:
array - an assigned value
Throws: MatrixDimensionException
If the array is not square.

Methods

 o equals
 public boolean equals(Object m)
Compares two complex tridiagonal matrices for equality.

Parameters:
m - a complex tridiagonal matrix
Overrides:
equals in class ComplexMatrix
 o toString
 public String toString()
Returns a string representing this matrix.

Overrides:
toString in class ComplexMatrix
 o real
 public DoubleMatrix real()
Returns the real part of this complex matrix.

Returns:
a double tridiagonal matrix
Overrides:
real in class ComplexMatrix
 o imag
 public DoubleMatrix imag()
Returns the imaginary part of this complex matrix.

Returns:
a double tridiagonal matrix
Overrides:
imag in class ComplexMatrix
 o getElement
 public Complex getElement(int i,
                           int j)
Returns an element of the matrix.

Parameters:
i - row index of the element
j - column index of the element
Throws: MatrixDimensionException
If attempting to access an invalid element.
Overrides:
getElement in class ComplexMatrix
 o setElement
 public void setElement(int i,
                        int j,
                        Complex z)
Sets the value of an element of the matrix.

Parameters:
i - row index of the element
j - column index of the element
z - a complex number
Throws: MatrixDimensionException
If attempting to access an invalid element.
Overrides:
setElement in class ComplexMatrix
 o trace
 public Complex trace()
Returns the trace.

Overrides:
trace in class ComplexSquareMatrix
 o infNorm
 public double infNorm()
Returns the l(infinity)-norm.

Overrides:
infNorm in class ComplexMatrix
 o frobeniusNorm
 public double frobeniusNorm()
Returns the Frobenius norm.

Overrides:
frobeniusNorm in class ComplexMatrix
 o rows
 public int rows()
Returns the number of rows.

Overrides:
rows in class ComplexMatrix
 o columns
 public int columns()
Returns the number of columns.

Overrides:
columns in class ComplexMatrix
 o add
 public ComplexMatrix add(ComplexMatrix m)
Returns the addition of this matrix and another.

Parameters:
m - a complex matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
add in class ComplexSquareMatrix
 o add
 public ComplexSquareMatrix add(ComplexSquareMatrix m)
Returns the addition of this matrix and another.

Parameters:
m - a complex square matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
add in class ComplexSquareMatrix
 o add
 public ComplexTridiagonalMatrix add(ComplexTridiagonalMatrix m)
Returns the addition of this matrix and another.

Parameters:
m - a complex tridiagonal matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
 o subtract
 public ComplexMatrix subtract(ComplexMatrix m)
Returns the subtraction of this matrix and another.

Parameters:
m - a complex matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
subtract in class ComplexSquareMatrix
 o subtract
 public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
Returns the subtraction of this matrix by another.

Parameters:
m - a complex square matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
subtract in class ComplexSquareMatrix
 o subtract
 public ComplexTridiagonalMatrix subtract(ComplexTridiagonalMatrix m)
Returns the subtraction of this matrix and another.

Parameters:
m - a complex tridiagonal matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
 o scalarMultiply
 public ComplexMatrix scalarMultiply(Complex z)
Returns the multiplication of this matrix by a scalar.

Parameters:
z - a complex number
Returns:
a complex tridiagonal matrix
Overrides:
scalarMultiply in class ComplexSquareMatrix
 o scalarMultiply
 public ComplexMatrix scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar.

Parameters:
x - a double
Returns:
a complex tridiagonal matrix
Overrides:
scalarMultiply in class ComplexSquareMatrix
 o multiply
 public ComplexVector multiply(ComplexVector v)
Returns the multiplication of a vector by this matrix.

Parameters:
v - a complex vector
Throws: DimensionException
If the matrix and vector are incompatible.
Overrides:
multiply in class ComplexSquareMatrix
 o multiply
 public ComplexMatrix multiply(ComplexMatrix m)
Returns the multiplication of this matrix and another.

Parameters:
m - a complex matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
multiply in class ComplexSquareMatrix
 o multiply
 public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
Returns the multiplication of this matrix and another.

Parameters:
m - a complex square matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
multiply in class ComplexSquareMatrix
 o multiply
 public ComplexSquareMatrix multiply(ComplexTridiagonalMatrix m)
Returns the multiplication of this matrix and another.

Parameters:
m - a complex tridiagonal matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
 o hermitianAdjoint
 public ComplexMatrix hermitianAdjoint()
Returns the hermitian adjoint of this matrix.

Returns:
a complex tridiagonal matrix
Overrides:
hermitianAdjoint in class ComplexSquareMatrix
 o conjugate
 public ComplexMatrix conjugate()
Returns the complex conjugate of this matrix.

Returns:
a complex tridiagonal matrix
Overrides:
conjugate in class ComplexSquareMatrix
 o transpose
 public Matrix transpose()
Returns the transpose of this matrix.

Returns:
a complex tridiagonal matrix
Overrides:
transpose in class ComplexSquareMatrix
 o luDecompose
 public ComplexSquareMatrix[] luDecompose()
Returns the LU decomposition of this matrix.

Returns:
an array with [0] containing the L-matrix and [1] containing the U-matrix.
Overrides:
luDecompose in class ComplexSquareMatrix
 o mapElements
 public ComplexMatrix mapElements(Mapping f)
Applies a function on all the matrix elements.

Parameters:
f - a user-defined function
Returns:
a complex tridiagonal matrix
Overrides:
mapElements in class ComplexSquareMatrix

All Packages  Class Hierarchy  This Package  Previous  Next  Index