public abstract class Matrix
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
MATRIX_TYPE_RANDOM_LT
random lower triangular matrix
|
static char |
MATRIX_TYPE_RANDOM_REGULAR
random regular matrix
|
static char |
MATRIX_TYPE_RANDOM_UT
random upper triangular matrix
|
static char |
MATRIX_TYPE_UNIT
unit matrix
|
static char |
MATRIX_TYPE_ZERO
zero matrix
|
protected int |
numColumns
number of columns
|
protected int |
numRows
number of rows
|
Constructor and Description |
---|
Matrix() |
Modifier and Type | Method and Description |
---|---|
abstract Matrix |
computeInverse()
Compute the inverse of this matrix.
|
abstract byte[] |
getEncoded() |
int |
getNumColumns() |
int |
getNumRows() |
abstract boolean |
isZero()
Check if this is the zero matrix (i.e., all entries are zero).
|
abstract Vector |
leftMultiply(Vector vector)
Compute the product of a vector and this matrix.
|
abstract Matrix |
rightMultiply(Matrix a)
Compute the product of this matrix and another matrix.
|
abstract Matrix |
rightMultiply(Permutation p)
Compute the product of this matrix and a permutation.
|
abstract Vector |
rightMultiply(Vector vector)
Compute the product of this matrix and a vector.
|
abstract java.lang.String |
toString() |
protected int numRows
protected int numColumns
public static final char MATRIX_TYPE_ZERO
public static final char MATRIX_TYPE_UNIT
public static final char MATRIX_TYPE_RANDOM_LT
public static final char MATRIX_TYPE_RANDOM_UT
public static final char MATRIX_TYPE_RANDOM_REGULAR
public int getNumRows()
public int getNumColumns()
public abstract byte[] getEncoded()
public abstract Matrix computeInverse()
public abstract boolean isZero()
public abstract Matrix rightMultiply(Matrix a)
a
- the other matrixpublic abstract Matrix rightMultiply(Permutation p)
p
- the permutationpublic abstract Vector leftMultiply(Vector vector)
vector
- a vectorpublic abstract Vector rightMultiply(Vector vector)
vector
- a vectorpublic abstract java.lang.String toString()
toString
in class java.lang.Object