public class Matrix
extends java.lang.Object
Constructor and Description |
---|
Matrix(boolean is_numerical,
java.lang.String[][] matrix) |
Matrix(int rows,
int cols)
Constructor for "empty" matrix
|
Matrix(java.lang.String[][] array) |
Modifier and Type | Method and Description |
---|---|
static boolean |
getIsNumerical() |
java.lang.String[][] |
getMatrix() |
java.lang.String |
getMatrixAsHtml() |
static java.lang.String |
getMatrixAsHtml(Matrix matrix,
boolean without_html_tags) |
static Matrix |
getProduct(Matrix m1,
Matrix m2)
Right-multiplies matrix m1 with matrix m2.
|
Matrix |
getSubMatrix(int x,
int y,
int dx,
int dy) |
Matrix |
getTranspose() |
void |
setComponents(java.lang.String[][] components) |
static void |
setIsNumerical() |
static void |
setIsNumerical(boolean is_numerical) |
public Matrix(int rows, int cols)
rows
- # of rows.cols
- # of cols.public Matrix(java.lang.String[][] array)
public Matrix(boolean is_numerical, java.lang.String[][] matrix)
public static void setIsNumerical(boolean is_numerical)
is_numerical
- 'true': Mathematical operations are carried out numerically.
'false': -- " -- algebraically.public static void setIsNumerical()
public static boolean getIsNumerical()
public Matrix getSubMatrix(int x, int y, int dx, int dy)
x
- horizontal coordinate of left upper corner (counting starts with 1).y
- vertical coordinate of left upper corner (counting starts with 1).dx
- number of of columns.dy
- number of of rows.public void setComponents(java.lang.String[][] components) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getMatrixAsHtml(Matrix matrix, boolean without_html_tags)
public java.lang.String getMatrixAsHtml()
public static Matrix getProduct(Matrix m1, Matrix m2) throws java.lang.Exception
m1
- Matrix 1.
m2 Matrix 2.java.lang.Exception
public Matrix getTranspose()
public java.lang.String[][] getMatrix()