/* AUTO-GENERATED */
package jsci.maths.matrices;
import jsci.maths.Complex;
import jsci.maths.ComplexMapping;
import jsci.maths.DimensionException;
import jsci.maths.algebras.*;
import jsci.maths.fields.*;
import jsci.maths.groups.AbelianGroup;
import jsci.maths.vectors.AbstractComplexVector;
import jsci.maths.vectors.ComplexVector;
/**
* The ComplexMatrix class provides an object for encapsulating matrices containing complex numbers.
* @version 2.2
* @author Mark Hale
*/
public class ComplexMatrix extends AbstractComplexMatrix {
/**
* Arrays containing the elements of the matrix.
*/
protected double matrixRe[][],matrixIm[][];
/**
* Constructs an empty matrix.
* @param rows the number of rows
* @param cols the number of columns
*/
public ComplexMatrix(final int rows,final int cols) {
super(rows,cols);
matrixRe=new double[rows][cols];
matrixIm=new double[rows][cols];
}
/**
* Constructs a matrix by wrapping two arrays.
* @param arrayRe an array of real values
* @param arrayIm an array of imaginary values
*/
public ComplexMatrix(final double arrayRe[][],final double arrayIm[][]) {
this(arrayRe.length,arrayRe[0].length);
matrixRe=arrayRe;
matrixIm=arrayIm;
}
/**
* Constructs a matrix from an array.
* @param array an assigned value
*/
public ComplexMatrix(final Complex array[][]) {
this(array.length,array[0].length);
for(int j,i=0;i=0 && i=0 && j=0 && i=0 && j=0 && i=0 && j=0 && i=0 && j=0 && i=0 && j
-norm.
* @author Taber Smith
*/
public double infNorm() {
double result=0.0,tmpResult;
for(int i=0;iresult)
result=tmpResult;
}
return result;
}
/**
* Returns the Frobenius or Hilbert-Schmidt (l2) norm.
* @jsci.planetmath FrobeniusMatrixNorm
* @author Taber Smith
*/
public double frobeniusNorm() {
double result=0.0;
for(int j,i=0;i
Ads help maintain this website.