pub fn ground_at_each(matrix: &CsMat<f64>, refs: &[usize]) -> CsMat<f64>Expand description
Delete every row and column in refs from a square matrix, returning the
grounded matrix of side n โ k, where k is the count of distinct
in-range references. Grounding one bus per connected component turns a
singular Laplacian SPD. Grounding several buses within one component fixes
several angles to zero; this is not a participation factor based slack model.
ยงPanics
Panics if any reference is >= matrix.rows(): the builder is sized n โ k,
so an out-of-range index would silently yield the wrong shape.