docs: private IntIntPair[] sortEdges(int[] dindex) {
      IntIntPair[] edgesort = new IntIntPair[shared.layout.edges.size()];
      int e = 0;
      for(Layout.Edge edge : shared.layout.edges) {
        int i1 = dindex[edge.dim1], i2 = dindex[edge.dim2];
        edgesort[e] = new IntIntPair(Math.min(i1, i2), e);
        e++;
      }
      Arrays.sort(edgesort);
      return edgesort;
    }