linear_algebra
Class Cholesky_j

java.lang.Object
  |
  +--linear_algebra.Cholesky_j

public class Cholesky_j
extends java.lang.Object

This class contains the LINPACK DPOFA (Cholesky decomposition), DPOSL (solve), and DPODI (determinant and inverse) routines.

IMPORTANT: The "_j" suffixes indicate that these routines use Java/C style indexing. For example, you will see

   for (i = 0; i < n; i++)
rather than
   for (i = 1; i <= n; i++)
To use the "_j" routines you will have to fill elements 0 through n - 1 rather than elements 1 through n. Versions of these programs that use FORTRAN style indexing are also available. They end with the suffix "_f77".

This class was translated by a statistician from FORTRAN versions of the LINPACK routines. It is NOT an official translation. When public domain Java numerical analysis routines become available from 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_j()
           
 
Method Summary
static void dpodi_j(double[][] a, int n, double[] det, int job)
           This method uses the Cholesky decomposition provided by DPOFA to obtain the determinant and/or inverse of a symmetric, positive definite matrix.
static void dpofa_j(double[][] a, int n)
           This method decomposes an p by p symmetric, positive definite matrix X into a product, R´R, where R is an upper triangular matrix and R´ is the transpose of R.
static void dposl_j(double[][] a, int n, double[] b)
           This method uses the Cholesky decomposition provided by DPOFA to solve the equation Ax = b where A is symmetric, positive definite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cholesky_j

public Cholesky_j()
Method Detail

dpofa_j

public static void dpofa_j(double[][] a,
                           int n)
                    throws NotPosDefException

This method decomposes an p by p symmetric, positive definite matrix X into a product, R´R, where R is an upper triangular matrix and R´ is the transpose of R. For details, see the comments in the code. This method is a translation from FORTRAN to Java of the LINPACK subroutine DPOFA. In the LINPACK listing DPOFA is attributed to Cleve Moler with a date of 8/14/78. Translated by Steve Verrill, March 2, 1997.

Parameters:
a - The matrix to be decomposed
n - The order of a
NotPosDefException

dposl_j

public static void dposl_j(double[][] a,
                           int n,
                           double[] b)

This method uses the Cholesky decomposition provided by DPOFA to solve the equation Ax = b where A is symmetric, positive definite. For details, see the comments in the code. This method is a translation from FORTRAN to Java of the LINPACK subroutine DPOSL. In the LINPACK listing DPOSL is attributed to Cleve Moler with a date of 8/14/78. Translated by Steve Verrill, March 2, 1997.

Parameters:
a - a[][]
n - The order of a
b - The vector b in Ax = b

dpodi_j

public static void dpodi_j(double[][] a,
                           int n,
                           double[] det,
                           int job)

This method uses the Cholesky decomposition provided by DPOFA to obtain the determinant and/or inverse of a symmetric, positive definite matrix. For details, see the comments in the code. This method is a translation from FORTRAN to Java of the LINPACK subroutine DPODI. In the LINPACK listing DPODI is attributed to Cleve Moler with a date of 8/14/78. Translated by Steve Verrill, March 3, 1997.

Parameters:
a - a[][]
n - The order of a
det - det[]
job - Indicates whether a determinant, inverse, or both is desired