Skip to content
Joris Gillis edited this page Sep 16, 2022 · 2 revisions

Standard documentation for Sparsity.scc:

 Find the strongly connected components of the bigraph defined by the 

 scc(self) -> (int , [int] OUTPUT, [int] OUTPUT)

sparsity pattern.

of a square matrix

See Direct Methods for Sparse Linear Systems by Davis (2006). Returns:

Number of components

Offset for each components (length: 1 + number of components)

Indices for each components, component i has indices index[offset[i]], ..., index[offset[i+1]]

In the case that the matrix is symmetric, the result has a particular

interpretation: Given a symmetric matrix A and n = A.scc(p, r)

=> A[p, p] will appear block-diagonal with n blocks and with the indices of the block boundaries to be found in r.

The implementation is a modified version of cs_scc in CSparse Copyright(c) Timothy A. Davis, 2006-2009 Licensed as a derivative work under the GNU LGPL

Extra doc: https://github.com/casadi/casadi/wiki/L_d6

Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.hpp#L870

Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.cpp#L679-L681

Extra documentation

To edit, see writing tips.

Clone this wiki locally