code: private int[] set2vector(HashSet<Integer> Y, int L) {
          int y[] = new int[L];
          for (int j : Y) {
              y[j] = 1;
          }
          return y;
      }
docs: convert set Y to an L-length vector y