linear_algebra Class LU_j

```java.lang.Object
|
+--linear_algebra.LU_j
```

public class LU_j
extends java.lang.Object

This class contains the LINPACK DGEFA (LU factorization), DGESL (solve), and DGEDI (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.

 Constructor Summary `LU_j()`

 Method Summary `static void` ```dgedi_j(double[][] a, int n, int[] ipvt, double[] det, double[] work, int job)```            This method uses the LU decomposition provided by DGEFA to obtain the determinant and/or inverse of a full rank n by n matrix. `static void` ```dgefa_j(double[][] a, int n, int[] ipvt)```            This method decomposes an n by n matrix A into a product, LU, where L is a lower triangular matrix and U is an upper triangular matrix. `static void` ```dgesl_j(double[][] a, int n, int[] ipvt, double[] b, int job)```            This method uses the LU decomposition provided by DGEFA to solve the equation Ax = b where A is a full rank n by n matrix.

 Methods inherited from class java.lang.Object `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

 Constructor Detail

LU_j

`public LU_j()`
 Method Detail

dgefa_j

```public static void dgefa_j(double[][] a,
int n,
int[] ipvt)
throws NotFullRankException```

This method decomposes an n by n matrix A into a product, LU, where L is a lower triangular matrix and U is an upper triangular matrix. For details, see the comments in the code. This method is a translation from FORTRAN to Java of the LINPACK subroutine DGEFA. In the LINPACK listing DGEFA is attributed to Cleve Moler with a date of 8/14/78. Translated by Steve Verrill, March 12, 1998.

Parameters:
`a` - The matrix to be decomposed
`n` - The order of a
`ipvt` - A vector of pivot indices
`NotFullRankException`

dgesl_j

```public static void dgesl_j(double[][] a,
int n,
int[] ipvt,
double[] b,
int job)```

This method uses the LU decomposition provided by DGEFA to solve the equation Ax = b where A is a full rank n by n matrix. For details, see the comments in the code. This method is a translation from FORTRAN to Java of the LINPACK subroutine DGESL. In the LINPACK listing DGESL is attributed to Cleve Moler with a date of 8/14/78. Translated by Steve Verrill, March 12, 1998.

Parameters:
`a` - a[][]
`n` - The order of a
`ipvt` - A vector of pivot indices
`b` - Input --- the vector b in Ax = b, Output --- the vector x in Ax = b
`job` - 0 --- solve Ax = b, nonzero --- solve Transpose(A)x = b

dgedi_j

```public static void dgedi_j(double[][] a,
int n,
int[] ipvt,
double[] det,
double[] work,
int job)```

This method uses the LU decomposition provided by DGEFA to obtain the determinant and/or inverse of a full rank n by n matrix. For details, see the comments in the code. This method is a translation from FORTRAN to Java of the LINPACK subroutine DGEDI. In the LINPACK listing DGEDI is attributed to Cleve Moler with a date of 8/14/78. Translated by Steve Verrill, March 12, 1998.

Parameters:
`a` - a[][]
`n` - The order of a
`ipvt` - A vector of pivot indices
`det` - det[]
`work` - work[]
`job` - Indicates whether a determinant, inverse, or both is desired