public static DBIDs randomSample(DBIDs ids,double rate,Random random){
  if (rate <= 0) {
    return ids;
  }
  if (rate < 1.1) {
    int size=Math.min((int)(rate * ids.size()),ids.size());
    return randomSample(ids,size,random);
  }
  int size=Math.min((int)rate,ids.size());
  return randomSample(ids,size,random);
}

public static DBIDs randomSample ( DBIDs ids , double rate , Random random ) { if ( rate <= 0 ) { return ids ; } if ( rate < 1.1 ) { int size = Math . min ( ( int ) ( rate * ids . size ( ) ) , ids . size ( ) ) ; return randomSample ( ids , size , random ) ; } int size = Math . min ( ( int ) rate , ids . size ( ) ) ; return randomSample ( ids , size , random ) ; }
produce a random sample of the given dbids .
