runtime/cpp/src/builtins/VectorBuiltins.cpp
// Elements must have random values in [0,1)
Elements must have random values in [0,1)
Elements must have random values in [ 0 1 )
RealVector<R_elem<double>> VectorBuiltins::randomVector(int i) {
  RealVector<R_elem<double>> result;
  auto& c = result.getContainer();
  c.resize(i);
  for (int j = 0; j < i; j++) {
    c[j] = R_elem<double>{(rand_r(&seed_) / (RAND_MAX + 1.))};
  }
  return result;
}
RealVector < R_elem < double > > VectorBuiltins :: randomVector ( int i ) { RealVector < R_elem < double > > result ; auto & c = result . getContainer ( ) ; c . resize ( i ) ; for ( int j = 0 ; j < i ; j ++ ) { c [ j ] = R_elem < double > { ( rand_r ( & seed_ ) / ( RAND_MAX + 1. ) ) } ; } return result ; }
Elements must have random values in [0,1)
Elements must have random values in [ 0 1 )