Ignore:
Timestamp:
Jan 23, 2008, 7:24:53 PM (14 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/classifier/CrossValidationSampler.cc

    r1002 r1004  
    6666    my_begin.push_back(target.size());
    6767
    68     random::DiscreteUniform rnd;
    69 
    7068    for (size_t i=0; i<N; ) {
    7169      // shuffle indices within class each class
    7270      for (size_t j=0; j+1<my_begin.size(); ++j)
    73         random_shuffle(v.begin()+my_begin[j],v.begin()+my_begin[j+1],rnd);
     71        random::random_shuffle(v.begin()+my_begin[j],v.begin()+my_begin[j+1]);
    7472     
    7573      for (size_t part=0; part<k && i<N; i++, part++) {
Note: See TracChangeset for help on using the changeset viewer.