pub fn cost_quadratic_diag(q: &[f64]) -> CsMat<f64>Expand description
Q = diag(q) as a sparse matrix — the quadratic-cost analog of
susceptance_diag. Feeds the DC-OPF QP
objective ½ pᵀ Q p + cᵀ p consumed by the kkt interior-point operators.
pub fn cost_quadratic_diag(q: &[f64]) -> CsMat<f64>Q = diag(q) as a sparse matrix — the quadratic-cost analog of
susceptance_diag. Feeds the DC-OPF QP
objective ½ pᵀ Q p + cᵀ p consumed by the kkt interior-point operators.