CVXOPT includes an interface to the AMD library for computing approximate minimum degree orderings of sparse matrices.
See Also:
P. R. Amestoy, T. A. Davis, I. S. Duff, Algorithm 837: AMD, An Approximate Minimum Degree Ordering Algorithm, ACM Transactions on Mathematical Software, 30(3), 381-388, 2004.
A[, uplo='L']) |
p = order(A)
, then
A[p,p]
has sparser Cholesky factors
than A
.
As an example we consider the matrix
>>> from cvxopt.base import spmatrix >>> from cvxopt import amd >>> A = spmatrix([10,3,5,-2,5,2], [0,2,1,2,2,3], [0,0,1,1,2,3]) >>> P = amd.order(A) >>> print P 1 0 2 3