|
SSJ V. 2.6.2. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.util.TableFormat
public class TableFormat
This class provides methods to format arrays and matrices into
Strings in different styles.
This could be useful for printing arrays and subarrays, or for
putting them in files for further treatment by other softwares such
as Mathematica, Matlab, etc.
| Field Summary | |
|---|---|
static int |
MATHEMATICA
Mathematica matrix printing style |
static int |
MATLAB
Matlab matrix printing style |
static int |
PLAIN
Plain text matrix printing style |
| Method Summary | |
|---|---|
static String |
format(double[][] Mat,
int i1,
int i2,
int j1,
int j2,
int w,
int p,
int style,
String Name)
Formats the submatrix with lines i1 <= i <= i2 and columns j1 <= j <= j2 of the matrix Mat, using the formatting style style. |
static String |
format(double[] V,
int n1,
int n2,
int k,
int p1,
int p2,
int p3)
Similar to the previous method, but for an array of double's. |
static String |
format(int[][] Mat,
int i1,
int i2,
int j1,
int j2,
int w,
int p,
int style,
String Name)
Deprecated. |
static String |
format(int[][] Mat,
int i1,
int i2,
int j1,
int j2,
int w,
int style,
String Name)
Similar to the previous method, but for a matrix of int's. |
static String |
format(int[] V,
int n1,
int n2,
int k,
int p)
Formats a String containing the elements n1
to n2 (inclusive) of table V,
k elements per line, p positions per element. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PLAIN
public static final int MATHEMATICA
public static final int MATLAB
| Method Detail |
|---|
public static String format(int[] V,
int n1,
int n2,
int k,
int p)
String containing the elements n1
to n2 (inclusive) of table V,
k elements per line, p positions per element.
If k = 1, the array index will also appear on the left
of each element, i.e., each line i will have the form i V[i].
V - array to be formatedn1 - index of the first element being formatedn2 - index of the last element being formatedk - number of elements per linep - number of positions per element
public static String format(double[] V,
int n1,
int n2,
int k,
int p1,
int p2,
int p3)
V - array to be formatedn1 - index of the first element being formatedn2 - index of the last element being formatedk - number of elements per linep1 - number of positions per elementp2 - number of digits after the decimal pointp3 - number of significant digits
@Deprecated
public static String format(int[][] Mat,
int i1,
int i2,
int j1,
int j2,
int w,
int p,
int style,
String Name)
public static String format(double[][] Mat,
int i1,
int i2,
int j1,
int j2,
int w,
int p,
int style,
String Name)
Mat - matrix to be formatedi1 - index of the first row being formatedi2 - index of the last row being formatedj1 - index of the first column being formatedj2 - index of the last column being formatedw - number of positions for each elementp - number of digits after the decimal point of the elementsstyle - formating style of the submatrix, being one of
MATHEMATICA, MATLAB, or PLAINName - descriptive name of the submatrix
public static String format(int[][] Mat,
int i1,
int i2,
int j1,
int j2,
int w,
int style,
String Name)
Mat - matrix to be formatedi1 - index of the first row being formatedi2 - index of the last row being formatedj1 - index of the first column being formatedj2 - index of the last column being formatedw - number of positions for each elementstyle - formating style of the submatrix, being one of
MATHEMATICA, MATLAB, or PLAINName - descriptive name of the submatrix
|
SSJ V. 2.6.2. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||