int[] getCentromereSortOrder() {
        int[] centro;
        if (haplostruct.length==2) {
            //bivalent
            if (rand.nextBoolean()) 
                 centro = new int[] {0,0,1,1};
            else centro = new int[] {1,1,0,0};
        }
        else {
            //parallel multivalent (Quadrivalent overrides this method)
            int[] chr = tools.shuffleArray(Tools.seq(haplostruct.length));
            /* for a 4-valent: {a,b,c,d}, 6-valent: {a,b,c,d,e,f) etc
             * with a:d = randomized 0:3 or a:f = randomized 0:5
             * The first meiotic division separates ab/cd, abc/def etc:
             */
            int[][] gam = new int[4][haplostruct.length/2];
            /* gam[0..4] are the 4 gametes and will contain the ORDERED
             * sets of centromere alleles
             */
            for (int p=0; p<haplostruct.length/2; p++) {
                gam[0][p] = chr[p];
                gam[1][p] = chr[p];
                gam[2][p] = chr[p+haplostruct.length/2];
                gam[3][p] = chr[p+haplostruct.length/2];
            }
            /* we have now for 4-valent: { {a,b}, {a,b}, {c,d}, {c,d} },
             * for 6-valent: { {a,b,c}, {a,b,c}, {d,e,f}, {d,e,f} }
             * and similar for higher multivalents
             */
            // randomize the order in each gamete:
            for (int g=0; g<4; g++) {
                gam[g] = tools.shuffleArray(gam[g]);
            }
            //next, put gam[0..3] consecutively into centro:
            centro = new int[2*haplostruct.length];
            for (int g=0; g<4; g++) {
                System.arraycopy(gam[g], 0, centro, g*(centro.length/4), centro.length/4);
            }
        } //quadrivalent or higher
        return centro;
    } //getCentromereSortOrder