jmathlib.toolbox.jmathlib.matrix._private.Jampack
Class Zdiagmat

java.lang.Object
  extended by jmathlib.toolbox.jmathlib.matrix._private.Jampack.Zdiagmat

public class Zdiagmat
extends java.lang.Object

Zdiagmat is a storage efficient representation of a complex diagonal matrix.

Version:
Pre-alpha
Author:
G. W. Stewart

Field Summary
protected  int basex
          The base index
 int bx
          The base index (public)
 int dx
          The index of the last diagonal (public)
protected  double[] im
          The imaginary part of the diagonal
 int n
          The order of the matrix (public)
protected  int order
          The order of the matrix
protected  double[] re
          The real part of the diagonal
 
Constructor Summary
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
 Z get(int ii)
          Gets the ii-th diagonal element of a Zdiagmat.
 Z get0(int i)
          Gets the ith diagonal of a of a Zdiagmat (0-based).
 void getProperties()
          Sets the public parameters.
 void put(int ii, Z val)
          Writes the ii-th diagonal element of a Zdiagmat.
 void put0(int i, Z val)
          Writes the ith diagonal element of a Zdiagmat (0-based).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

order

protected int order
The order of the matrix


basex

protected int basex
The base index


re

protected double[] re
The real part of the diagonal


im

protected double[] im
The imaginary part of the diagonal


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 Zdiagmat
val - 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 Zmat
k - 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 integer
val - A Z

put0

public void put0(int i,
                 Z val)
Writes the ith diagonal element of a Zdiagmat (0-based).


FOOTER

BOTTOM