Changeset 1004 for trunk/yat/utility


Ignore:
Timestamp:
Jan 23, 2008, 7:24:53 PM (15 years ago)
Author:
Peter
Message:

adding a wrapper around std::random_shuffle that uses the RNG class. Changed all calls to random_shuffle to use the added function. Acctually all calls already used the RNG class so essentially this change is only cosmetic, but by providing a function I think it is easier to avoid using multiple random generators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/vector.cc

    r1000 r1004  
    521521  void shuffle(vector& invec)
    522522  {
    523     random::DiscreteUniform rnd;
    524     std::random_shuffle(invec.begin(), invec.end(), rnd);
     523    random::random_shuffle(invec.begin(), invec.end());
    525524  }
    526525
Note: See TracChangeset for help on using the changeset viewer.