|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jebl.math.MatrixCalc
public final class MatrixCalc
Constructor Summary | |
---|---|
MatrixCalc()
|
Method Summary | |
---|---|
static double[][] |
choleskyFactor(double[][] inMatrix)
Cholesky factorization (aka Cholesky Decomposition) This factorization can be used when square matrix is symmetric and positive definite. |
static double[] |
choleskySolve(double[][] matrix,
double[] vector)
Cholesky solve Once the matrix is decomposed with the above routine, one can solve the triangular factor with backsubstitution. |
static double[][] |
copyMatrix(double[][] matrix)
copy one matrix into another |
static double[][] |
deleteMatrixColumn(double[][] matrix,
int column)
takes a matrix and deletes a column |
static double[][] |
deleteMatrixRow(double[][] matrix,
int row)
takes a matrix and deletes a row |
static double[] |
getColumn(double[][] matrix,
int column)
takes a matrix and gets a column, then returns it as a vector |
static double |
innerProduct(double[] vector1,
double[] vector2,
int x)
innerProdect calculates inner product of two vectors from i down |
static double[] |
lowerSolve(double[][] matrix,
double[] vector,
double diag)
lower Solve forward elimination with (optional) default diagonal value |
static double[][] |
reverseMatrix(double[][] matrix)
reverse a matrix |
static double[] |
reverseVector(double[] vector)
reverse a vector |
static double |
sumVector(double[] vector)
sum a vector |
static double[] |
upperSolve(double[][] matrix,
double[] vector,
double diag)
upperSolve back substitution with optional over-riding diagonal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatrixCalc()
Method Detail |
---|
public static double[][] choleskyFactor(double[][] inMatrix) throws MatrixCalcException.NotSquareMatrixException, MatrixCalcException.PositiveDefiniteException
inMatrix
- square symmetric matrix to perform cholesky factorization
MatrixCalcException.NotSquareMatrixException
MatrixCalcException.PositiveDefiniteException
public static double[] choleskySolve(double[][] matrix, double[] vector) throws MatrixCalcException.NotSquareMatrixException
matrix
- matrix to perform cholesky solve (probably used after factorization)vector
- vector to solve matrix * vector = return
MatrixCalcException.NotSquareMatrixException
public static double[] lowerSolve(double[][] matrix, double[] vector, double diag)
matrix
- the matrix to perform the forward eliminationvector
- diag
- the default diagonal value
public static double[] upperSolve(double[][] matrix, double[] vector, double diag)
matrix
- the matrix to perform the back substitutionvector
- diag
- the default diagonal value
public static double innerProduct(double[] vector1, double[] vector2, int x) throws IndexOutOfBoundsException
vector1
- the first vectorvector2
- the second vectorx
- the starting int
IndexOutOfBoundsException
public static double[] getColumn(double[][] matrix, int column)
matrix
- the matrix from which the column will be returnedcolumn
- the number of the column to return
public static double[][] deleteMatrixRow(double[][] matrix, int row)
matrix
- the matrix from which to delete the rowrow
- the number of the row to delete
public static double[][] deleteMatrixColumn(double[][] matrix, int column)
matrix
- the matrix from which to delete the columncolumn
- the number of the column to delete
public static double[] reverseVector(double[] vector)
vector
- the vector to reverse
public static double[][] reverseMatrix(double[][] matrix)
matrix
- the matrix to reverse
public static double sumVector(double[] vector)
vector
- the input vector
public static double[][] copyMatrix(double[][] matrix)
matrix
- the matrix to copy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |