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/FeatureSelectorRandom.cc

    r1000 r1004  
    6666    for (size_t i=0; i<total_N; ++i)
    6767      features_.push_back(i);
    68     random::DiscreteUniform rnd;
    6968    // Peter should use random_sample here, but not included in std
    70     std::random_shuffle(features_.begin(), features_.end(), rnd);
     69    random::random_shuffle(features_.begin(), features_.end());
    7170    features_.resize(N_);
    7271  }
Note: See TracChangeset for help on using the changeset viewer.