The ComplexTridiagonalMatrix class provides an object for encapsulating tridiagonal matrices containing complex numbers.
Uses compressed diagonal storage.
version: 2.2 author: Mark Hale
Constructs an empty matrix.
Parameters: size - the number of rows/columns
ComplexTridiagonalMatrix
public ComplexTridiagonalMatrix(Complex array)(Code)
Constructs a matrix from an array.
Any non-tridiagonal elements in the array are ignored.
Parameters: array - an assigned value exception: MatrixDimensionException - If the array is not square.
Returns the addition of this matrix and another.
Parameters: m - a complex matrix exception: MatrixDimensionException - If the matrices are different sizes.
Returns an element of the matrix.
Parameters: i - row index of the element Parameters: j - column index of the element exception: MatrixDimensionException - If attempting to access an invalid element.
Returns the multiplication of a vector by this matrix.
Parameters: v - a complex vector exception: DimensionException - If the matrix and vector are incompatible.
Returns the multiplication of this matrix and another.
Parameters: m - a complex matrix exception: MatrixDimensionException - If the matrices are different sizes.
Returns the multiplication of this matrix and another.
Parameters: m - a complex tridiagonal matrix exception: MatrixDimensionException - If the matrices are different sizes.
Returns the multiplication of this matrix by a scalar.
Parameters: x - a double a complex tridiagonal matrix
setElement
public void setElement(int i, int j, Complex z)(Code)
Sets the value of an element of the matrix.
Should only be used to initialise this matrix.
Parameters: i - row index of the element Parameters: j - column index of the element Parameters: z - a complex number exception: MatrixDimensionException - If attempting to access an invalid element.
setElement
public void setElement(int i, int j, double x, double y)(Code)
Sets the value of an element of the matrix.
Should only be used to initialise this matrix.
Parameters: i - row index of the element Parameters: j - column index of the element Parameters: x - the real part of a complex number Parameters: y - the imaginary part of a complex number exception: MatrixDimensionException - If attempting to access an invalid element.
Returns the subtraction of this matrix and another.
Parameters: m - a complex matrix exception: MatrixDimensionException - If the matrices are different sizes.
Returns the subtraction of this matrix and another.
Parameters: m - a complex tridiagonal matrix exception: MatrixDimensionException - If the matrices are different sizes.