Discrete Dirichlet energy (source code)

= Discrete Dirichlet energy
{title2=$\mathcal E(f,f)$}

On an unweighted graph, the discrete Dirichlet energy is proportional to $\sum_{xy\in E}(f(x)-f(y))^2$. It measures the squared variation of a function across edges.