code: private Set<Tuple> toEdgeSet(int[] mapping) {
          Set<Tuple> edges = new HashSet<Tuple>(mapping.length * 2);
          for (int u = 0; u < g.length; u++) {
              for (int v : g[u]) {
                  edges.add(new Tuple(mapping[u], mapping[v]));
              }
          }
          return edges;
      }
docs: Convert a mapping to a bitset.
  
  @param mapping an atom mapping
  @return a bit set of the mapped vertices (values in array)