public static Vec random(int length,Random rand){
  Vec v=new DenseVector(length);
  for (int i=0; i < length; i++)   v.set(i,rand.nextDouble());
  return v;
}

public static Vec random ( int length , Random rand ) { Vec v = new DenseVector ( length ) ; for ( int i = 0 ; i < length ; i ++ ) v . set ( i , rand . nextDouble ( ) ) ; return v ; }
creates a dense vector full of random values in the range [ 0 , 1 ]
