package Jampack;

/** 
   Zmat implements general complex matrix stored in a rectangular
   array class Z.

   @version Pre-alpha
   @author G. W. Stewart
*/

public class Zmat{

/** The number of rows */
    protected int nrow;

/** The number of columns */
    protected int ncol;

/** The base index */
    protected int  basex;

/** The real part of the matrix */
    protected double re[][];

/** The imaginary part of the matrix */
    protected double im[][];

/** True if the matrix has been altered */
    protected boolean dirty;

/** Points to an LU decompoistion of the matrix
    provided one exists */
    protected Zludpp LU;

/** Points to a Householder QR decompoistion of the matrix
    provided one exists */
    protected Zhqrd HQR;

/** Points to a Cholesky decompoistion of the matrix
    provided one exists */
    protected Zchol CHOL;

/** The base index */
    public int bx;

/** The upper row index */
    public int rx;

/** The number of rows */
    public int nr;

/** The upper column index */
    public int cx;

/** The number of columns */
    public int nc;
/**
   Creates a Zmat and initializes its real and imaginary
   parts to a pair of arrays.

   @param     re Contains the real part.
   @param     im Contains the imaginary part.
   @exception JampackException if the dimensions of re and im
              do not match
*/

   public Zmat(double re[][], double im[][])
   throws JampackException{
      Parameters.BaseIndexNotChangeable = true;
      basex = Parameters.BaseIndex;
      nrow = re.length;
      ncol = re[0].length;
      if (nrow != im.length || ncol != im[0].length)
         throw new JampackException
            ("Inconsistent array dimensions");
      getProperties();
      this.re = new double[nr][nc];
      this.im = new double[nr][nc];
      for (int i=0; i 

Ads help maintain this website.