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