public static int addBest(float[] scores, Object[] predList, float score, Object pred) {
		int n = scores.length;
		int i;
		for (i = 0; i < n; i++) {
			if (score > scores[i])
				break;
		}
		if (i >= n)
			return -1;
		for (int k = n - 2; k >= i; k--) {
			scores[k + 1] = scores[k];
			predList[k + 1] = predList[k];
		}
		scores[i] = score;
		predList[i] = pred;
		return i;
	}
public static int addBest ( float [ ] scores , Object [ ] predList , float score , Object pred ) { int n = scores . length ; int i ; for ( i = 0 ; i < n ; i ++ ) { if ( score > scores [ i ] ) break ; } if ( i >= n ) return - 1 ; for ( int k = n - 2 ; k >= i ; k -- ) { scores [ k + 1 ] = scores [ k ] ; predList [ k + 1 ] = predList [ k ] ; } scores [ i ] = score ; predList [ i ] = pred ; return i ; }
记录之前的label和得分，保留前n个

@param score
@param pred
@return 插入位置