Skip to main content

calc_edge_laplacian_product

Function calc_edge_laplacian_product 

Source
pub fn calc_edge_laplacian_product(
    edges: &[(usize, usize, f64)],
    x: &[f64],
) -> Vec<f64>
Expand description

The weighted Laplacian product L x of an edge list, L = A diag(w) Aᵀ: each edge (a, b, w) adds w (x_a − x_b) to bus a and subtracts it from bus b. The matrix free operator an iterative DC solve applies.

§Panics

When an edge names a bus outside x.