|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object smithers.algorithms.Matrix
public class Matrix
Implements a collection of useful matrix related algorithms. The methods of
this class all require that the matrix arguments be rectangular; for
efficiency they do not check this, hence if the arguments are invalid, they
will likely throw ArrayIndexOutOfBoundsException
or NullPointerException
Method Summary | |
---|---|
static void |
decomposeLQ(float[][] matrix,
float[][] l,
float[][] q)
Computes an LQ decomposition of a matrix. |
static float[] |
product(float[][] matrix,
float[] vector)
Multiplies a matrix by a column vector. |
static float[][] |
product(float[][] matrix1,
float[][] matrix2)
Multiplies two matrices together. |
static float[] |
product(float[] vector,
float[][] matrix)
Multiplies a row vector by a matrix. |
static void |
rowReduce(float[][] matrix)
Row reduce a matrix in-place. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float[][] product(float[][] matrix1, float[][] matrix2)
matrix1
- a matrixmatrix2
- another matrix
matrix1 * matrix2
public static float[] product(float[][] matrix, float[] vector)
matrix
- a matrixvector
- a vector
matrix * vector
public static float[] product(float[] vector, float[][] matrix)
vector
- a vectormatrix
- a matrix
vector * matrix
public static void rowReduce(float[][] matrix)
matrix
- the matrix to reducepublic static void decomposeLQ(float[][] matrix, float[][] l, float[][] q)
matrix
- the matrix to decomposel
- the matrix in which to store L; must have the same
dimensions as matrix
q
- the matrix in which to store Q; must be square of
dimension equal to the number of columns of matrix
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |