Class VisualNumerics.math.ComplexMatrix
All Packages Class Hierarchy This Package Previous Next Index
Class VisualNumerics.math.ComplexMatrix
java.lang.Object
|
+----VisualNumerics.math.ComplexMatrix
- public class ComplexMatrix
- extends Object
Double precision matrix manipulation functions.
This class cannot be instantiated because all of its methods are static.
-
add(Complex[][], Complex[][])
-
Add two rectangular arrays, a + b.
-
adjoint(Complex[][])
- Return the adjoint of the matrix.
-
determinant(Complex[][])
-
Return the determinant of the matrix from its LU factorization.
-
frobeniusNorm(Complex[][])
-
Return the frobenius norm of a matrix.
-
infinityNorm(Complex[][])
-
Return the infinity norm of a matrix.
-
inverse(Complex[][])
-
Return the inverse of the matrix a using its LU factorization.
-
multiply(Complex[], Complex[][])
-
Return the product of the row vector x and the rectangular array a.
-
multiply(Complex[][], Complex[])
-
Multiply the rectangular array a and the column vector x.
-
multiply(Complex[][], Complex[][])
-
Multiply two rectangular arrays, a * b.
-
oneNorm(Complex[][])
-
Return the matrix one norm.
-
QRsolve(Complex[][], Complex[])
-
Solve ax=b for x, using the QR decomposition of a.
-
solve(Complex[][], Complex[])
-
Solve ax=b for x using the LU factorization of a.
-
subtract(Complex[][], Complex[][])
-
Take the difference between two arrays, a - b.
-
trace(Complex[][])
-
Return the sum of the diagonal elements.
-
transpose(Complex[][])
- Return the transpose of a matrix.
ComplexMatrix
public ComplexMatrix()
transpose
public static Complex[][] transpose(Complex a[][]) throws IllegalArgumentException
- Return the transpose of a matrix.
- Parameters:
- a - A Complex matrix.
- Returns:
- The matrix transpose of the argument.
- Throws: IllegalArgumentException
- This exception is thrown when the lengths of
the rows of the input matrix are not uniform.
adjoint
public static Complex[][] adjoint(Complex a[][]) throws IllegalArgumentException
- Return the adjoint of the matrix.
- Parameters:
- a - A Complex matrix.
- Returns:
- The adjoint (complex conjugate transpose) of the argument.
- Throws: IllegalArgumentException
- This exception is thrown when the lengths of
the rows of the input matrix are not uniform.
multiply
public static Complex[] multiply(Complex x[],
Complex a[][]) throws IllegalArgumentException
- Return the product of the row vector x and the rectangular array a.
- Parameters:
- x - A row vector with Complex elements.
- a - A Complex matrix.
- Returns:
- The product of the arguments.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of the input matrix are not uniform, and (2) the number of elements
in the input vector is not equal to the number of rows of the matrix.
multiply
public static Complex[] multiply(Complex a[][],
Complex x[]) throws IllegalArgumentException
- Multiply the rectangular array a and the column vector x.
- Parameters:
- a - A Complex matrix.
- x - A column vector with Complex elements.
- Returns:
- The product of the arguments.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of the input matrix are not uniform, and (2) the number of columns in the input
matrix is not equal to the number of elements in the input vector.
multiply
public static Complex[][] multiply(Complex a[][],
Complex b[][]) throws IllegalArgumentException
- Multiply two rectangular arrays, a * b.
- Parameters:
- a - An (m x n) rectangular array with Complex elements.
- b - An (n x p) rectangular array with Complex elements.
- Returns:
- The matrix product of the two arguments with dimensions (m x p).
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of either of the input matrices are not uniform, and (2) the number of columns in
a is not equal to the number of rows in b.
add
public static Complex[][] add(Complex a[][],
Complex b[][]) throws IllegalArgumentException
- Add two rectangular arrays, a + b.
- Parameters:
- a - A rectangular array with Complex elements.
- b - A rectangular array with Complex elements.
- Returns:
- The sum of the two arrays.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of either of the input matrices are not uniform, and (2) corresponding
dimensions of the two matrices are not equal to each other.
subtract
public static Complex[][] subtract(Complex a[][],
Complex b[][]) throws IllegalArgumentException
- Take the difference between two arrays, a - b.
- Parameters:
- a - A rectangular array with Complex elements.
- b - A rectangular array with Complex elements.
- Returns:
- The difference between the two arrays.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of either of the input matrices are not uniform, and (2) corresponding
dimensions of the two matrices are not equal to each other.
solve
public static Complex[] solve(Complex a[][],
Complex b[]) throws IllegalArgumentException, MathException
- Solve ax=b for x using the LU factorization of a.
- Parameters:
- a - A square matrix with Complex elements.
- b - A column vector with Complex elements.
- Returns:
- A column vector containing the solution to the linear system
of equations.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of the input matrix are not uniform, and (2) the number of rows
in the input matrix is not equal to the number of elements in x.
- Throws: MathException
- This exception is thrown when the matrix is singular.
inverse
public static Complex[][] inverse(Complex a[][]) throws IllegalArgumentException, MathException
- Return the inverse of the matrix a using its LU factorization.
- Parameters:
- a - A square matrix with Complex elements.
- Returns:
- The matrix inverse of a.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of the input matrix are not uniform, and (2) the input matrix is
not square.
- Throws: MathException
- This exception is thrown when the matrix is singular.
determinant
public static Complex determinant(Complex a[][]) throws IllegalArgumentException, MathException
- Return the determinant of the matrix from its LU factorization.
- Parameters:
- a - A square matrix with Complex elements.
- Returns:
- A Complex value equal to the determinant of the matrix.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of the input matrix are not uniform, and (2) the input matrix is
not square.
- Throws: MathException
- This exception is thrown when the matrix is singular.
QRsolve
public static Complex[] QRsolve(Complex a[][],
Complex b[]) throws IllegalArgumentException, MathException
- Solve ax=b for x, using the QR decomposition of a.
When a is not square, it returns the least squares solution.
- Parameters:
- a - A rectangular array with Complex elements.
- b - A column vector with Complex elements.
- Returns:
- A column vector with Complex elements containing the
least squares solution to the linear system.
- Throws: IllegalArgumentException
- This exception is thrown when (1) the lengths of the
rows of the input matrix are not uniform, and (2) the number of rows in the
input matrix is not equal to the number of elements in the input vector.
- Throws: MathException
- This exception is thrown when the upper triangular matrix R from
the QR factorization has a zero diagonal element.
trace
public static Complex trace(Complex array[][]) throws MathException
- Return the sum of the diagonal elements.
- Parameters:
- a - A square matrix with Complex elements.
- Returns:
- A Complex value equal to the sum of the diagonal elements.
- Throws: MathException
- This exception is thrown when the matrix is not square.
oneNorm
public static double oneNorm(Complex array[][])
- Return the matrix one norm.
- Parameters:
- array - A rectangular array with Complex elements.
- Returns:
- A double value equal to the maximum of the column sums
of the absolute values of the array elements.
frobeniusNorm
public static double frobeniusNorm(Complex array[][])
- Return the frobenius norm of a matrix.
- Parameters:
- array - A rectangular matrix with Complex elements.
- Returns:
- A double value equal to the frobenius norm of the matrix.
infinityNorm
public static double infinityNorm(Complex array[][])
- Return the infinity norm of a matrix.
- Parameters:
- array - A rectangular matrix with Complex elements.
- Returns:
- A double value equal to the maximum of the row sums
of the absolute values of the array elements.
All Packages Class Hierarchy This Package Previous Next Index