|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.Matrix
vec_math.QuadMatrix
public class QuadMatrix
Extension to the NxM matrix functions Matrix. Rootines to perform matrix inversion and determinant calculation are included via means of LU decomposition. Via the routine LUdecomp() the actual matrix is destroyed and its decomposition is stored in place of the original matrix. The flag LUdecomposed is set to notify routines like getDeterminant() and getInverse() that LU has already been performed. Further extensions may use the LU for linear equ. solving. (Lit. "Num. Rec." p34ff)
| Nested Class Summary | |
|---|---|
static class |
QuadMatrix.Test
Testing. |
| Nested classes/interfaces inherited from class vec_math.Matrix |
|---|
Matrix.CloneTest |
| Field Summary | |
|---|---|
protected boolean |
decomposed
True if this matrix is already LU-decomposed. |
protected int[] |
exchange
Record the exchanged rows during LU decomposition. |
protected double |
sign
Sign of pivot element. |
private boolean |
singular
Gets true if this matrix is singluar. |
| Fields inherited from class vec_math.Matrix |
|---|
colValid, rowValid |
| Constructor Summary | |
|---|---|
QuadMatrix(int n)
|
|
QuadMatrix(Matrix mat)
|
|
| Method Summary | |
|---|---|
double |
getDeterminant()
Returns the determinant of the actual Matrix. |
static double |
getDeterminant(QuadMatrix invert)
Returns the determinant of the actual Matrix. |
QuadMatrix |
getInverse()
Inverts the current matrix via luDecomposition. |
static QuadMatrix |
getInverse(QuadMatrix invert)
The static version of matrix inversion. |
static QuadMatrix |
getUnitMatrix(int n)
Returns a unit matrix of range nxn. |
boolean |
isSingular()
Returns true if this matrix is singluar. |
protected double |
luDecomp()
Performs an LU decomposition of the matrix, with the diagonals of the L matrix set to 1 and therfore not stored. |
protected double[] |
luSubst(double[] solve)
The substitution routine to the luDecomposition. |
static VectorG |
solve(QuadMatrix q,
VectorG rhs)
Solves the system of linear equations represented by this quadmatrix for the system |
VectorG |
solve(VectorG rhs)
Solves the system of linear equations represented by this quadmatrix for the system |
| Methods inherited from class vec_math.Matrix |
|---|
clone, columns, equals, evalCol, evalRow, exchangeCol, exchangeRow, getColumn, getElement, getRawColumn, getRawRow, getRow, mult, mult, multOneCol, multOneRow, rows, setCols, setElement, setOneCol, setOneRow, setRows, toString, transpose |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private boolean singular
protected boolean decomposed
protected int[] exchange
protected double sign
| Constructor Detail |
|---|
public QuadMatrix(int n)
public QuadMatrix(Matrix mat)
| Method Detail |
|---|
public static QuadMatrix getUnitMatrix(int n)
protected double luDecomp()
public boolean isSingular()
protected double[] luSubst(double[] solve)
public QuadMatrix getInverse()
public VectorG solve(VectorG rhs)
Q_ij*ret_j+rhs_i = 0,
where ret is the solution vector returned and rhs is the right-hand side
supplied.
public static VectorG solve(QuadMatrix q,
VectorG rhs)
Q_ij*ret_j+rhs_i = 0,
where ret is the solution vector returned and rhs is the right-hand side
supplied.
public static QuadMatrix getInverse(QuadMatrix invert)
public double getDeterminant()
public static double getDeterminant(QuadMatrix invert)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||