Constructs an empty matrix.
Parameters: size - the number of rows/columns
DoubleTridiagonalMatrix
public DoubleTridiagonalMatrix(double 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 double matrix exception: MatrixDimensionException - If the matrices are different sizes.
Returns the addition of this matrix and another.
Parameters: m - a double tridiagonal matrix exception: MatrixDimensionException - If the matrices are different sizes.
Returns the Cholesky decomposition of this matrix.
Matrix must be symmetric and positive definite.
an array with [0] containing the L-matrix and [1] containing the U-matrix.
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 double vector. exception: DimensionException - If the matrix and vector are incompatible.
Returns the multiplication of this matrix and another.
Parameters: m - a double matrix a AbstractDoubleMatrix or a AbstractDoubleSquareMatrix as appropriate exception: MatrixDimensionException - If the matrices are incompatible.
Returns the QR decomposition of this matrix.
Based on the code from JAMA (public domain).
an array with [0] containing the Q-matrix and [1] containing the R-matrix.
Returns the scalar product of this matrix and another.
Parameters: m - a double matrix. exception: MatrixDimensionException - If the matrices are different sizes.
public void setElement(int i, int j, double x)(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 - a number exception: MatrixDimensionException - If attempting to access an invalid element.
Returns the singular value decomposition of this matrix.
Based on the code from JAMA (public domain).
an array with [0] containing the U-matrix, [1] containing the S-matrix and [2] containing the V-matrix.
Returns the subtraction of this matrix by another.
Parameters: m - a double matrix exception: MatrixDimensionException - If the matrices are different sizes.
Returns the subtraction of this matrix and another.
Parameters: m - a double tridiagonal matrix exception: MatrixDimensionException - If the matrices are different sizes.