JMSLTM Numerical Library 4.0

com.imsl.math
Class ComplexMatrix

java.lang.Object
  extended bycom.imsl.math.ComplexMatrix

public class ComplexMatrix
extends Object

Complex matrix manipulation functions.

See Also:
Example

Method Summary
static Complex[][] add(Complex[][] a, Complex[][] b)
          Add two rectangular Complex arrays, a + b.
static void checkMatrix(Complex[][] a)
          Check that all of the rows in the Complex matrix have the same length.
static void checkSquareMatrix(Complex[][] a)
          Check that the Complex matrix is square.
static double frobeniusNorm(Complex[][] a)
          Return the Frobenius norm of a Complex matrix.
static double infinityNorm(Complex[][] a)
          Return the infinity norm of a Complex matrix.
static Complex[] multiply(Complex[][] a, Complex[] x)
          Multiply the rectangular array a and the column vector x, both Complex.
static Complex[][] multiply(Complex[][] a, Complex[][] b)
          Multiply two Complex rectangular arrays, a * b.
static Complex[] multiply(Complex[] x, Complex[][] a)
          Return the product of the row vector x and the rectangular array a, both Complex.
static double oneNorm(Complex[][] a)
          Return the Complex matrix one norm.
static Complex[][] subtract(Complex[][] a, Complex[][] b)
          Subtract two Complex rectangular arrays, a - b.
static Complex[][] transpose(Complex[][] a)
          Return the transpose of a Complex matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public static Complex[][] add(Complex[][] a,
                              Complex[][] b)
Add two rectangular Complex arrays, a + b.

Parameters:
a - a Complex rectangular array
b - a Complex rectangular array
Returns:
the Complex matrix sum of the two arguments
Throws:
IllegalArgumentException - This exception is thrown when (1) the lengths of the rows of either of the input matrices are not uniform, or (2) the matrices are not the same size.

checkMatrix

public static void checkMatrix(Complex[][] a)
Check that all of the rows in the Complex matrix have the same length.

Parameters:
a - a Complex matrix
Throws:
IllegalArgumentException - This exception is thrown when the lengths of the rows of the input matrix are not uniform.

checkSquareMatrix

public static void checkSquareMatrix(Complex[][] a)
Check that the Complex matrix is square.

Parameters:
a - a Complex matrix
Throws:
IllegalArgumentException - This exception is thrown when the matrix is not square..

frobeniusNorm

public static double frobeniusNorm(Complex[][] a)
Return the Frobenius norm of a Complex matrix.

Parameters:
a - a Complex rectangular matrix
Returns:
a double value equal to the Frobenius norm of the matrix
Throws:
IllegalArgumentException - This exception is thrown when the lengths of the rows of the input matrix is not uniform.

infinityNorm

public static double infinityNorm(Complex[][] a)
Return the infinity norm of a Complex matrix.

Parameters:
a - a Complex rectangular matrix
Returns:
a double value equal to the maximum of the row sums of the absolute values of the array elements.
Throws:
IllegalArgumentException - This exception is thrown when the lengths of the rows of the input matrix is not uniform.

multiply

public static Complex[] multiply(Complex[][] a,
                                 Complex[] x)
Multiply the rectangular array a and the column vector x, both Complex.

Parameters:
a - a Complex rectangular matrix
x - a Complex vector
Returns:
a Complex vector containing the product of the arguments, A*x
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)
Multiply two Complex rectangular arrays, a * b.

Parameters:
a - a Complex rectangular array
b - a Complex rectangular array
Returns:
the Complex matrix product of a times b
Throws:
IllegalArgumentException - This exception is thrown when (1) the lengths of the rows of either of the input matrices are not uniform, or (2) the number of columns in a is not equal to the number of rows in b.

multiply

public static Complex[] multiply(Complex[] x,
                                 Complex[][] a)
Return the product of the row vector x and the rectangular array a, both Complex.

Parameters:
x - a Complex row vector
a - a Complex rectangular matrix
Returns:
a Complex vector containing the product of the arguments, x*A.
Throws:
IllegalArgumentException - This exception is thrown when (1) the lengths of the rows of the input matrix are not uniform, or (2) the number of elements in the input vector is not equal to the number of rows of the matrix.

oneNorm

public static double oneNorm(Complex[][] a)
Return the Complex matrix one norm.

Parameters:
a - a Complex rectangular array
Returns:
a double value equal to the maximum of the column sums of the absolute values of the array elements
Throws:
IllegalArgumentException - This exception is thrown when the lengths of the rows of the input matrix is not uniform.

subtract

public static Complex[][] subtract(Complex[][] a,
                                   Complex[][] b)
Subtract two Complex rectangular arrays, a - b.

Parameters:
a - a Complex rectangular array
b - a Complex rectangular array
Returns:
the Complex matrix difference of the two arguments.
Throws:
IllegalArgumentException - This exception is thrown when (1) the lengths of the rows of either of the input matrices are not uniform, or (2) the matrices are not the same size.

transpose

public static Complex[][] transpose(Complex[][] a)
Return the transpose of a Complex matrix.

Parameters:
a - a Complex matrix
Returns:
the Complex matrix transpose of the argument
Throws:
IllegalArgumentException - This exception is thrown when the lengths of the rows of the input matrix are not uniform.

JMSLTM Numerical Library 4.0

Copyright 1970-2006 Visual Numerics, Inc.
Built June 1 2006.