Weighted path length (source code)

= Weighted path length
{title2=$\ell_w(P)=\sum_{e\in E(P)}w(e)$}

The weighted length of a <graph path> is the sum of its <edge> weights. With positive weights, removing a closed excursion from a <walk> strictly decreases its length. Hence a shortest walk between two vertices is a <graph path>, and minimizing weighted length is the <shortest path problem>.