

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object  +linear_algebra.Cholesky
This class contains:
This class was written by a statistician rather than a numerical analyst. I have tried to check the code carefully, but it may still contain bugs. Further, its stability and efficiency do not meet the standards of high quality numerical analysis software. When public domain Java numerical analysis routines become available from numerical analysts (e.g., the people who produce LAPACK), then THE CODE PRODUCED BY THE NUMERICAL ANALYSTS SHOULD BE USED.
Meanwhile, if you have suggestions for improving this code, please contact Steve Verrill at steve@ws10.fpl.fs.fed.us.
Constructor Summary  
Cholesky()

Method Summary  
void 
factorPosDef(double[][] a,
int n)
This method factors the n by n symmetric positive definite matrix A as RR´ where R is a lower triangular matrix. 
void 
invertPosDef(double[][] a,
int n,
boolean factored)
This method obtains the inverse of an n by n symmetric positive definite matrix A. On entrance: If factored == false, the lower triangle of a[ ][ ] should contain the lower triangle of A. If factored == true, the lower triangle of a[ ][ ] should contain a lower triangular matrix R such that RR´ = A. 
void 
solvePosDef(double[][] a,
double[] b,
double[] y,
int n,
boolean factored)
This method solves the equation 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 
public Cholesky()
Method Detail 
public void factorPosDef(double[][] a, int n) throws NotPosDefException
This method factors the n by n symmetric positive definite matrix A as RR´ where R is a lower triangular matrix. The method assumes that at least the lower triangle of A is filled on entry. On exit, the lower triangle of A has been replaced by R.
n
 The order of the matrix a[ ][ ].
NotPosDefException
 if the factorization cannot be completed.public void solvePosDef(double[][] a, double[] b, double[] y, int n, boolean factored) throws NotPosDefException
This method solves the equation
Ax = bwhere A is a known n by n symmetric positive definite matrix, and b is a known vector of length n.
The method proceeds by first factoring A as RR´ where R is a lower triangular matrix. Thus Ax = b is equivalent to R(R´x) = b. Then the method performs two additional operations. First it solves Ry = b for y. Then it solves R´x = y for x. It stores x in b.
b
 On entrance b must contain the known b of Ax = b. On exit
it contains the solution x to Ax = b.y
 A work vector of order at least n.n
 The order of A and b.factored
 On entrance, factored should be set to true if A
already has been factored, false
if A has not yet been factored.
NotPosDefException
 if A cannot be factored as RR´ for a
full rank lower triangular matrix R.public void invertPosDef(double[][] a, int n, boolean factored) throws NotPosDefException
This method obtains the inverse of an n by n
symmetric positive definite matrix A.
n
 The order of A.factored
 On entrance, factored should be set to true if A
already has been factored, false
if A has not yet been factored.
NotPosDefException
 if A cannot be factored as RR´ for a
full rank lower triangular matrix R.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 