    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.

##

storageFormat
TRIDIAGONAL
  Storage format identifier.

##

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

##

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

##

TRIDIAGONAL

     protected static final int TRIDIAGONAL

  Storage format identifier.

storageFormat

     protected static final int storageFormat

##

ComplexTridiagonalMatrix

     protected ComplexTridiagonalMatrix()

  Constructs a matrix.

ComplexTridiagonalMatrix

     public ComplexTridiagonalMatrix(int size)

  Constructs an empty matrix.

  Parameters:
    size - the number of rows/columns

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.

##

equals

     public boolean equals(Object m)

  Compares two complex tridiagonal matrices for equality.

  Parameters:
    m - a complex tridiagonal matrix
  Overrides:
    equals in class ComplexMatrix

toString

     public String toString()

  Returns a string representing this matrix.

  Overrides:
    toString in class ComplexMatrix

real

     public DoubleMatrix real()

  Returns the real part of this complex matrix.

  Returns:
    a double tridiagonal matrix
  Overrides:
    real in class ComplexMatrix

imag

     public DoubleMatrix imag()

  Returns the imaginary part of this complex matrix.

  Returns:
    a double tridiagonal matrix
  Overrides:
    imag in class ComplexMatrix

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

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

trace

     public Complex trace()

  Returns the trace.

  Overrides:
    trace in class ComplexSquareMatrix

infNorm

     public double infNorm()

  Returns the l(infinity)-norm.

  Overrides:
    infNorm in class ComplexMatrix

frobeniusNorm

     public double frobeniusNorm()

  Returns the Frobenius norm.

  Overrides:
    frobeniusNorm in class ComplexMatrix

rows

     public int rows()

  Returns the number of rows.

  Overrides:
    rows in class ComplexMatrix

columns

     public int columns()

  Returns the number of columns.

  Overrides:
    columns in class ComplexMatrix

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

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

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.

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

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

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.

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

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

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

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

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

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.

hermitianAdjoint

     public ComplexMatrix hermitianAdjoint()

  Returns the hermitian adjoint of this matrix.

  Returns:
    a complex tridiagonal matrix
  Overrides:
    hermitianAdjoint in class ComplexSquareMatrix

conjugate

     public ComplexMatrix conjugate()

  Returns the complex conjugate of this matrix.

  Returns:
    a complex tridiagonal matrix
  Overrides:
    conjugate in class ComplexSquareMatrix

transpose

     public Matrix transpose()

  Returns the transpose of this matrix.

  Returns:
    a complex tridiagonal matrix
  Overrides:
    transpose in class ComplexSquareMatrix

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

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