| Constructor and Description |
|---|
Matrix(int m,
int n) |
Matrix(int m,
int n,
T s) |
Matrix(T[][] A)
Construct a matrix from a 2-D array.
|
Matrix(T[] vals,
int m)
Construct a matrix from a one-dimensional packed array
|
| Modifier and Type | Method and Description |
|---|---|
void |
print() |
void |
print(int w,
int d)
Print the matrix to stdout.
|
void |
print(PrintWriter output,
int w,
int d)
Print the matrix to the output stream.
|
void |
print(PrintWriter output,
NumberFormat format,
int width)
Print the matrix to stdout.
|
public Matrix(int m, int n)
public Matrix(T[][] A)
A - Two-dimensional array of doubles.IllegalArgumentException - All rows must have the same length#constructWithCopypublic Matrix(T[] vals, int m)
vals - One-dimensional array of doubles, packed by rows (ala C++).m - Number of rows.IllegalArgumentException - Array length must be a multiple of m.public void print(PrintWriter output, NumberFormat format, int width)
format - A Formatting object for individual elements.width - Field width for each column.DecimalFormat.setDecimalFormatSymbols(java.text.DecimalFormatSymbols)public void print(PrintWriter output, int w, int d)
output - Output stream.w - Column width.d - Number of digits after the decimal.public void print(int w, int d)
w - Column width.d - Number of digits after the decimal.public void print()