sedumipy.incorder

Port of incorder.c’s real kernel (spPartTransp()+incorder() – its mexFunction is only argument marshalling). NOT wrapped via ctypes, deliberately: incorder.c’s greedy pivot loop has no qsort/UB dependency (unlike sortnnz.c/iswnbr.c), but it is a small, easily-reimplemented algorithm, and this project already prefers a direct Python port for such deterministic kernels (see neighborhood.py, sortnnz() in _native.py) over round-tripping through ctypes marshalling for a function this size.

SEE ALSO getada3 (this is incorder’s one real caller in sedumi.m’s main loop: [Aord.sperm, Aord.dz] = incorder(A, Ablkjc(:,3), K.mainblks(3))), dpr1fact.

Functions

incorder(At[, Ajc1, ifirst])

perm, dz = incorder(At, Ajc1=None, ifirst=1): greedily orders the columns of At (a sparse matrix, lenfull rows x m columns, in SeDuMi's usual per-constraint-column convention) by ascending number of not-yet-covered "PSD" nonzeros -- i.e. nonzeros in the row range ifirst:lenfull (1-indexed, inclusive of ifirst).