code: private Pair<Integer, Integer> indexToEdgeBijection(long index) {
          long i = (long) Math.ceil((Math.sqrt(1 + 8 * (index + 1)) - 1) / 2);
          long diff = index + 1 - (i * (i - 1)) / 2;
  
          return Pair.of((int) i, (int) diff - 1);
      }
docs: Maps an index in a hypothetical list of all edges to the actual edge.
  
  @param index index
  @return an edge based on its unique label