code: function slack(g, e) {
    return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;
  }
docs: /*
  Returns the amount of slack for the given edge. The slack is defined as the
  difference between the length of the edge and its minimum length.