public static double[] randomDoubleArray(int len,Random r){
  final double[] ret=new double[len];
  for (int i=0; i < len; i++) {
    ret[i]=r.nextDouble();
  }
  return ret;
}

public static double [ ] randomDoubleArray ( int len , Random r ) { final double [ ] ret = new double [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { ret [ i ] = r . nextDouble ( ) ; } return ret ; }
produce an array of random numbers in [ 0 : 1 ] .
