sedumipy.getdense

Port of getdense.m: the dense-column detection heuristic that feeds the dense-columns optimization (see CONTRIBUTING.md’s dense.cols/dense.q notes). Pure .m logic (no MEX) built entirely on top of the already-bound _native.extractA/_native.findblks.

Terminology note (easy to get backwards): dense.cols/dense.l are 1-indexed GLOBAL row-subscripts into At (i.e. subscripts of the LP and Lorentz “primitive” variables, restricted to 1..K.lq – PSD variables can never be flagged dense since PSD blocks aren’t allowed to be split up). dense.q, by contrast, holds 1-indexed indices LOCAL to the Lorentz-block numbering 1..len(K.q) (i.e. “the k-th Lorentz block”, not “row k of At”) – this matches adendotd.c’s own convention where q indexes per-block arrays via K.qblkstart. Do not treat dense.q as a row subscript the way dense.cols is.

SEE ALSO sedumi, getdatm (consumes dense.q via adendotd), deninfac (consumes dense.cols via adenscale/dpr1fact), amul (consumes dense.cols/ dense.A directly).

Functions

getdense(At, Ablkjc, K, pars)

dense, Adotdden = getdense(At, Ablkjc, K, pars): flags a small proportion of LP/Lorentz "columns" (rows of At) that appear in a large proportion of the primal constraints as dense, mirroring getdense.m exactly.