Parameters

Back to: Main contents.

Contents

The base index
History
Printing

Jampack has several global parameters that are contained in the class Parameters. The following is a description of them.

The base index

Back to: Main contents, Top of section.

The elements of a Jampack matrix are indexed starting with a base index that points to the element in the northeast corner of the matrix. For example, the matrix

| a33  a34  a35 |
| a43  a44  a45 |
| a53  a54  a55 |
has a base index of three. The default base index is contained in the Parameters field
protected static int BaseIndex = 1
The current value of the base index can be obtained via the Parameters method
public static int getBaseIndex()

The default base index can be changed once in an application, before any new matrix classes have been constructed. This is done by invoking the Parameters method

public static void setBaseIndex(int bx)
where bx is the new value of the base index. Any attempt to reset the base index a second time or after a matrix class has been constructed will result in a JampackException. This insures that the matrices generated by an application all have a common base index.

Since matrices are serializable, it is possible to read matrices that have a different base indices into an application. To bring such a matrix into line with the others, Parameters provides the functions

public static void adjustBaseIndex(Zmat A)

public static void adjustBaseIndex(Zdiagmat A)
that resets the base index to the common value.

For more on base indices see Matrices.BaseIndex.

History

Back to: Main contents, Top of section.

Since certain matrix decomposition tend to be reused, each Jampack matrix contains a history list indicating which of these decompositions has been computed from the matrix. If a Jampack method requires a decomposition, it interrogates the history list, and if the decomposition is there, it reuses it. This history list (and the reuse) can be turned of by changing the Parameters history flag:

protected static boolean history = true
The methods for setting and unsetting the history flag are

public static void setHistory()

public static void unsetHistory()

For more details on history, see Matrices.Zmat.

Printing

Back to: Main contents, Top of section.

Parameters contains three fields to control the format of output from Jampack's Print suite. They are

protected static int OutputFieldWidth = 12
The width of the field in characters in which a number is printed

protected static int OutputFracPlaces = 3
The number of places to the right of the decimal point

protected static int PageWidth = 80
The width of an output line in characters

These parameters can be reset by the method

public static void setOutputParams(int width, int frac, int pagewidth)
If a parameter in the calling sequence is not positive, it is not reset.