private DegreeIndicator findMaxOfBoth(DegreeIndicator[] lout_dis,
            boolean[] lout_ss, DegreeIndicator[] lin_dis, boolean[] lin_ss, Partite P) {
        int lout_max = findMax(lout_dis, lout_ss);
        int lin_max = findMax(lin_dis, lin_ss);

        if (-1 == lout_max && -1 == lin_max) {
            return null;
        } else if (-1 == lout_max) {
            return lin_dis[lin_max];
        } else if (-1 == lin_max) {
            return lout_dis[lout_max];
        }
        
        // to jump between two partites
        if(lout_dis[lout_max].compareTo(lin_dis[lin_max]) == 0){
            if(Partite.L == P){
                return lin_dis[lin_max];
            }else{
                return lout_dis[lout_max];
            }
        }

        if (lout_dis[lout_max].compareTo(lin_dis[lin_max]) > 0) {
            return lin_dis[lin_max];
        } else {
            return lout_dis[lout_max];
        }
    }