symbfact

Symbolic factorization analysis of a sparse matrix.

Category: Mathematics > Sparse Matrices

Syntax

count = symbfact(A)

Returns the number of nonzeros in each column of the Cholesky factor of A.

Description

Predicting the memory a Cholesky factorization will need does not require computing it. The counts follow from the nonzero pattern alone, by following the elimination tree. Summing them gives the total size of the factor, sum(count), so different orderings can be compared before doing the numerical work.

Input arguments

A
Sparse symmetric matrix; the pattern of its upper triangle is used.

Output arguments

count
Vector with count(j) equal to the number of nonzeros in column j of the Cholesky factor.

Example

Column counts of the factor

A = sparse(diag(4*ones(4,1)) + diag(ones(3,1),1) + diag(ones(3,1),-1));
c = symbfact(A)
sum(c)
nnz(chol(A))
Output
c = 1×4

     2     2     2     1
ans = 7
ans = 7

See also

etree chol symrcm colperm