+--------------------------------------------------------------------+
 |                                                                    |
 |                                CHOL                                |
 |                                                                    |
 +--------------------------------------------------------------------+

 MEANING: CHOL subroutine
 CONTEXT: NONMEM utility routine

 USAGE:
 USE SIZES, ONLY:: ISIZE,DPSIZE
 INTEGER(KIND=ISIZE) :: MODE,N,IER
 REAL(KIND=DPSIZE) :: R
 DIMENSION R(5)
 CALL CHOL (MODE,N,R,IER)

 DISCUSSION:
 CHOL  is  a NONMEM utility routine that may be called by any user rou-
 tine.  It computes the Cholesky square root of a given positive  defi-
 nite matrix A, i.e., the lower triangular matrix B satisfying BB' = A.

 Input argument:

  MODE
      An integer variable or integer constant.
      0 - the required initialization call.
      1 - a normal call.

  N   An  integer  variable  or  integer  constant between 1 and 5; the
      dimension of the matrix.

  R   An array of dimension at least N.
      The ith row of the matrix A, at the i+1 st. call to  CHOL.   Ele-
      ments R(j) with j>i are ignored.

  IER Upon input when MODE is 0:
      0  -  CHOL  should  terminate NONMEM execution when the matrix is
      algorithmically not positive definite.
      1 - CHOL should always return control to PRED.

 Output argument:

  R   The ith row of B, upon return from the i+1 st. call to CHOL.

  IER 0 - Normal return.
      1 - matrix is algorithmically not positive definite.   (This  can
      only happen if IER was 1 at the call with MODE=0.)

 If  the  dimension  of  A  is NxN, then CHOL is called N+1 times.  The
 first call initializes the routine.  On the i+1 st. call, the ith  row
 is passed to CHOL, and CHOL returns the ith row of B (i=1,..., N).

REFERENCES: Guide II Section D.4, D.4.2
REFERENCES: Guide II Figure 20

  
Go to main index.
  
Created by nmhelp2html v. 1.0 written by Niclas Jonsson (Modified by AJB 5/2006,11/2007,10/2012)