docs: public static int[] getTop(float[] c, float thres, boolean r) {
  		int[] idx = sort(c);
  		int i;
  		float total = 0;
  		float[] cp = new float[idx.length];
  		for (i = 0; i < idx.length; i++) {
  			cp[i] = (float) Math.pow(c[idx[i]], 2);
  			total += cp[i];
  		}
  
  		float ratio = 0;
  		for (i = 0; i < idx.length; i++) {
  			ratio += cp[i] / total;
  			if (ratio > thres)
  				break;
  		}
  		int[] a;
  		if (r)
  			a = Arrays.copyOfRange(idx, 0, i);
  		else
  			a = Arrays.copyOfRange(idx, i, idx.length);
  		return a;
  	}