Symbolic LDL and Cholesky Factorizations

Symbolic LDL and Cholesky factorization algorithms are meant for symmetric positive definite systems; hence, again, only the lower-triangular part of the matrix must be provided. The PROC IML function SOLVELIN provides an interface to both algorithms; the minimum degree ordering heuristic is invoked automatically as follows:

   SOLVELIN (x, status, A, b, method)
x

solution vector

status

status indicator 0 success, 1 matrix is not positive-definite, 2 out of memory

A

sparse matrix (lower-triangular part)

b

vector of right-hand sides

method

a character string, which specifies factorization type, possible values: "LDL" for LDL factorization, and "CHOL" for Cholesky.

The code for this example is as follows:


   /* value   row   col */
   A = { 3     1     1,
         1     2     1,
         4     2     2,
         1     3     2,
         3     4     2,
        10     3     3,
         3     4     4 };

   /* right-hand side */
   b = {1, 1, 1, 1};

   /* invoke LDL factorization */
   call solvelin (x, status, a, b, "LDL");

   print x; /* print solution */

Here is the program output:

                    X
                0.5882353
                -0.764706
                0.1764706
                1.0980392