public static DBIDVar randomSample(DBIDs ids,Random random){
  ArrayDBIDs aids=DBIDUtil.ensureArray(ids);
  DBIDVar v=DBIDUtil.newVar();
  aids.assignVar(random.nextInt(aids.size()),v);
  return v;
}

public static DBIDVar randomSample ( DBIDs ids , Random random ) { ArrayDBIDs aids = DBIDUtil . ensureArray ( ids ) ; DBIDVar v = DBIDUtil . newVar ( ) ; aids . assignVar ( random . nextInt ( aids . size ( ) ) , v ) ; return v ; }
draw a single random sample .
