-
Notifications
You must be signed in to change notification settings - Fork 364
L_d7
Calculate the block triangular form (BTF) btf(self) -> (int , [int] OUTPUT, [int] OUTPUT, [int] OUTPUT, [int] OUTPUT, [int] OUTPUT, [int] OUTPUT)
See Direct Methods for Sparse Linear Systems by Davis (2006).
The function computes the Dulmage-Mendelsohn decomposition, which allows you to reorder the rows and columns of a matrix to bring it into block triangular form (BTF).
It will not consider the distance of off-diagonal elements to the diagonal: there is no guarantee you will get a block-diagonal matrix if you supply a randomly permuted block-diagonal matrix.
If your matrix is symmetrical, this method is of limited use; permutation can make it non-symmetric.
See: scc
The implementation is a modified version of cs_dmperm 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_d7
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.hpp#L894
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/sparsity.cpp#L687-L697
To edit, see writing tips.