STL: random_shuffle

random_shuffle

Rearranges a sequence of N elements in a range into one of N! possible arrangements selected at random.

template<class RandomAccessIterator> 
   void random_shuffle( 
      RandomAccessIterator _First,  
      RandomAccessIterator _Last 
   ); 
template<class RandomAccessIterator, class RandomNumberGenerator> 
   void random_shuffle( 
      RandomAccessIterator _First,  
      RandomAccessIterator _Last,  
      RandomNumberGenerator& _Rand 
   );

 

posted @ 2013-03-11 16:02  freewater  阅读(600)  评论(0编辑  收藏  举报