Jampack
Class Zmat
- java.lang.Object
-
- Jampack.Zmat
-
-
Field Summary
Fields Modifier and Type Field and Description intbxThe base indexintcxThe upper column indexintncThe number of columnsintnrThe number of rowsintrxThe upper row index
-
Constructor Summary
Constructors Constructor and Description Zmat(double[][] A)Creates a Zmat and initializes its real part to to an array of class double.Zmat(double[][] re, double[][] im)Creates a Zmat and initializes its real and imaginary parts to a pair of arrays.Zmat(int nrow, int ncol)Creates a Zmat and initializes it to zero.Zmat(Z[][] A)Creates a Zmat and initializes it to an array of class Z.Zmat(Z1 A)Creates a Zmat and initialize it to a Z1.Zmat(Zdiagmat D)Creates a Zmat and initialize it to a Zdiagmat.Zmat(Zmat A)Creates a Zmat and intitializes it to a Zmat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Zmatget(int[] ii, int[] jj)Returns the submatrix (ii[], jj[]).Zmatget(int[] ii, int jj1, int jj2)Returns the submatrix (ii[], jj1:jj2).Zget(int ii, int jj)Returns the (ii,jj)-element of a Zmat.Zmatget(int ii1, int ii2, int[] jj)Returns the submatrix (ii1:ii2, jj[]).Zmatget(int ii1, int ii2, int jj1, int jj2)Returns the submatrix (ii1:ii2, jj1:jj2).Zget0(int i, int j)Returns the zero-based (i,j)-element of a Zmat.ZcholgetCHOL()Returns a Cholesky decomposition if a valid one exists.ZhqrdgetHQR()Returns a Householder QR decomposition if a valid one exists.double[][]getIm()Returns a copy of the imaginary part of a Zmat.ZludppgetLU()Returns an LU decomposition if a valid one exists.voidgetProperties()Sets the public parameters.double[][]getRe()Returns a copy of the real part of a Zmat.Z[][]getZ()Returns a copy of the real and imaginary parts as a complex array.voidput(int[] ii, int[] jj, Zmat A)Overwrites the submatrix (ii[], jj[]) with a Zmat.voidput(int[] ii, int jj1, int jj2, Zmat A)Overwrites the submatrix (ii[], jj1:jj2) with a Zmat.voidput(int ii1, int ii2, int[] jj, Zmat A)Overwrites the submatrix (ii1:ii2, jj[]) with a Zmat.voidput(int ii1, int ii2, int jj1, int jj2, Zmat A)Overwrites the submatrix (ii1:ii2, jj1:jj2) with a Zmat.voidput(int ii, int jj, Z a)Writes the (ii,jj) element of a Zmat.voidput0(int i, int j, Z a)Writes the zero-based (i,j)-element of a Zmat.
-
-
-
Field Detail
-
bx
public int bx
The base index
-
rx
public int rx
The upper row index
-
nr
public int nr
The number of rows
-
cx
public int cx
The upper column index
-
nc
public int nc
The number of columns
-
-
Constructor Detail
-
Zmat
public Zmat(double[][] re, double[][] im) throws JampackExceptionCreates a Zmat and initializes its real and imaginary parts to a pair of arrays.- Parameters:
re- Contains the real part.im- Contains the imaginary part.- Throws:
JampackException- if the dimensions of re and im do not match
-
Zmat
public Zmat(Z[][] A)
Creates a Zmat and initializes it to an array of class Z.
-
Zmat
public Zmat(double[][] A)
Creates a Zmat and initializes its real part to to an array of class double. The imaginary part is set to zero.
-
Zmat
public Zmat(Zmat A)
Creates a Zmat and intitializes it to a Zmat.
-
Zmat
public Zmat(Z1 A)
Creates a Zmat and initialize it to a Z1.
-
Zmat
public Zmat(Zdiagmat D)
Creates a Zmat and initialize it to a Zdiagmat.
-
Zmat
public Zmat(int nrow, int ncol)Creates a Zmat and initializes it to zero.
-
-
Method Detail
-
getProperties
public void getProperties()
Sets the public parameters.
-
getRe
public double[][] getRe()
Returns a copy of the real part of a Zmat.
-
getIm
public double[][] getIm()
Returns a copy of the imaginary part of a Zmat.
-
getZ
public Z[][] getZ()
Returns a copy of the real and imaginary parts as a complex array.
-
get
public Z get(int ii, int jj)
Returns the (ii,jj)-element of a Zmat.- Parameters:
ii- The row index of the elementjj- The column index of the element
-
get0
public Z get0(int i, int j)
Returns the zero-based (i,j)-element of a Zmat.- Parameters:
i- The row index of the elementj- The column index of the element
-
put
public void put(int ii, int jj, Z a)Writes the (ii,jj) element of a Zmat.- Parameters:
ii- The row index of the elementjj- The column index of the elementa- The new value of the element
-
put0
public void put0(int i, int j, Z a)Writes the zero-based (i,j)-element of a Zmat.- Parameters:
i- The row index of the elementj- The column index of the elementa- The new value of the element
-
get
public Zmat get(int ii1, int ii2, int jj1, int jj2)
Returns the submatrix (ii1:ii2, jj1:jj2).- Parameters:
ii1- The lower column indexii2- The upper column indexjj1- The lower row indexjj2- The upper row index
-
put
public void put(int ii1, int ii2, int jj1, int jj2, Zmat A)Overwrites the submatrix (ii1:ii2, jj1:jj2) with a Zmat.- Parameters:
ii1- The lower column indexii2- The upper column indexjj1- The lower row indexjj2- The upper row indexA- The new value of the submatrix
-
get
public Zmat get(int[] ii, int jj1, int jj2)
Returns the submatrix (ii[], jj1:jj2).- Parameters:
i[]- Contains the row indices of the submatrixjj1- The lower column indexjj2- The upper column index
-
put
public void put(int[] ii, int jj1, int jj2, Zmat A)Overwrites the submatrix (ii[], jj1:jj2) with a Zmat.- Parameters:
i[]- Contains the row indices of the submatrixjj1- The lower column indexjj2- The upper column indexA- The new value of the submatrix.
-
get
public Zmat get(int ii1, int ii2, int[] jj)
Returns the submatrix (ii1:ii2, jj[]).- Parameters:
ii1- The lower row indexii2- The upper row indexjj[]- Contains the column indices of the submatrix
-
put
public void put(int ii1, int ii2, int[] jj, Zmat A)Overwrites the submatrix (ii1:ii2, jj[]) with a Zmat.- Parameters:
ii1- The lower row indexii2- The upper row indexjj[]- Contains the column indices of the submatrixA- The new value of the submatrix
-
get
public Zmat get(int[] ii, int[] jj)
Returns the submatrix (ii[], jj[]).- Parameters:
ii[]- Contains the row indices of the submatrixjj[]- Contains the column indices of the submatrix
-
put
public void put(int[] ii, int[] jj, Zmat A)Overwrites the submatrix (ii[], jj[]) with a Zmat. Returns the submatrix (ii[], jj[])- Parameters:
ii[]- Contains the row indices of the submatrixjj[]- Contains the column indices of the submatrixA- The value of the new submatrix
-
getLU
public Zludpp getLU()
Returns an LU decomposition if a valid one exists. Otherwise returns null.
-
getHQR
public Zhqrd getHQR()
Returns a Householder QR decomposition if a valid one exists. Otherwise returns null.
-
getCHOL
public Zchol getCHOL()
Returns a Cholesky decomposition if a valid one exists. Otherwise returns null.
-
-
DMelt 3.0 © DataMelt by jWork.ORG