Jampack
Class Zdiagmat
- java.lang.Object
-
- Jampack.Zdiagmat
-
public class Zdiagmat extends java.lang.ObjectZdiagmat is a storage efficient representation of a complex diagonal matrix.
-
-
Field Summary
Fields Modifier and Type Field and Description intbxThe base index (public)intdxThe index of the last diagonal (public)intnThe order of the matrix (public)
-
Constructor Summary
Constructors Constructor and Description Zdiagmat(int order)Constructs a Zdiagmat and initializes it to zero.Zdiagmat(int order, Z val)Constructs a Zdiagmat and initializes it to a constant.Zdiagmat(Z1 val)Constructs a Zdiagmat and initializes it to a Z1.Zdiagmat(Zdiagmat D)Constructs a Zdiagmat and initializes it to another Zdiagmat.Zdiagmat(Zmat A)Constructs a Zdiagmat and initializes it to the principal diagonal of a Zmat.Zdiagmat(Zmat A, int k)Constructs a Zdiagmat and initializes it to the diagonal of a Zmat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Zget(int ii)Gets the ii-th diagonal element of a Zdiagmat.Zget0(int i)Gets the ith diagonal of a of a Zdiagmat (0-based).voidgetProperties()Sets the public parameters.voidput(int ii, Z val)Writes the ii-th diagonal element of a Zdiagmat.voidput0(int i, Z val)Writes the ith diagonal element of a Zdiagmat (0-based).
-
-
-
Field Detail
-
n
public int n
The order of the matrix (public)
-
bx
public int bx
The base index (public)
-
dx
public int dx
The index of the last diagonal (public)
-
-
Constructor Detail
-
Zdiagmat
public Zdiagmat(int order)
Constructs a Zdiagmat and initializes it to zero.- Parameters:
order- The order of the new Zdiagmat
-
Zdiagmat
public Zdiagmat(int order, Z val)Constructs a Zdiagmat and initializes it to a constant.- Parameters:
order- The order of the new Zdiagmatval- The value to which the diagonal is to be initialized
-
Zdiagmat
public Zdiagmat(Z1 val)
Constructs a Zdiagmat and initializes it to a Z1.- Parameters:
val- A Z1
-
Zdiagmat
public Zdiagmat(Zmat A, int k) throws JampackException
Constructs a Zdiagmat and initializes it to the diagonal of a Zmat.- Parameters:
A- The Zmatk- The diagonal. For k=0 gives the princpal diagonal; k>0, the kth superdiagonal; k<0, the kth subdiagonal.- Throws:
JampackException- Thrown for k to large or small.
-
Zdiagmat
public Zdiagmat(Zmat A) throws JampackException
Constructs a Zdiagmat and initializes it to the principal diagonal of a Zmat.- Parameters:
A- A Zmat- Throws:
JampackException- Passed from below.
-
Zdiagmat
public Zdiagmat(Zdiagmat D)
Constructs a Zdiagmat and initializes it to another Zdiagmat.- Parameters:
D- A Zdiagmat
-
-
Method Detail
-
getProperties
public void getProperties()
Sets the public parameters.
-
get
public Z get(int ii)
Gets the ii-th diagonal element of a Zdiagmat.- Parameters:
ii- An integer- Returns:
- The ii-th element of this Zdiagmat
-
get0
public Z get0(int i)
Gets the ith diagonal of a of a Zdiagmat (0-based).
-
put
public void put(int ii, Z val)Writes the ii-th diagonal element of a Zdiagmat.- Parameters:
ii- An integerval- A Z
-
put0
public void put0(int i, Z val)Writes the ith diagonal element of a Zdiagmat (0-based).
-
-
DMelt 3.0 © DataMelt by jWork.ORG