| Sparse Matrix Algorithms |
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)
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
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.