@SuppressWarnings("unchecked")
    private int minChild(final int index) {
            int kf = firstChild(index);
            int kl;
            if (kf != 0){
                    kl = lastChild(index);
                    @SuppressWarnings("rawtypes")
                    Comparable min_key = key[kf];
                    int min_ch = kf;
                    for (int i = kf; i <= kl; i++){
                            //      
                            if (key[i].compareTo(min_key) > 0) {
                                    min_key = key[i];
                                    min_ch = i;
                            }
                    }
                    return min_ch;
            }
            return 0;
    };