|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.math.matrix.MatrixTransformer
public class MatrixTransformer
Transform all matrix entries element-by-element.
Constructor Summary | |
---|---|
protected |
MatrixTransformer()
Don't allow instantiation but do allow overrides. |
Method Summary | |
---|---|
static Matrix |
cumulativeColumnProduct(Matrix matrix)
Get cumulative column products for a matrix. |
static Matrix |
cumulativeColumnSum(Matrix matrix)
Get cumulative column sums for a matrix. |
static Matrix |
diagonal(Matrix matrix)
Get diagonal elements of a matrix. |
static Matrix |
embedDiagonal(Matrix matrix,
int offset)
Compose matrix with a diagonal specified by row or column vector. |
static Matrix |
extractDiagonal(Matrix matrix,
int offset)
Get elements of indicated diagonal (offset) as a column vector. |
static Matrix |
extractLowerTriangle(Matrix matrix,
int offset)
Extracts lower triangular matrix given an offset that indicates the relative diagonal. |
static Matrix |
extractUpperTriangle(Matrix matrix,
int offset)
Extracts upper triangular matrix given an offset that indicates the relative diagonal. |
static Matrix |
inverse(Matrix matrix)
Invert a square matrix. |
static Matrix |
negate(Matrix matrix)
Negate all elements of a matrix. |
static Matrix |
pow(Matrix matrix,
int power)
Multiply square matrix by itself one or more times. |
static Matrix |
transpose(Matrix matrix)
Get transpose of matrix. |
static Matrix |
zeroise(Matrix matrix,
double tolerance)
Zero out small elements (within specified tolerance) of a matrix. |
static Matrix |
zeroize(Matrix matrix,
double tolerance)
Zero out small elements (within specified tolerance) of a matrix. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MatrixTransformer()
Method Detail |
---|
public static Matrix cumulativeColumnProduct(Matrix matrix)
matrix
- The matrix.
public static Matrix cumulativeColumnSum(Matrix matrix)
matrix
- The matrix.
public static Matrix diagonal(Matrix matrix)
matrix
- The matrix.
public static Matrix embedDiagonal(Matrix matrix, int offset)
matrix
- Row or column vector, e.g., (n x 1) or (1 x n)
matrix.offset
- Diagonal to be embeded
( =0 will embed the elements as the main diagonal )
public static Matrix extractDiagonal(Matrix matrix, int offset)
matrix
- The matrix.offset
- The diagonal to be extracted
(=0 will extract the main diagonal)
public static Matrix extractLowerTriangle(Matrix matrix, int offset)
matrix
- The matrix.offset
- The diagonal to be extracted
(=0 will extract the main diagonal)
public static Matrix extractUpperTriangle(Matrix matrix, int offset)
matrix
- The matrix.offset
- The diagonal to be extracted
(=0 will extract the main diagonal)
public static Matrix inverse(Matrix matrix)
matrix
- The matrix.
public static Matrix negate(Matrix matrix)
matrix
- Matrix.
public static Matrix pow(Matrix matrix, int power)
matrix
- The matrix (must be square).power
- If power > 1 performs the operation.
If power <= 0 returns a matrix composed of ones.
public static Matrix transpose(Matrix matrix)
matrix
- The matrix whose transpose we want.
public static Matrix zeroize(Matrix matrix, double tolerance)
matrix
- Matrix.tolerance
- Tolerance for zero checking.
public static Matrix zeroise(Matrix matrix, double tolerance)
matrix
- Matrix.tolerance
- Tolerance for zero checking.
Alternate spelling to keep Brits happy.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |