title: Boost library- not generating distinct random numbers
body: <p>I am using this following piece of code and calling it in a loop so that i can get multiple random numbers for my perfect hash function. But it is giving me same number, not distinct. "min" receives 0 or 1 and max receives "p-1". Where p is a prime number greater then hash table size. </p>
  
  <pre><code>long long int generateSingleRandomNo2(long long int min, long long int max) 
  {  
  typedef boost::uniform_int&lt;long long int&gt; NumberDistribution; 
  typedef boost::mt19937 RandomNumberGenerator; 
  typedef boost::variate_generator&lt;RandomNumberGenerator&amp;,NumberDistribution&gt; Generator; 
  
  NumberDistribution distribution(min,max); 
  RandomNumberGenerator generator; 
  Generator numberGenerator(generator, distribution); 
  generator.seed(time(0)); // seed with the current time 
  long long int A=numberGenerator();
  return A;
  /*if(A&gt;min)
    return A ;
  else 
  generateSingleRandomNo1(min,max);*/
  </code></pre>
  
  <p>}</p>